Package org.rhq.enterprise.server.configuration

Examples of org.rhq.enterprise.server.configuration.ConfigurationManagerLocal


//    @Unwrap
    public ConfigurationDefinition lookupResourceConfigurationDefinition() {
        int resourceTypeId = EnterpriseFacesContextUtility.getResource().getResourceType().getId();

        ConfigurationManagerLocal configurationManager = LookupUtil.getConfigurationManager();

        ConfigurationDefinition configurationDefinition =
                configurationManager.getResourceConfigurationDefinitionForResourceType(
                        EnterpriseFacesContextUtility.getSubject(), resourceTypeId);
       
        return configurationDefinition;
    }
View Full Code Here


//    @Create
    public void loadResourceConfiguration() {
        Subject subject = EnterpriseFacesContextUtility.getSubject();

        ConfigurationManagerLocal configurationManager = LookupUtil.getConfigurationManager();

        AbstractResourceConfigurationUpdate configurationUpdate =
                configurationManager.getLatestResourceConfigurationUpdate(subject, resourceId);
        Configuration configuration = (configurationUpdate != null) ? configurationUpdate.getConfiguration() : null;
    }
View Full Code Here

//    @Unwrap
    public Configuration lookupResourceConfiguration() {
        Subject subject = EnterpriseFacesContextUtility.getSubject();

        ConfigurationManagerLocal configurationManager = LookupUtil.getConfigurationManager();

        AbstractResourceConfigurationUpdate configurationUpdate =
                configurationManager.getLatestResourceConfigurationUpdate(subject, resourceId);
        Configuration configuration = (configurationUpdate != null) ? configurationUpdate.getConfiguration() : null;

        return configuration;
    }
View Full Code Here

        }

        @Override
        public PageList<GroupPluginConfigurationUpdate> fetchPage(PageControl pc) {
            ResourceGroup requestResourceGroup = EnterpriseFacesContextUtility.getResourceGroup();
            ConfigurationManagerLocal configurationManager = LookupUtil.getConfigurationManager();

            if (requestResourceGroup == null) {
                requestResourceGroup = resourceGroup;
            } else {
                resourceGroup = requestResourceGroup;
            }

            PageList<GroupPluginConfigurationUpdate> results = null;
            results = configurationManager.findGroupPluginConfigurationUpdates(
                requestResourceGroup.getId(), pc);
            return results;
        }
View Full Code Here

            uiBean.setRawConfiguration(raw);
        }
    }

    private Configuration translateToRaw() {
        ConfigurationManagerLocal configurationMgr = LookupUtil.getConfigurationManager();
        return configurationMgr.translateResourceConfiguration(loggedInUser.getSubject(), resourceId,
            resourceConfiguration, STRUCTURED_MODE);
    }
View Full Code Here

            uiBean.setRawConfiguration(raw);
        }
    }

    private Configuration translateToStructured() {
        ConfigurationManagerLocal configurationMgr = LookupUtil.getConfigurationManager();
        return configurationMgr.translateResourceConfiguration(loggedInUser.getSubject(), resourceId,
            resourceConfiguration, RAW_MODE);
    }
View Full Code Here

    public boolean getRenderFileUpload() {
        return isRawSupported() || isStructuredAndRawSupported();
    }

    public String updateConfiguration() {
        ConfigurationManagerLocal configurationMgr = LookupUtil.getConfigurationManager();

        try {
            AbstractResourceConfigurationUpdate updateRequest;

            if (isStructuredAndRawSupported()) {
                updateRequest = configurationMgr.updateStructuredOrRawConfiguration(loggedInUser.getSubject(),
                    resourceId, resourceConfiguration, isStructuredMode());               
            }
            else {
                updateRequest = configurationMgr.updateResourceConfiguration(loggedInUser.getSubject(),
                    resourceId, resourceConfiguration);
            }

            clearErrors();
View Full Code Here

                    preferences.put(tokenProp);
                }
                else {
                    tokenProp.setStringValue(token);
                }
                ConfigurationManagerLocal mgr = LookupUtil.getConfigurationManager();
                mgr.mergeConfiguration(preferences);

            } catch (Exception e) {
                log.error("Error while retrieving a token: " + e.getMessage());
                throw e;
            }
View Full Code Here

    public AbstractResourceConfigurationUpdate getLatestConfigurationUpdate() {
        if (latestConfigurationUpdate == null) {
            Subject subject = EnterpriseFacesContextUtility.getSubject();
            Resource resource = EnterpriseFacesContextUtility.getResource();
            ConfigurationManagerLocal manager = LookupUtil.getConfigurationManager();

            latestConfigurationUpdate = manager.getLatestResourceConfigurationUpdate(subject, resource.getId());
        }

        return latestConfigurationUpdate;
    }
View Full Code Here

        try {
            rollbackTo = FacesContextUtility.getRequest().getParameter("selectedItems");

            Subject subject = EnterpriseFacesContextUtility.getSubject();
            Resource resource = EnterpriseFacesContextUtility.getResource();
            ConfigurationManagerLocal manager = LookupUtil.getConfigurationManager();

            manager.rollbackResourceConfiguration(subject, resource.getId(), Integer.parseInt(rollbackTo));

            FacesContextUtility.addMessage(FacesMessage.SEVERITY_INFO, "Rolled back resource configuration to version "
                + rollbackTo);
        } catch (Exception e) {
            FacesContextUtility.addMessage(FacesMessage.SEVERITY_ERROR,
View Full Code Here

TOP

Related Classes of org.rhq.enterprise.server.configuration.ConfigurationManagerLocal

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.