private void parseAndPutMetaAttribute(AttributeModel attribute, MutableAttributeMap<Object> attributes) { String name = attribute.getName(); String value = attribute.getValue(); attributes.put(name, parseAttributeValueIfNecessary(attribute, value)); }
private void parseAndPutMetaAttribute(AttributeModel attribute, MutableAttributeMap<Object> attributes) { String name = attribute.getName(); String value = attribute.getValue(); attributes.put(name, parseAttributeValueIfNecessary(attribute, value)); }
private void parseAndPutMetaAttribute(AttributeModel attribute, MutableAttributeMap attributes) { String name = attribute.getName(); String value = attribute.getValue(); attributes.put(name, parseAttributeValueIfNecessary(attribute, value)); }
public void testCustomFlowAttribute() { ClassPathResource resource = new ClassPathResource("flow-custom-attribute.xml", getClass()); FlowModelBuilder builder = new XmlFlowModelBuilder(resource, registry); builder.init(); builder.build(); FlowModel flow = builder.getFlowModel(); assertEquals("bar", flow.getAttributes().get(0).getValue()); assertEquals("number", flow.getAttributes().get(1).getName()); }
public void testCopyModel() { AttributeModel model = new AttributeModel("foo", "bar"); FlowModel m = new FlowModel(); AttributeModel copy = (AttributeModel) m.copy(model); assertEquals("foo", copy.getName()); assertEquals("bar", copy.getValue()); }
public void testMergeAttributes() { FlowModel child = new FlowModel(); FlowModel parent = new FlowModel(); child.setAttributes(asList(new AttributeModel("name", "value"))); AttributeModel parentAttribute1 = new AttributeModel("name", "value"); parentAttribute1.setType("type"); AttributeModel parentAttribute2 = new AttributeModel("name2", "value2"); parentAttribute2.setType("type2"); parent.setAttributes(asList(parentAttribute1, parentAttribute2)); child.merge(parent); assertEquals(2, child.getAttributes().size()); assertEquals("name", child.getAttributes().get(0).getName()); assertEquals("type", child.getAttributes().get(0).getType()); assertEquals("name2", child.getAttributes().get(1).getName()); assertEquals("type2", child.getAttributes().get(1).getType()); }