Package org.apache.geronimo.system.plugin

Examples of org.apache.geronimo.system.plugin.Farm


     * @exception Exception
     */
    protected Object doExecute(ServerConnection connection) throws Exception {

        DeploymentManager deploymentManager = connection.getDeploymentManager();
        Farm farm = (Farm)((GeronimoDeploymentManager)deploymentManager).getImplementation(Farm.class);
        Map<String, DownloadResults> results;
        if (action == "add") {
            if (clusterName != null && pluginList != null && plugin != null) {
                results = farm.addPluginToCluster(clusterName, pluginList, plugin);
            } else if (clusterName != null && pluginList != null) {
                results = farm.addPluginList(clusterName, pluginList);
            } else if (pluginList != null && plugin != null) {
                results = farm.addPlugin(pluginList, plugin);
            } else {
                println("add requires -c <cluster> and -l <plugin list name>, -l <plugin list name> and -a <plugin>, or all three");
                return null;
            }
        } else if (action == "remove") {
            if (clusterName != null && pluginList != null && plugin != null) {
                println("remove requires -c <cluster> and -l <plugin list name>, or -l <plugin list name> and -a <plugin>, but not all three");
                return null;
            } else if (clusterName != null && pluginList != null) {
                results = farm.removePluginListFromCluster(clusterName, pluginList);
            } else if (pluginList != null && plugin != null) {
                results = farm.removePluginFromPluginList(pluginList, plugin);
            } else {
                println("remove requires -c <cluster> and -l <plugin list name>, or -l <plugin list> and -a <plugin>");
                return null;
            }
        } else {
View Full Code Here


     * @exception Exception
     */
    protected Object doExecute(ServerConnection connection) throws Exception {

        DeploymentManager deploymentManager = connection.getDeploymentManager();
        Farm farm = (Farm)((GeronimoDeploymentManager)deploymentManager).getImplementation(Farm.class);
        Map<String, DownloadResults> results;
        if (action == "add") {
            if (clusterName != null && pluginList != null && plugin != null) {
                results = farm.addPluginToCluster(clusterName, pluginList, plugin);
            } else if (clusterName != null && pluginList != null) {
                results = farm.addPluginList(clusterName, pluginList);
            } else if (pluginList != null && plugin != null) {
                results = farm.addPlugin(pluginList, plugin);
            } else {
                println("add requires -c <cluster> and -l <plugin list name>, -l <plugin list name> and -a <plugin>, or all three");
                return null;
            }
        } else if (action == "remove") {
            if (clusterName != null && pluginList != null && plugin != null) {
                println("remove requires -c <cluster> and -l <plugin list name>, or -l <plugin list name> and -a <plugin>, but not all three");
                return null;
            } else if (clusterName != null && pluginList != null) {
                results = farm.removePluginListFromCluster(clusterName, pluginList);
            } else if (pluginList != null && plugin != null) {
                results = farm.removePluginFromPluginList(pluginList, plugin);
            } else {
                println("remove requires -c <cluster> and -l <plugin list name>, or -l <plugin list> and -a <plugin>");
                return null;
            }
        } else {
View Full Code Here

TOP

Related Classes of org.apache.geronimo.system.plugin.Farm

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.