Package org.switchyard.config.model.property

Examples of org.switchyard.config.model.property.PropertyModel


                Assert.assertEquals(true, remoteRest.isUseFormBasedAuth());
            }
        } else {
            Assert.fail("couldn't find container, resources, remoteJms, or remoteRest");
        }
        PropertyModel property = rules.getProperties().getProperties().get(0);
        Assert.assertEquals("foo", property.getName());
        Assert.assertEquals("bar", property.getValue());
    }
View Full Code Here


        if (propertyAnnotations == null || propertyAnnotations.length == 0) {
            return null;
        }
        PropertiesModel propertiesModel = new V1PropertiesModel(knowledgeNamespace.uri());
        for (Property propertyAnnotation : propertyAnnotations) {
            PropertyModel propertyModel = new V1PropertyModel(knowledgeNamespace.uri());
            String name = propertyAnnotation.name();
            if (!UNDEFINED.equals(name)) {
                propertyModel.setName(name);
            }
            String value = propertyAnnotation.value();
            if (!UNDEFINED.equals(value)) {
                propertyModel.setValue(value);
            }
            propertiesModel.addProperty(propertyModel);
        }
        return propertiesModel;
    }
View Full Code Here

                Assert.assertEquals(true, remoteRest.isUseFormBasedAuth());
            }
        } else {
            Assert.fail("couldn't find container, resources, remoteJms, or remoteRest");
        }
        PropertyModel bpm_property = bpm.getProperties().getProperties().get(0);
        Assert.assertEquals("foo", bpm_property.getName());
        Assert.assertEquals("bar", bpm_property.getValue());
        UserGroupCallbackModel userGroupCallback = bpm.getUserGroupCallback();
        Assert.assertEquals(TestUserGroupCallback.class, userGroupCallback.getClazz(loader));
        PropertyModel ugc_property = userGroupCallback.getProperties().getProperties().get(0);
        Assert.assertEquals("rab", ugc_property.getName());
        Assert.assertEquals("oof", ugc_property.getValue());
        WorkItemHandlerModel workItemHandler = bpm.getWorkItemHandlers().getWorkItemHandlers().get(0);
        Assert.assertEquals(TestWorkItemHandler.class, workItemHandler.getClazz(loader));
        Assert.assertEquals("MyWIH", workItemHandler.getName());
    }
View Full Code Here

            if (reference != null) {
                _references.add(reference);
            }
        }
        for (Configuration property_config : config.getChildren(PropertyModel.PROPERTY)) {
            PropertyModel property = (PropertyModel)readModel(property_config);
            if (property != null) {
                _properties.put(property.getName(), property);
            }
        }

        setModelChildrenOrder(ComponentImplementationModel.IMPLEMENTATION + ".*", ComponentServiceModel.SERVICE, ComponentReferenceModel.REFERENCE, PropertyModel.PROPERTY);
        setComponentPropertyResolver();
View Full Code Here

     */
    @Override
    public Object resolveProperty(String key) {
        Object value = null;
        if (key != null) {
            PropertyModel property = getProperty(key);
            value = property != null ? property.getValue() : null;
        }
        return value;
    }
View Full Code Here

            if (component != null) {
                _components.add(component);
            }
        }
        for (Configuration property_config : config.getChildren(PropertyModel.PROPERTY)) {
            PropertyModel property = (PropertyModel)readModel(property_config);
            if (property != null) {
                _properties.put(property.getName(), property);
            }
        }
       
        setModelChildrenOrder(CompositeServiceModel.SERVICE, CompositeReferenceModel.REFERENCE, ComponentModel.COMPONENT, PropertyModel.PROPERTY);
        setCompositePropertyResolver();
View Full Code Here

     */
    @Override
    public Object resolveProperty(String key) {
        Object value = null;
        if (key != null) {
            PropertyModel property = getProperty(key);
            value = property != null ? property.getValue() : null;
        }
        return value;
    }
View Full Code Here

     * @param desc the descriptor
     */
    public V1PropertiesModel(Configuration config, Descriptor desc) {
        super(config, desc);
        for (Configuration property_config : config.getChildren(PROPERTY)) {
            PropertyModel property = (PropertyModel)readModel(property_config);
            if (property != null) {
                _properties.add(property);
            }
        }
        setModelChildrenOrder(PROPERTY);
View Full Code Here

    /**
     * {@inheritDoc}
     */
    @Override
    public PropertyModel getProperty(String name) {
        PropertyModel property = null;
        for (PropertyModel p : _properties) {
            if (p.getName().equals(name)) {
                property = p;
                break;
            }
View Full Code Here

     */
    @Override
    public String getPropertyValue(String name) {
        String value = null;
        if (name != null) {
            PropertyModel property = getProperty(name);
            value = property != null ? property.getValue() : null;
        }
        return value;
    }
View Full Code Here

TOP

Related Classes of org.switchyard.config.model.property.PropertyModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.