Package org.rhq.enterprise.server.xmlschema.generated.configuration.instance

Examples of org.rhq.enterprise.server.xmlschema.generated.configuration.instance.SimplePropertyInstanceDescriptor


            ConfigurationInstanceDescriptorUtil.createConfigurationInstance(def, config);

        assertEquals(instance.getConfigurationProperty().size(), 1,
            "Unexpected number of properties in the config instance.");

        SimplePropertyInstanceDescriptor propInstance =
            (SimplePropertyInstanceDescriptor) instance.getConfigurationProperty().get(0).getValue();

        assertEquals(propInstance.getName(), "prop", "Unexpected property instance name");
        assertEquals(propInstance.getValue(), "true", "Unexpected property instance value");
        assertEquals(propInstance.getLongDescription(), "prop descr", "Unexpected property instance description");
        assertTrue(propInstance.isRequired(), "Unexpected property instance required flag");

        logInstance("Simple", instance);
    }
View Full Code Here


            return ret;
        }

        private static SimplePropertyInstanceDescriptor createSimple(PropertyDefinitionSimple def, PropertySimple prop) {
            SimplePropertyInstanceDescriptor ret = new SimplePropertyInstanceDescriptor();
            setCommonProps(ret, def, true);

            //these are prohibited, because they make no sense on the property instance
            //ret.setDefaultValue(def.getDefaultValue());
            //ret.setInitialValue(prop.getStringValue());
            //ret.setActivationPolicy(pds.getActivationPolicy());
            ret.setPropertyOptions(convert(def.getEnumeratedValues()));
            ret.setType(convert(def.getType()));
            ret.setUnits(convert(def.getUnits()));

            if (prop != null) {
                ret.setValue(prop.getStringValue());
            }

            return ret;
        }
View Full Code Here

            if (propertyInstance instanceof SimplePropertyInstanceDescriptor) {
                def = convert((ConfigurationProperty) propertyInstance);
                def.setConfigurationDefinition(configurationDefinition);

                SimplePropertyInstanceDescriptor simpleInstance = (SimplePropertyInstanceDescriptor) propertyInstance;

                PropertySimple simpleProp = new PropertySimple(simpleInstance.getName(), simpleInstance.getValue());
                prop = simpleProp;
            } else if (propertyInstance instanceof ListPropertyInstanceDescriptor) {
                def = convert((ConfigurationProperty) propertyInstance);
                def.setConfigurationDefinition(configurationDefinition);
View Full Code Here

TOP

Related Classes of org.rhq.enterprise.server.xmlschema.generated.configuration.instance.SimplePropertyInstanceDescriptor

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.