Package org.rhq.core.domain.plugin

Examples of org.rhq.core.domain.plugin.CannedGroupAddition


        DeploymentRunnable result = runnableMap.get(pluginName);
        if (result == null) {
            DeploymentInfo deploymentInfo = this.deploymentInfos.get(pluginName);
            PluginDescriptor descriptor = this.metadataManager.getPluginDescriptor(pluginName);
            CannedGroupAddition addition = PluginAdditionsReader.getCannedGroupsAddition(deploymentInfo.url, pluginName);
            if ((null != deploymentInfo) && (null != descriptor)) {
                result = new DeploymentRunnable(pluginName, deploymentInfo, descriptor, addition);
                runnableMap.put(pluginName, result);
            }
        }
View Full Code Here


    private static CannedGroupAddition parseCGAdditions(CannedGroupExpressions descriptor, String plugin) {
        if (descriptor == null) {
            return null;
        }
        CannedGroupAddition addition = new CannedGroupAddition();
       
        for (CannedGroupExpressions.Definition def : descriptor.getGroupDefinitions()) {
            CannedGroupExpression cge = new CannedGroupExpression();
            cge.setId(def.getId());
            cge.setName(def.getName());
            cge.setPlugin(plugin);
            cge.setCreateByDefault(def.isCreateByDefault());
            cge.setDescription(def.getDescription());
            cge.setExpression(def.getExpression());
            cge.setRecalcInMinutes(def.getRecalcInMinutes().intValue());
            if (validateCGE(cge)) {
                addition.getExpressions().add(cge);
            }
        }
        return addition;
    }
View Full Code Here

        for (Plugin plugin : this.getInstalledPlugins()) {
            if (plugin.getDeployment().equals(PluginDeploymentType.AGENT)) {
                File pluginFile = new File(pluginDir, plugin.getPath());
                try {
                    URL pluginUrl = pluginFile.toURI().toURL();
                    CannedGroupAddition addition = PluginAdditionsReader.getCannedGroupsAddition(pluginUrl, plugin.getName());
                    if (addition != null) {
                        list.addAll(addition.getExpressions());
                    }
                } catch (Exception e) {
                    log.error("Failed to parse plugin addition found in plugin [" + pluginFile.getAbsolutePath() + "]",e);
                }
            }
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.plugin.CannedGroupAddition

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.