use of io.syndesis.qe.entities.DataMapperStepDefinition in project syndesis-qe by syndesisio.
the class DataMapperSteps method mapDataMapperStep.
@When("MAP using Step {int} and field {string} to {string}")
public void mapDataMapperStep(int fromStep, String fromField, String toField) {
DataMapperStepDefinition newDmStep = new DataMapperStepDefinition();
newDmStep.setFromStep(fromStep);
newDmStep.setInputFields(Collections.singletonList(fromField));
newDmStep.setOutputFields(Collections.singletonList(toField));
newDmStep.setMappingType(MappingType.MAP);
newDmStep.setStrategy(null);
super.getSteps().getLastStepDefinition().getDataMapperDefinition().getDataMapperStepDefinition().add(newDmStep);
}
use of io.syndesis.qe.entities.DataMapperStepDefinition in project syndesis-qe by syndesisio.
the class DataMapperSteps method separateDataMapperStep.
@When("SEPARATE using Step {int} and strategy {string} and source {string} into targets")
public void separateDataMapperStep(int fromStep, String strategy, String sourceField, DataTable targetMappingData) {
DataMapperStepDefinition newDmStep = new DataMapperStepDefinition();
newDmStep.setFromStep(fromStep);
newDmStep.setInputFields(Collections.singletonList(sourceField));
newDmStep.setOutputFields(targetMappingData.transpose().asList(String.class));
newDmStep.setMappingType(MappingType.SEPARATE);
newDmStep.setStrategy(SeparatorType.valueOf(strategy));
super.getSteps().getLastStepDefinition().getDataMapperDefinition().getDataMapperStepDefinition().add(newDmStep);
}
use of io.syndesis.qe.entities.DataMapperStepDefinition in project syndesis-qe by syndesisio.
the class DataMapperSteps method combineDataMapperStep.
@When("COMBINE using Step {int} and strategy {string} into {string} and sources")
public void combineDataMapperStep(int fromStep, String strategy, String targetField, DataTable sourceMappingData) {
DataMapperStepDefinition newDmStep = new DataMapperStepDefinition();
newDmStep.setFromStep(fromStep);
newDmStep.setInputFields(sourceMappingData.transpose().asList(String.class));
newDmStep.setOutputFields(Collections.singletonList(targetField));
newDmStep.setMappingType(MappingType.COMBINE);
newDmStep.setStrategy(SeparatorType.valueOf(strategy));
super.getSteps().getLastStepDefinition().getDataMapperDefinition().getDataMapperStepDefinition().add(newDmStep);
}
Aggregations