use of io.atlasmap.v2.Property in project atlasmap by atlasmap.
the class BaseMarshallerTest method generateProperties.
private void generateProperties(AtlasMapping mapping) {
Property p = new Property();
p.setName("foo");
p.setValue("bar");
p.setFieldType(FieldType.INTEGER);
mapping.setProperties(new Properties());
mapping.getProperties().getProperty().add(p);
}
use of io.atlasmap.v2.Property in project atlasmap by atlasmap.
the class JsonMarshallerTest method testComplexRequests.
@Test
public void testComplexRequests() throws Exception {
runJSONSerializationTest(generatePropertyReferenceMapping(), "atlasmapping-property-request.json");
runJSONSerializationTest(generateConstantMapping(), "atlasmapping-constant-request.json");
runJSONSerializationTest(generateMultiSourceMapping(), "atlasmapping-multisource-request.json");
runJSONSerializationTest(generateCollectionMapping(), "atlasmapping-collection-request.json");
runJSONSerializationTest(generateCombineMapping(), "atlasmapping-combine-request.json");
runJSONSerializationTest(generateActionMapping(), "atlasmapping-field-action-request.json");
AtlasMapping action = mapper.readValue(new File("target" + File.separator + "junit" + File.separator + testMethodName + File.separator + "atlasmapping-field-action-request.json"), AtlasMapping.class);
assertNotNull(action);
validateAtlasMapping(action);
AtlasMapping collection = mapper.readValue(new File("target" + File.separator + "junit" + File.separator + testMethodName + File.separator + "atlasmapping-collection-request.json"), AtlasMapping.class);
assertNotNull(collection);
validateCollectionAtlasMapping(collection);
AtlasMapping multisource = mapper.readValue(new File("target" + File.separator + "junit" + File.separator + testMethodName + File.separator + "atlasmapping-multisource-request.json"), AtlasMapping.class);
assertNotNull(multisource);
validateMultisourceAtlasMapping(multisource);
AtlasMapping propertyMapping = mapper.readValue(new File("target" + File.separator + "junit" + File.separator + testMethodName + File.separator + "atlasmapping-property-request.json"), AtlasMapping.class);
assertNotNull(propertyMapping);
validatePropertyAtlasMapping(propertyMapping);
AtlasMapping constantMapping = mapper.readValue(new File("target" + File.separator + "junit" + File.separator + testMethodName + File.separator + "atlasmapping-constant-request.json"), AtlasMapping.class);
assertNotNull(constantMapping);
validateConstantAtlasMapping(constantMapping);
AtlasMapping combineAtlasMapping = mapper.readValue(new File("target" + File.separator + "junit" + File.separator + testMethodName + File.separator + "atlasmapping-combine-request.json"), AtlasMapping.class);
assertNotNull(combineAtlasMapping);
validateCombineAtlasMapping(combineAtlasMapping);
}
use of io.atlasmap.v2.Property in project atlasmap by atlasmap.
the class AtlasTestData method generateAtlasProperties.
public static List<Property> generateAtlasProperties() {
List<Property> props = new ArrayList<Property>();
Property p = new Property();
p.setName("prop-boolean");
p.setValue("false");
p.setFieldType(FieldType.BOOLEAN);
props.add(p);
p = new Property();
p.setName("prop-byte");
p.setValue("92");
p.setFieldType(FieldType.BYTE);
props.add(p);
p = new Property();
p.setName("prop-char");
p.setValue("z");
p.setFieldType(FieldType.CHAR);
props.add(p);
p = new Property();
p.setName("prop-double");
p.setValue(Double.toString(Double.MIN_VALUE));
p.setFieldType(FieldType.DOUBLE);
props.add(p);
p = new Property();
p.setName("prop-float");
p.setValue(Float.toString(Float.MIN_VALUE));
p.setFieldType(FieldType.FLOAT);
props.add(p);
p = new Property();
p.setName("prop-int");
p.setValue(Integer.toString(Integer.MIN_VALUE));
p.setFieldType(FieldType.INTEGER);
props.add(p);
p = new Property();
p.setName("prop-long");
p.setValue(Long.toString(Long.MIN_VALUE));
p.setFieldType(FieldType.LONG);
props.add(p);
p = new Property();
p.setName("prop-short");
p.setValue(Short.toString(Short.MIN_VALUE));
p.setFieldType(FieldType.SHORT);
props.add(p);
p = new Property();
p.setName("prop-string");
p.setValue("helloworld");
p.setFieldType(FieldType.STRING);
props.add(p);
p = new Property();
p.setName("dupe-string");
p.setValue("whatup");
p.setFieldType(FieldType.STRING);
props.add(p);
return props;
}
use of io.atlasmap.v2.Property in project atlasmap by atlasmap.
the class BaseMarshallerTest method generateProperties.
private void generateProperties(AtlasMapping atlasMapping) {
Property p = new Property();
p.setName("foo");
p.setValue("bar");
p.setFieldType(FieldType.INTEGER);
atlasMapping.setProperties(new Properties());
atlasMapping.getProperties().getProperty().add(p);
}
use of io.atlasmap.v2.Property in project kie-wb-common by kiegroup.
the class MultipleInstanceActivityPropertyWriter method setCollectionInput.
public void setCollectionInput(String collectionInput) {
if (isEmpty(collectionInput)) {
return;
}
setUpLoopCharacteristics();
String suffix = "IN_COLLECTION";
String id = Ids.dataInput(activity.getId(), suffix);
DataInput dataInputElement = createDataInput(id, suffix);
ioSpec.getDataInputs().add(dataInputElement);
// check whether this exist
Optional<Property> property = findPropertyById(collectionInput);
Optional<DataObject> dataObject = findDataObjectById(collectionInput);
if (property.isPresent()) {
processDataInput(dataInputElement, property.get());
} else if (dataObject.isPresent()) {
processDataInput(dataInputElement, dataObject.get());
}
}
Aggregations