Package org.rhq.core.domain.configuration.definition

Examples of org.rhq.core.domain.configuration.definition.PropertyDefinitionList


                PropertySimpleType.BOOLEAN);

        PropertyDefinitionMap metricUpdateOverride =
            new PropertyDefinitionMap(METRIC_UPDATE_OVERRIDE_PROPERTY, null, true, metricName, resourceTypeName,
                resourceTypePlugin, updateSchedules);
        PropertyDefinitionList metricUpdateOverrides =
            new PropertyDefinitionList(METRIC_UPDATE_OVERRIDES_PROPERTY, "Per metric settings", false,
                metricUpdateOverride);

        def.put(metricUpdateOverrides);

        ConfigurationUtility.initializeDefaultTemplate(def);
View Full Code Here


            } else { // different type

                replaceProperty(existingProperty, newProperty);
            }
        } else if (existingProperty instanceof PropertyDefinitionList) {
            PropertyDefinitionList exList = (PropertyDefinitionList) existingProperty;
            if (newProperty instanceof PropertyDefinitionList) {
                PropertyDefinitionList newList = (PropertyDefinitionList) newProperty;
                replaceListProperty(exList, newList);
            } else { // simple property or map-property
                replaceProperty(existingProperty, newProperty);
            }
        } else if (existingProperty instanceof PropertyDefinitionSimple) {
View Full Code Here

        ConfigurationDefinition definition = new ConfigurationDefinition("bla","For testing");
        definition.put(new PropertyDefinitionSimple("bool1","A boolean",true, PropertySimpleType.BOOLEAN));
        definition.put(new PropertyDefinitionSimple("optional","null string",false, PropertySimpleType.STRING));
        // We define Inner as a list property, but the user supplied a simple one
        definition.put(new PropertyDefinitionList("Inner","Bla",true,
            new PropertyDefinitionSimple("Inner","fasel",true,PropertySimpleType.STRING)));

        List<String> errors = ConfigurationHelper.checkConfigurationWrtDefinition(config,definition);

        assert errors!=null;
View Full Code Here


        ConfigurationDefinition definition = new ConfigurationDefinition("bla",null);
        definition.put(new PropertyDefinitionSimple("Hello",null,true,PropertySimpleType.STRING));
        definition.put(new PropertyDefinitionSimple("Answer",null,false,PropertySimpleType.INTEGER));
        definition.put(new PropertyDefinitionList("list",null,true,
                new PropertyDefinitionMap("list",null,true,
                    new PropertyDefinitionSimple("list",null,true,PropertySimpleType.STRING))));
        definition.put(new PropertyDefinitionSimple("aString",null,false,PropertySimpleType.INTEGER));

View Full Code Here


        ConfigurationDefinition definition = new ConfigurationDefinition("bla",null);
        definition.put(new PropertyDefinitionSimple("Hello",null,true,PropertySimpleType.STRING));
        definition.put(new PropertyDefinitionMap("list",null,true,
                new PropertyDefinitionList("list",null,true,
                    new PropertyDefinitionSimple("list",null,true,PropertySimpleType.STRING))));


        List<String> errors = ConfigurationHelper.checkConfigurationWrtDefinition(config,definition);
View Full Code Here

        propertyList.add(new PropertySimple("string", "World"));
        config.put(propertyList);


        ConfigurationDefinition definition = new ConfigurationDefinition("bla",null);
        definition.put(new PropertyDefinitionList("aList",null,false,
            new PropertyDefinitionSimple("string",null,false,PropertySimpleType.STRING)));

        Map<String,Object> map = ConfigurationHelper.configurationToMap(config,definition, true);

        assert map != null;
View Full Code Here

        propertyMap.put(new PropertySimple("aString","Frobnitz"));


        ConfigurationDefinition definition = new ConfigurationDefinition("bla",null);
        definition.put(new PropertyDefinitionMap("aMap",null,false,
            new PropertyDefinitionList("aList",null,false,
                new PropertyDefinitionSimple("string",null,false,PropertySimpleType.STRING)),
            new PropertyDefinitionSimple("aString",null,false,PropertySimpleType.STRING)));

        Map<String,Object> map = ConfigurationHelper.configurationToMap(config,definition, true);
View Full Code Here

        propertyMap.put(new PropertySimple("aString","Frobnitz"));


        ConfigurationDefinition definition = new ConfigurationDefinition("bla",null);
        definition.put(new PropertyDefinitionMap("aMap",null,false,
            new PropertyDefinitionList("aBla",null,false,
                new PropertyDefinitionSimple("string",null,false,PropertySimpleType.STRING)),
            new PropertyDefinitionSimple("aFoo",null,false,PropertySimpleType.STRING)));

        try {
            ConfigurationHelper.configurationToMap(config,definition, true);
View Full Code Here

        propertyMap.put(new PropertySimple("aString","Frobnitz"));


        ConfigurationDefinition definition = new ConfigurationDefinition("bla",null);
        definition.put(new PropertyDefinitionMap("aMap",null,false,
            new PropertyDefinitionList("aBla",null,false,
                new PropertyDefinitionSimple("string",null,false,PropertySimpleType.STRING)),
            new PropertyDefinitionSimple("aFoo",null,false,PropertySimpleType.STRING)));

        Map<String,Object> map = ConfigurationHelper.configurationToMap(config,definition, false);
View Full Code Here

            "a read-only open map of simples", false);
        readOnlyOpenMapPropDef.setDisplayName(readOnlyOpenMapPropDef.getName());
        readOnlyOpenMapPropDef.setReadOnly(true);
        propertyDefinitions.put(readOnlyOpenMapPropDef.getName(), readOnlyOpenMapPropDef);

        PropertyDefinitionList listOfSimplesPropDef = new PropertyDefinitionList("ListOfStrings",
            "another list of Strings", true, new PropertyDefinitionSimple("note", "a note", false,
                PropertySimpleType.STRING));
        listOfSimplesPropDef.setDisplayName(listOfSimplesPropDef.getName());
        propertyDefinitions.put(listOfSimplesPropDef.getName(), listOfSimplesPropDef);

        PropertyDefinitionMap mapInListPropDef = new PropertyDefinitionMap("MapOfSimplesInList", "a map of simples in a list", false);
        mapInListPropDef.put(createStringPropDef1());
        mapInListPropDef.put(createStringPropDef2());
        mapInListPropDef.put(createIntegerPropDef());
        mapInListPropDef.setDisplayName(mapInListPropDef.getName());

        PropertyDefinitionList listPropDef = new PropertyDefinitionList("ListOfMaps", "a list of maps", true,
            mapInListPropDef);
        listPropDef.setDisplayName(listPropDef.getName());
        propertyDefinitions.put(listPropDef.getName(), listPropDef);

        PropertyDefinitionMap mapInReadOnlyListPropDef = new PropertyDefinitionMap("MapOfSimplesInReadOnlyList", "a map of simples in a list", false);
        mapInReadOnlyListPropDef.put(createStringPropDef1());
        mapInReadOnlyListPropDef.put(createStringPropDef2());
        mapInReadOnlyListPropDef.put(createIntegerPropDef());
        mapInReadOnlyListPropDef.setDisplayName(mapInReadOnlyListPropDef.getName());

        PropertyDefinitionList readOnlyListPropDef = new PropertyDefinitionList("ReadOnlyListOfMaps",
            "a read-only list of maps", true, mapInReadOnlyListPropDef);
        readOnlyListPropDef.setDisplayName(readOnlyListPropDef.getName());
        readOnlyListPropDef.setReadOnly(true);
        propertyDefinitions.put(readOnlyListPropDef.getName(), readOnlyListPropDef);

        PropertyGroupDefinition propertyGroupDefinition = new PropertyGroupDefinition("myGroup");
        propertyGroupDefinition.setDisplayName(propertyGroupDefinition.getName());
        propertyGroupDefinition.setDescription("this is an example group");
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.configuration.definition.PropertyDefinitionList

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.