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

Examples of org.rhq.core.domain.configuration.definition.ConfigurationDefinition$GroupComparator


    }

    @Override
    public ConfigurationDefinition getConfigurationDefinitionForSender(String sender) throws RuntimeException {
        try {
            ConfigurationDefinition results = alertNotifManager.getConfigurationDefinitionForSender(sender);
            return SerialUtility.prepare(results, "getConfigurationDefinitionForSender");
        } catch (Throwable t) {
            throw getExceptionToThrowToClient(t);
        }
    }
View Full Code Here


   
    public static ServerPlugin getPlugin(URL pluginUrl, ServerPluginDescriptorType pluginDescriptor) {
        try {
            Configuration pluginConfig = null;
            Configuration scheduledJobsConfig = null;
            ConfigurationDefinition configDef;

            configDef = ServerPluginDescriptorMetadataParser.getPluginConfigurationDefinition(pluginDescriptor);
            if (configDef != null) {
                pluginConfig = configDef.getDefaultTemplate().createConfiguration();
            }

            configDef = ServerPluginDescriptorMetadataParser.getScheduledJobsDefinition(pluginDescriptor);
            if (configDef != null) {
                scheduledJobsConfig = configDef.getDefaultTemplate().createConfiguration();
            }

            File pluginFile = new File(pluginUrl.toURI());
            PluginKey pluginKey = PluginKey.createServerPluginKey(new ServerPluginType(pluginDescriptor).stringify(), pluginDescriptor.getName());
            ServerPlugin plugin =
View Full Code Here

        return;
    }

    private Configuration getDefaultPluginConfiguration(ServerPluginDescriptorType descriptor) throws Exception {
        Configuration defaults = null;
        ConfigurationDefinition def = ServerPluginDescriptorMetadataParser.getPluginConfigurationDefinition(descriptor);
        if (def != null) {
            defaults = createDefaultConfiguration(def);
        }
        return defaults;
    }
View Full Code Here

        return defaults;
    }

    private Configuration getDefaultScheduledJobsConfiguration(ServerPluginDescriptorType descriptor) throws Exception {
        Configuration defaults = null;
        ConfigurationDefinition def = ServerPluginDescriptorMetadataParser.getScheduledJobsDefinition(descriptor);
        if (def != null) {
            defaults = createDefaultConfiguration(def);
        }
        return defaults;
    }
View Full Code Here

        return;
    }

    private void updateConfigurationDefinition(ContentSourceType newType, ContentSourceType existingType) {
        ConfigurationDefinition newConfigDef = newType.getContentSourceConfigurationDefinition();
        ConfigurationDefinition existingConfigDef = existingType.getContentSourceConfigurationDefinition();

        if (newConfigDef != null) {
            if (existingConfigDef == null) {
                // everything is new
                entityManager.persist(newConfigDef);
View Full Code Here

        log.debug("Retrieved and sent [" + numBytes + "] bytes for [" + distFile.getRelativeFilename() + "]");
        return numBytes;
    }

    private void obfuscatePasswords(ContentSource contentSource) {
        ConfigurationDefinition configurationDefinition = contentSource.getContentSourceType().getContentSourceConfigurationDefinition();
        if (configurationDefinition == null) {
            ContentSourceType attachedContentSourceType = getContentSourceType(contentSource.getContentSourceType().getName());
            configurationDefinition = attachedContentSourceType.getContentSourceConfigurationDefinition();
        }
       
View Full Code Here

        this.configuration = configuration;
    }

    protected Configuration lookupConfiguration() {
        try {
            ConfigurationDefinition definition = lookupConfigurationDefinition();

            // call a SLSB method to get around lazy initialization of configDefs and configTemplates
            Configuration configuration = configurationManager.getConfigurationFromDefaultTemplate(definition);
            Configuration newConfiguration = configuration.deepCopy(false);
View Full Code Here

        try {
            Subject subject = EnterpriseFacesContextUtility.getSubject();
            int operationId = Integer.valueOf(FacesContextUtility.getRequiredRequestParameter("opId"));

            OperationDefinition operationDefinition = operationManager.getOperationDefinition(subject, operationId);
            ConfigurationDefinition definition = operationDefinition.getParametersConfigurationDefinition();

            return definition;
        } catch (Exception e) {
            return null;
        }
View Full Code Here

                .getServerPluginDescriptor(key);
            //ConfigurationDefinition pluginConfigurationDefinition = ConfigurationMetadataParser.parse("pc:" + pluginName, descriptor.getPluginConfiguration());
            ConfigurationDescriptor alertConfiguration = descriptor.getAlertConfiguration();
            if (alertConfiguration==null || alertConfiguration.getConfigurationProperty()== null || alertConfiguration.getConfigurationProperty().isEmpty()) {
                // User either provided no <alert-configuration> or an empty one
                return new ConfigurationDefinition("alerts:"+pluginName,"No properties given");
            }
            else {
                ConfigurationDefinition pluginConfigurationDefinition = ConfigurationMetadataParser.parse("alerts:"
                    + pluginName, alertConfiguration);

                return pluginConfigurationDefinition;
            }
        } catch (Exception e) {
View Full Code Here

    private BundleDeployment createBundleDeploymentImpl(Subject subject, BundleVersion bundleVersion,
        BundleDestination bundleDestination, String name, String description, Configuration configuration)
        throws Exception {

        ConfigurationDefinition configDef = bundleVersion.getConfigurationDefinition();
        if (null != configDef) {
            if (null == configuration) {
                throw new IllegalArgumentException(
                    "Missing Configuration. Configuration is required when the specified BundleVersion defines Configuration Properties.");
            }
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.configuration.definition.ConfigurationDefinition$GroupComparator

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.