Examples of PluginManagerLocal


Examples of org.rhq.enterprise.server.resource.metadata.PluginManagerLocal

        return new File(tmpdirRoot, this.getClass().getSimpleName());
    }

    protected void ackDeletedPlugins() {
        Subject overlord = LookupUtil.getSubjectManager().getOverlord();
        PluginManagerLocal pluginMgr = LookupUtil.getPluginManager();
        for(Server server : LookupUtil.getTopologyManager().findServersByCriteria(overlord, new ServerCriteria())) {
            pluginMgr.acknowledgeDeletedPluginsBy(server.getId());
        }
    }
View Full Code Here

Examples of org.rhq.enterprise.server.resource.metadata.PluginManagerLocal

        if (deploymentInfo == null) {
            throw new IllegalStateException("DeploymentInfo was not found for plugin [" + pluginName
                + " ] - it should have been initialized by preprocessPlugin().");
        }

        PluginManagerLocal pluginMgr = LookupUtil.getPluginManager();
        Plugin plugin = pluginMgr.getPlugin(pluginName);
        if (null == plugin) {
            log.debug("New plugin [" + pluginName + "] detected.");
            return true;
        }
View Full Code Here

Examples of org.rhq.enterprise.server.resource.metadata.PluginManagerLocal

            plugin.setMD5(MessageDigestGenerator.getDigestString(localPluginFile));

            // this manager is responsible for handling the munging of plugins that depend on other plugins
            // since we assume we are called in the proper deployment order, this should not fail
            // if we are called when hot-deploying a plugin whose dependencies aren't deployed, this will fail
            PluginManagerLocal pluginMgr = LookupUtil.getPluginManager();
            pluginMgr.registerPlugin(plugin, pluginDescriptor, localPluginFile, forceUpdate);
            if (addition!=null) {
                GroupDefinitionManagerLocal groupDefMgr = LookupUtil.getGroupDefinitionManager();
                groupDefMgr.updateGroupsByCannedExpressions(pluginName, addition.getExpressions());
            }
        } catch (Exception e) {
View Full Code Here

Examples of org.rhq.enterprise.server.resource.metadata.PluginManagerLocal

        purgeAgentPlugins();
        purgeServerPlugins();
    }

    private void purgeAgentPlugins() {
        PluginManagerLocal pluginMgr = LookupUtil.getPluginManager();
        List<Plugin> plugins = pluginMgr.findAllDeletedPlugins();
        List<Plugin> pluginsToPurge = new ArrayList<Plugin>();

        for (Plugin plugin : plugins) {
            if (pluginMgr.isReadyForPurge(plugin)) {
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Preparing to purge plugin [" + plugin.getName() + "]");
                }
                pluginsToPurge.add(plugin);
            }
        }

        if (!pluginsToPurge.isEmpty()) {
            pluginMgr.purgePlugins(pluginsToPurge);
        }
    }
View Full Code Here

Examples of org.rhq.enterprise.server.resource.metadata.PluginManagerLocal

public class DeployedAgentPluginsValidatorTest extends JMockTest {

    private static final Log LOG = LogFactory.getLog(DeployedAgentPluginsValidator.class);
   
    public void testCanExportAndImportState() throws Exception {
        final PluginManagerLocal pluginManager = context.mock(PluginManagerLocal.class);
       
        final DeployedAgentPluginsValidator validator = new DeployedAgentPluginsValidator(pluginManager);
       
        context.checking(new Expectations() {
            {
View Full Code Here

Examples of org.rhq.enterprise.server.resource.metadata.PluginManagerLocal

            output.close();
        }
    }
   
    public void testDetectsPluginDifferencies() {
        final PluginManagerLocal pluginManager = context.mock(PluginManagerLocal.class);
       
        //this is what we are going to return from the mocked plugin manager
        final List<Plugin> installedPlugins = new ArrayList<Plugin>(getDeployedPlugins());
       
        context.checking(new Expectations() {
View Full Code Here

Examples of org.rhq.enterprise.server.resource.metadata.PluginManagerLocal

            //ok
        }       
    }
   
    public void testAllValidatorsEqual() {
        PluginManagerLocal pluginManager = context.mock(PluginManagerLocal.class);
       
        DeployedAgentPluginsValidator v1 = new DeployedAgentPluginsValidator(pluginManager);
        DeployedAgentPluginsValidator v2 = new DeployedAgentPluginsValidator(pluginManager);
        DeployedAgentPluginsValidator v3 = new DeployedAgentPluginsValidator(pluginManager);
        Object o = new Object();
View Full Code Here

Examples of org.rhq.enterprise.server.resource.metadata.PluginManagerLocal

            DeploymentInfo di = new DeploymentInfo(updatedFile.toURI().toURL());
            log.debug("Scan detected agent plugin [" + di.url + "]...");
            this.scanned.add(di);
        }

        PluginManagerLocal pluginMgr = LookupUtil.getPluginManager();
        ServerManagerLocal serverMgr = LookupUtil.getServerManager();
        Server thisServer = serverMgr.getServer();

        pluginMgr.acknowledgeDeletedPluginsBy(thisServer.getId());

        return;
    }
View Full Code Here

Examples of org.rhq.enterprise.server.resource.metadata.PluginManagerLocal

            }
        }
    }

    List<Plugin> getDeletedPlugins() {
        PluginManagerLocal pluginMgr = LookupUtil.getPluginManager();
        return pluginMgr.findAllDeletedPlugins();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.