Package org.rhq.enterprise.server.configuration

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


        processGroupConfigurationUpdate(configurationGroupUpdateId, subject);
    }

    private void processGroupConfigurationUpdate(Integer groupConfigurationUpdateId, Subject subject) {
        ConfigurationManagerLocal configurationManager = LookupUtil.getConfigurationManager();

        String errorMessages = null;
        try {
            long childPluginConfigurationUpdateCount = getConfigurationUpdateCount(groupConfigurationUpdateId,
                configurationManager);
View Full Code Here


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

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

        return latestConfigurationUpdate;
    }
View Full Code Here

        return items;
    }

    private ConfigurationDefinition lookupConfigurationDefinition(int resourceTypeId) {
        Subject user = EnterpriseFacesContextUtility.getSubject();
        ConfigurationManagerLocal configurationManager = LookupUtil.getConfigurationManager();
        ConfigurationDefinition configurationDefinition = configurationManager
            .getResourceConfigurationDefinitionWithTemplatesForResourceType(user, resourceTypeId);
        return configurationDefinition;
    }
View Full Code Here

    protected Configuration persistConfiguration(Configuration config) {

        if (config == null)
            return null;

        ConfigurationManagerLocal mgr = LookupUtil.getConfigurationManager();
        config = mgr.mergeConfiguration(config);

        return config;

    }
View Full Code Here

        return dataModel;
    }

    public String delete() {
        Subject subject = EnterpriseFacesContextUtility.getSubject();
        ConfigurationManagerLocal manager = LookupUtil.getConfigurationManager();

        String[] selectedItems = FacesContextUtility.getRequest().getParameterValues("selectedItems");

        List<String> success = new ArrayList<String>();
        Map<String, String> failure = new HashMap<String, String>();

        String next = null;
        Integer doomed;
        for (int i = 0; i < selectedItems.length; i++) {
            try {
                next = selectedItems[i];
                doomed = Integer.valueOf(next);

                manager.purgePluginConfigurationUpdate(subject, doomed, true);

                success.add(next);
            } catch (Exception e) {
                failure.put(next, ThrowableUtil.getAllMessages(e, true));
            }
View Full Code Here

        @Override
        public PageList<PluginConfigurationUpdate> fetchPage(PageControl pc) {
            Subject subject = EnterpriseFacesContextUtility.getSubject();
            Resource requestResource = EnterpriseFacesContextUtility.getResourceIfExists();
            ConfigurationManagerLocal manager = LookupUtil.getConfigurationManager();

            if (requestResource == null) {
                requestResource = resource; // request not associated with a resource - use the resource we used before
            } else {
                resource = requestResource; // request switched the resource this UI bean is using
            }

            PageList<PluginConfigurationUpdate> result;
            result = manager.findPluginConfigurationUpdates(subject, requestResource.getId(), null, null, pc);

            return result;
        }
View Full Code Here

        if ((getVersion() == null) || (getVersion().trim().length() == 0)) {
            FacesContextUtility.addMessage(FacesMessage.SEVERITY_ERROR, "A package version must be specified.");
            return null;
        }

        ConfigurationManagerLocal configurationManager = LookupUtil.getConfigurationManager();
        ConfigurationDefinition pluginConfigurationDefinition = configurationManager
            .getPluginConfigurationDefinitionForResourceType(user, resourceType.getId());

        Configuration pluginConfiguration = null;
        if (pluginConfigurationDefinition != null) {
            pluginConfiguration = pluginConfigurationDefinition.getDefaultTemplate().getConfiguration();
View Full Code Here

    }

    private void loadResourceConfigurationDefinition() {
        int resourceTypeId = EnterpriseFacesContextUtility.getResource().getResourceType().getId();

        ConfigurationManagerLocal configurationManager = LookupUtil.getConfigurationManager();

        resourceConfigurationDefinition = configurationManager.getResourceConfigurationDefinitionForResourceType(
            loggedInUser.getSubject(), resourceTypeId);
    }
View Full Code Here

    }

    private void loadResourceConfiguration() {
        Subject subject = loggedInUser.getSubject();

        ConfigurationManagerLocal configurationManager = LookupUtil.getConfigurationManager();

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

    public boolean isUpdateInProgress() {
        if (!isInitialized()) {
            return false;
        }

        ConfigurationManagerLocal configurationMgr = LookupUtil.getConfigurationManager();
        return configurationMgr.isResourceConfigurationUpdateInProgress(loggedInUser.getSubject(), resourceId);
    }
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.