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

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


                "Configuration properties are missing. Resource configurations must have at least one group or one config-property as a child.");
        }

        int groupOrderIndex = 0;
        for (PropertyGroup group : descriptor.getGroup()) {
            org.rhq.core.domain.configuration.definition.PropertyGroupDefinition groupDef = new PropertyGroupDefinition(
                group.getName());
            groupDef.setDisplayName((group.getDisplayName() != null) ? group.getDisplayName() : StringUtils
                .deCamelCase(group.getName()));
            groupDef.setDescription(group.getDescription());
            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,
View Full Code Here


            "a read-only list of maps", true, mapInReadOnlyListPropDef);
        readOnlyListPropDef.setDisplayName(readOnlyListPropDef.getName());
        readOnlyListPropDef.setReadOnly(true);
        addPropertyDefinition(configDef, readOnlyListPropDef, orderIndex++);

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

        PropertyDefinitionSimple myString = new PropertyDefinitionSimple("myString1", "my little string", true,
            PropertySimpleType.STRING);
        myString.setDisplayName(myString.getName());
        myString.setSummary(true);
        addPropertyDefinition(configDef, myString, orderIndex++);
        myString.setPropertyGroupDefinition(propertyGroupDefinition);

        PropertyDefinitionSimple myString2 = new PropertyDefinitionSimple("myString2", "my other little string", true,
            PropertySimpleType.STRING);
        myString2.setDisplayName(myString2.getName());
        myString2.setSummary(true);
        addPropertyDefinition(configDef, myString2, orderIndex++);
        myString2.setPropertyGroupDefinition(propertyGroupDefinition);

        PropertyGroupDefinition propertyGroupDefinition2 = new PropertyGroupDefinition("myGroup2");
        propertyGroupDefinition2.setDisplayName(propertyGroupDefinition2.getName());
        propertyGroupDefinition2.setDescription("this is another example group");

        PropertyDefinitionSimple myString3 = new PropertyDefinitionSimple("myString3", "my third string", true,
            PropertySimpleType.STRING);
        myString3.setDisplayName((myString3.getName()));
        myString3.setSummary(true);
View Full Code Here

        assert resourceType.getPlugin().equals(PLUGIN_NAME_CHILD);
        assertVersion2(resourceType);
    }

    private void assertVersion1(ResourceType resourceType) {
        PropertyGroupDefinition group;
        PropertyDefinition prop;
        ProcessScan processScan;
        OperationDefinition op;
        MeasurementDefinition metric;
        EventDefinition event;
        DriftDefinitionTemplate drift;
        BaseDirectory driftBasedir;
        ResourceTypeBundleConfiguration bundle;
        BundleDestinationBaseDirectory bundleBasedir;

        assert resourceType.getChildSubCategories() == null;

        assert resourceType.getPluginConfigurationDefinition().getGroupDefinitions().size() == 1;
        group = resourceType.getPluginConfigurationDefinition().getGroupDefinitions().get(0);
        assert group.getName().equals(PC_GROUP);
        assert group.isDefaultHidden() == PC_GROUP_HIDDEN;
        prop = resourceType.getPluginConfigurationDefinition().get(PC_PROP);
        assert prop != null;
        assert prop.getName().equals(PC_PROP);
        assert prop.isRequired() == PC_PROP_REQUIRED;
        assert prop.getPropertyGroupDefinition().getName().equals(PC_GROUP);
View Full Code Here

            "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");

        PropertyDefinitionSimple myString = new PropertyDefinitionSimple("myString1", "my little string", true,
            PropertySimpleType.STRING);
        myString.setDisplayName(myString.getName());
        myString.setSummary(true);
        propertyDefinitions.put(myString.getName(), myString);
        myString.setPropertyGroupDefinition(propertyGroupDefinition);

        PropertyDefinitionSimple myString2 = new PropertyDefinitionSimple("myString2", "my other little string", true,
            PropertySimpleType.STRING);
        myString2.setDisplayName(myString2.getName());
        myString2.setSummary(true);
        propertyDefinitions.put(myString2.getName(), myString2);
        myString2.setPropertyGroupDefinition(propertyGroupDefinition);

        PropertyGroupDefinition propertyGroupDefinition2 = new PropertyGroupDefinition("myGroup2");
        propertyGroupDefinition2.setDisplayName(propertyGroupDefinition2.getName());
        propertyGroupDefinition2.setDescription("this is another example group");

        PropertyDefinitionSimple myString3 = new PropertyDefinitionSimple("myString3", "my third string", true,
            PropertySimpleType.STRING);
        myString3.setDisplayName((myString3.getName()));
        myString3.setSummary(true);
View Full Code Here

     * @return system settings config def
     */
    private ConfigurationDefinition getSystemSettingsDefinition(Configuration config, Map<String, String> driftPlugins) {
        ConfigurationDefinition def = new ConfigurationDefinition("sysset", MSG.view_adminConfig_systemSettings());

        PropertyGroupDefinition generalGroup = new PropertyGroupDefinition("general");
        generalGroup.setDisplayName(MSG.view_admin_systemSettings_group_general());
        generalGroup.setDefaultHidden(false);
        generalGroup.setOrder(0);

        PropertyGroupDefinition dataManagerGroup = new PropertyGroupDefinition("datamanager");
        dataManagerGroup.setDisplayName(MSG.view_admin_systemSettings_group_dataMgr());
        dataManagerGroup.setDefaultHidden(false);
        dataManagerGroup.setOrder(1);

        PropertyGroupDefinition baselineGroup = new PropertyGroupDefinition("baseline");
        baselineGroup.setDisplayName(MSG.view_admin_systemSettings_group_baseline());
        baselineGroup.setDefaultHidden(false);
        baselineGroup.setOrder(2);

        PropertyGroupDefinition ldapGroup = new PropertyGroupDefinition("ldap");
        ldapGroup.setDisplayName(MSG.view_admin_systemSettings_group_ldap());
        ldapGroup.setDefaultHidden(!Boolean.parseBoolean(config.getSimpleValue(
            SystemSetting.LDAP_BASED_JAAS_PROVIDER.getInternalName(), "false"))); // show if LDAP is in use
        ldapGroup.setOrder(3);

        PropertyGroupDefinition driftGroup = new PropertyGroupDefinition("drift");
        driftGroup.setDisplayName(MSG.view_admin_systemSettings_group_drift());
        driftGroup.setOrder(4);
        driftGroup.setDefaultHidden(false);

        PropertyGroupDefinition proxyGroup = new PropertyGroupDefinition("proxy");
        proxyGroup.setDisplayName(MSG.view_admin_systemSettings_group_HttpProxy());
        proxyGroup.setOrder(5);
        proxyGroup.setDefaultHidden(false);

        for (SystemSetting prop : SystemSetting.values()) {

            //don't include the readonly properties in the configuration editor
            if (prop.isReadOnly()) {
View Full Code Here

            enumeratedString.addEnumeratedValues(new PropertyDefinitionEnumeration("Local", "local"),
                new PropertyDefinitionEnumeration("JSR160", "jsr160"), new PropertyDefinitionEnumeration("JBoss",
                    "jboss"));
            enumeratedString.setAllowCustomEnumeratedValue(true);

            PropertyGroupDefinition basicGroup = new PropertyGroupDefinition("Basic Group");
            enumeratedString.setPropertyGroupDefinition(basicGroup);

            definition.put(enumeratedString);

            PropertyDefinitionSimple secondGroupedProperty = new PropertyDefinitionSimple("SimpleBool", "bool", false,
View Full Code Here

TOP

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

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.