Package org.rhq.core.pluginapi.configuration

Examples of org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport


        assertLoadingOfConfiguration(config, mBeanName, mBeanName);

        assert config != null : "Configuration should not be null loading updateTopic";
        config = createConfiguration(mBeanName);

        ConfigurationUpdateReport updateReport = new ConfigurationUpdateReport(config);
        xmlEditor.updateConfiguration(xmlFile, mBeanName, updateReport);

        config = xmlEditor.loadConfiguration(xmlFile, mBeanName);
        assert config != null : "configuration object should not be null";
View Full Code Here


        if (isAugeasAvailable()) {
            resourceConfig = super.loadResourceConfiguration();
        } else {
            resourceConfig = new NonAugeasHostsConfigurationDelegate(this).loadResourceConfiguration();
            // This will add error messages to any PropertySimples with invalid values, so they can be displayed by the GUI.
            validateResourceConfiguration(new ConfigurationUpdateReport(resourceConfig));
        }
        return resourceConfig;
    }
View Full Code Here

            if (targetTypeName.equals("ServerGroup")) {
                PropertyList sysProperties = rc.getList("*2");
                if (sysProperties != null && !sysProperties.getList().isEmpty()) {
                    // because AS7 does not allow us to pass system properties while creating server-group we must do it now
                    ConfigurationUpdateReport rep = new ConfigurationUpdateReport(rc);
                    ConfigurationDefinition configDef = report.getResourceType().getResourceConfigurationDefinition();
                    ConfigurationWriteDelegate delegate = new ConfigurationWriteDelegate(configDef, getASConnection(),
                        targetAddress);
                    delegate.updateResourceConfiguration(rep);
                    if (ConfigurationUpdateStatus.FAILURE.equals(rep.getStatus())) {
                        report.setStatus(CreateResourceStatus.FAILURE);
                        report.setErrorMessage("Failed to additionally configure server group: "
                            + rep.getErrorMessage());
                    }
                }
            }
        } else {
            report.setErrorMessage(res.getFailureDescription());
View Full Code Here

        }

        // Since our properties are can be added at parent resource creation time, we have to make sure they are added.
        if (report.getStatus() == CreateResourceStatus.SUCCESS) {
            // Now we have to send this as an update, so the properties are created properly
            ConfigurationUpdateReport updateReport = new ConfigurationUpdateReport(report.getResourceConfiguration());
            ConfigurationDefinition configDef = report.getResourceType().getResourceConfigurationDefinition();
            Address address = new Address(getAddress());
            address.add(report.getPluginConfiguration().getSimpleValue("path"),report.getUserSpecifiedResourceName());
            ConfigurationWriteDelegate delegate = new ConfigurationWriteDelegate(configDef, getASConnection(), address);
            delegate.updateResourceConfiguration(updateReport);

            if (updateReport.getStatus() != ConfigurationUpdateStatus.SUCCESS) {
                report.setErrorMessage(updateReport.getErrorMessage());
                report.setStatus(CreateResourceStatus.FAILURE);
            }
        }
        return report;
    }
View Full Code Here

         report = super.createResource(report);

        // Since our properties are can be added at parent resource creation time, we have to make sure they are added.
        if (report.getStatus() == CreateResourceStatus.SUCCESS) {
            // Now we have to send this as an update, so the properties are created properly
            ConfigurationUpdateReport updateReport = new ConfigurationUpdateReport(report.getResourceConfiguration());
            ConfigurationDefinition configDef = report.getResourceType().getResourceConfigurationDefinition();
            Address address = new Address(getAddress());
            address.add(report.getPluginConfiguration().getSimpleValue("path"),report.getUserSpecifiedResourceName());
            ConfigurationWriteDelegate delegate = new ConfigurationWriteDelegate(configDef, getASConnection(), address);
            delegate.updateResourceConfiguration(updateReport);

            if (updateReport.getStatus() != ConfigurationUpdateStatus.SUCCESS) {
                report.setErrorMessage(updateReport.getErrorMessage());
                report.setStatus(CreateResourceStatus.FAILURE);
            }
        }
        return report;
    }
View Full Code Here

TOP

Related Classes of org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport

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.