Package org.rhq.core.domain.configuration

Examples of org.rhq.core.domain.configuration.Configuration$Builder$MapInList


            BundleTargetDescriptor bundleTarget = resourceDescriptor.getBundleTarget();
            if (bundleTarget != null) {
                List<BundleDestination> destDefs = bundleTarget.getDestinationBaseDirOrDestinationDefinition();
                if (destDefs != null && destDefs.size() > 0) {
                    Configuration c = new Configuration();
                    ResourceTypeBundleConfiguration bundleConfiguration = new ResourceTypeBundleConfiguration(c);
                    for (BundleDestination destDef : destDefs) {
                        if (destDef instanceof BundleDestinationBaseDir) {
                            BundleDestinationBaseDir destBaseDir = (BundleDestinationBaseDir) destDef;
                            String name = destBaseDir.getName();
View Full Code Here


public class DriftMetadataParser {

    public DriftDefinitionTemplate parseDriftMetadata(DriftDescriptor descriptor) {
        DriftDefinitionTemplate template = new DriftDefinitionTemplate();
        template.setUserDefined(false);
        template.setTemplateDefinition(new DriftDefinition(new Configuration()));

        initName(descriptor, template);
        initDescription(descriptor, template);
        initEnabled(template);
        initBasedir(descriptor, template);
View Full Code Here

        template.getConfiguration().put(basedirMap);
    }

    private void initInterval(DriftDescriptor descriptor, DriftDefinitionTemplate template) {
        Configuration config = template.getConfiguration();
        if (descriptor.getInterval() == null) {
            config.put(new PropertySimple(DriftConfigurationDefinition.PROP_INTERVAL, String
                .valueOf(DriftConfigurationDefinition.DEFAULT_INTERVAL)));
        } else {
            config.put(new PropertySimple(DriftConfigurationDefinition.PROP_INTERVAL, descriptor.getInterval()));
        }
    }
View Full Code Here

        }
    }

    private void initIncludes(DriftDescriptor descriptor, DriftDefinitionTemplate template) {
        if (descriptor.getIncludes() != null && descriptor.getIncludes().getInclude().size() > 0) {
            Configuration config = template.getConfiguration();
            PropertyList includes = new PropertyList(DriftConfigurationDefinition.PROP_INCLUDES);

            for (DriftFilterDescriptor include : descriptor.getIncludes().getInclude()) {
                PropertyMap includeMap = new PropertyMap(DriftConfigurationDefinition.PROP_INCLUDES_INCLUDE);
                includeMap.put(new PropertySimple(DriftConfigurationDefinition.PROP_PATH, include.getPath()));
                includeMap.put(new PropertySimple(DriftConfigurationDefinition.PROP_PATTERN, include.getPattern()));

                includes.add(includeMap);
            }
            config.put(includes);
        }
    }
View Full Code Here

        }
    }

    private void initExcludes(DriftDescriptor descriptor, DriftDefinitionTemplate template) {
        if (descriptor.getExcludes() != null && descriptor.getExcludes().getExclude().size() > 0) {
            Configuration config = template.getConfiguration();
            PropertyList excludes = new PropertyList(DriftConfigurationDefinition.PROP_EXCLUDES);

            for (DriftFilterDescriptor exclude : descriptor.getExcludes().getExclude()) {
                PropertyMap excludeMap = new PropertyMap(DriftConfigurationDefinition.PROP_EXCLUDES_EXCLUDE);
                excludeMap.put(new PropertySimple(DriftConfigurationDefinition.PROP_PATH, exclude.getPath()));
                excludeMap.put(new PropertySimple(DriftConfigurationDefinition.PROP_PATTERN, exclude.getPattern()));

                excludes.add(excludeMap);
            }
            config.put(excludes);
        }
    }
View Full Code Here

        }

        ConfigurationTemplate defaultTemplate = initDefaultTemplate(configurationDefinition);
        configurationDefinition.putTemplate(defaultTemplate);

        Configuration defaultConfiguration = defaultTemplate.getConfiguration();
        parseProperties(descriptor, defaultConfiguration, configurationDefinition);
        ConfigurationUtility.normalizeConfiguration(defaultConfiguration, configurationDefinition);

        return configurationDefinition;
    }
View Full Code Here

        ConfigurationTemplate defaultTemplate = configurationDefinition.getDefaultTemplate();
        if (defaultTemplate == null) {
            // TODO: Not everything should have a default template... only stuff that has default values
            defaultTemplate = new ConfigurationTemplate(ConfigurationTemplate.DEFAULT_TEMPLATE_NAME,
                "the default template");
            Configuration defaultConfiguration = new Configuration();
            defaultTemplate.setConfiguration(defaultConfiguration);
        }

        defaultTemplate.setDefault(true);
        return defaultTemplate;
View Full Code Here

    private static ConfigurationTemplate parseTemplate(ConfigurationTemplateDescriptor templateDescriptor)
        throws InvalidPluginDescriptorException {
        ConfigurationTemplate template = new ConfigurationTemplate(templateDescriptor.getName(),
            templateDescriptor.getDescription());
        Configuration templateConfiguration = new Configuration();
        template.setConfiguration(templateConfiguration);

        parseProperties(templateDescriptor, templateConfiguration, null);
        return template;
    }
View Full Code Here

            list.add(idx, replacement);
        } else if (prop.getParentMap() != null) {
            Map<String, Property> map = prop.getParentMap().getMap();
            replaceInMap(replacement, map);
        } else {           
            Configuration conf = prop.getConfiguration();
            replaceInMap(replacement, conf.getMap());
        }
    }
View Full Code Here

         *
         * (ips, 02/13/09): This is a temporary workaround - we don't really need to store a Configuration at all,
         *      since it can be recalculated from the member configs when needed, but the AbstractConfigurationUpdate
         *      base class requires the configuration field to be non-null.
         */
        this.configuration = new Configuration();
    }
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.configuration.Configuration$Builder$MapInList

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.