use of com.redhat.service.smartevents.infra.models.gateways.Action in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class WebhookActionInvokerBuilderTest method createProcessor.
private ProcessorDTO createProcessor() {
Action action = new Action();
action.setType(WebhookAction.TYPE);
Map<String, String> params = new HashMap<>();
params.put(ENDPOINT_PARAM, TEST_ENDPOINT);
action.setMapParameters(params);
ProcessorDTO processor = new ProcessorDTO();
processor.setType(ProcessorType.SINK);
processor.setId("myProcessor");
processor.setDefinition(new ProcessorDefinition(null, null, action));
processor.setBridgeId("myBridge");
return processor;
}
use of com.redhat.service.smartevents.infra.models.gateways.Action in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class ExecutorTestUtils method createSourceProcessor.
public static ProcessorDTO createSourceProcessor() {
Source requestedSource = new Source();
requestedSource.setType(SlackSource.TYPE);
Action resolvedAction = new Action();
resolvedAction.setType(WebhookAction.TYPE);
return createProcessor(ProcessorType.SOURCE, new ProcessorDefinition(null, null, requestedSource, resolvedAction));
}
use of com.redhat.service.smartevents.infra.models.gateways.Action in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class ExecutorTestUtils method createSinkProcessorWithSameAction.
public static ProcessorDTO createSinkProcessorWithSameAction() {
Action action = new Action();
action.setType(KafkaTopicAction.TYPE);
return createProcessor(ProcessorType.SINK, new ProcessorDefinition(null, null, action));
}
use of com.redhat.service.smartevents.infra.models.gateways.Action in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class ExecutorTestUtils method createSinkProcessorWithResolvedAction.
public static ProcessorDTO createSinkProcessorWithResolvedAction() {
Action requestedAction = new Action();
requestedAction.setType(SendToBridgeAction.TYPE);
Action resolvedAction = new Action();
resolvedAction.setType(WebhookAction.TYPE);
return createProcessor(ProcessorType.SINK, new ProcessorDefinition(null, null, requestedAction, resolvedAction));
}
use of com.redhat.service.smartevents.infra.models.gateways.Action in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class TestSupport method newRequestedProcessorDTO.
public static ProcessorDTO newRequestedProcessorDTO() {
Set<BaseFilter> filters = new HashSet<>();
filters.add(new StringEquals("key", "value"));
String transformationTemplate = "{\"test\": {key}}";
Action a = new Action();
a.setType(KafkaTopicAction.TYPE);
Map<String, String> params = new HashMap<>();
params.put(KafkaTopicAction.TOPIC_PARAM, "myTopic");
a.setMapParameters(params);
ProcessorDefinition definition = new ProcessorDefinition(filters, transformationTemplate, a);
ProcessorDTO dto = new ProcessorDTO();
dto.setType(PROCESSOR_TYPE);
dto.setId(PROCESSOR_ID);
dto.setName(PROCESSOR_NAME);
dto.setDefinition(definition);
dto.setBridgeId(BRIDGE_ID);
dto.setCustomerId(CUSTOMER_ID);
dto.setOwner(USER_NAME);
dto.setStatus(PREPARING);
dto.setKafkaConnection(KAFKA_CONNECTION_DTO);
return dto;
}
Aggregations