Package org.rhq.core.clientapi.descriptor.configuration

Examples of org.rhq.core.clientapi.descriptor.configuration.ConfigurationProperty


            groupDef.setDefaultHidden(group.isHiddenByDefault());
            groupDef.setOrder(groupOrderIndex++);
            List<JAXBElement<? extends ConfigurationProperty>> groupProperties = group.getConfigurationProperty();
            int propertyOrderIndex = 0;
            for (JAXBElement<? extends ConfigurationProperty> jaxbProperty : groupProperties) {
                ConfigurationProperty uncastedProperty = jaxbProperty.getValue();
                PropertyDefinition propertyDefinition = parseProperty(uncastedProperty, propertyOrderIndex,
                    defaultConfiguration);
                if (configurationDefinition != null) {
                    propertyDefinition.setPropertyGroupDefinition(groupDef);
                    configurationDefinition.put(propertyDefinition);
                    propertyOrderIndex++;
                }
            }
        }

        int propertyOrderIndex = 0;
        for (JAXBElement<? extends ConfigurationProperty> jaxbProperty : properties) {
            ConfigurationProperty uncastedProperty = jaxbProperty.getValue();
            PropertyDefinition propertyDefinition = parseProperty(uncastedProperty, propertyOrderIndex,
                defaultConfiguration);
            if (configurationDefinition != null) {
                configurationDefinition.put(propertyDefinition);
                propertyOrderIndex++;
View Full Code Here


        // Process the map's nested properties.
        List<JAXBElement<? extends ConfigurationProperty>> nestedProperties = mapProperty.getConfigurationProperty();
        int propertyOrderIndex = 0;
        for (JAXBElement<? extends ConfigurationProperty> jaxbProperty : nestedProperties) {
            ConfigurationProperty uncastedProperty = jaxbProperty.getValue();
            PropertyDefinition propertyDefinition = parseProperty(uncastedProperty, propertyOrderIndex++, propMap);
            propDefMap.put(propertyDefinition);
        }
        return propDefMap;
    }
View Full Code Here

                addSingle(descriptors, def, prop);
            }
        }

        private static void addSingle(List<JAXBElement<?>> descriptors, PropertyDefinition def, Property prop) {
            ConfigurationProperty descriptor = null;
            QName tagName = null;

            descriptor = createDescriptor(def, prop);
            tagName = getTagName(descriptor);
View Full Code Here

            addToJAXBElementList(descriptors, Object.class, descriptor, tagName);
        }

        private static ConfigurationProperty createDescriptor(PropertyDefinition def, Property prop) {
            ConfigurationProperty ret = null;

            if (def instanceof PropertyDefinitionSimple) {
                ret = createSimple((PropertyDefinitionSimple) def, (PropertySimple) prop);
            } else if (def instanceof PropertyDefinitionList) {
                ret = createList((PropertyDefinitionList) def, (PropertyList) prop);
View Full Code Here

        private static ListPropertyInstanceDescriptor createList(PropertyDefinitionList def, PropertyList prop) {
            ListPropertyInstanceDescriptor ret = new ListPropertyInstanceDescriptor();

            setCommonProps(ret, def, true);

            ConfigurationProperty memberDef = convertDefinition(def.getMemberDefinition());
            ret.setConfigurationProperty(new JAXBElement<ConfigurationProperty>(getTagName(memberDef),
                ConfigurationProperty.class, memberDef));

            if (prop != null) {
                PropertyValuesDescriptor values = new PropertyValuesDescriptor();
View Full Code Here

            MapPropertyInstanceDescriptor ret = new MapPropertyInstanceDescriptor();

            setCommonProps(ret, def, true);

            for (PropertyDefinition mem : def.getOrderedPropertyDefinitions()) {
                ConfigurationProperty memDef = convertDefinition(mem);

                addToJAXBElementList(ret.getConfigurationProperty(), ConfigurationProperty.class, memDef,
                    getTagName(memDef));
            }
View Full Code Here

        }

        private static ListProperty convertList(PropertyDefinitionList def) {
            ListProperty ret = new ListProperty();
            setCommonProps(ret, def, false);
            ConfigurationProperty memberDefinition = convertDefinition(def.getMemberDefinition());
            ret.setConfigurationProperty(new JAXBElement<ConfigurationProperty>(getTagName(memberDefinition),
                ConfigurationProperty.class, memberDefinition));

            return ret;
        }
View Full Code Here

            MapProperty ret = new MapProperty();
            setCommonProps(ret, def, false);

            List<JAXBElement<? extends ConfigurationProperty>> elements = ret.getConfigurationProperty();
            for (PropertyDefinition el : def.getOrderedPropertyDefinitions()) {
                ConfigurationProperty prop = convertDefinition(el);
                QName tagName = getTagName(prop);
                addToJAXBElementList(elements, ConfigurationProperty.class, prop, tagName);
            }

            return ret;
View Full Code Here

TOP

Related Classes of org.rhq.core.clientapi.descriptor.configuration.ConfigurationProperty

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.