Package org.apache.geronimo.management.geronimo

Examples of org.apache.geronimo.management.geronimo.WebModule


            List list = model.getWebApps();
            for (int i = 0; i < webApps.length; i++) {
                ConfigurationData app = webApps[i];
                WebAppData data = new WebAppData(app.getParentName().getArtifact(), app.getChildName(), app.getModuleBeanName() == null ? null : app.getModuleBeanName(), false, null, false);
                if (app.isRunning()) {
                    WebModule web = (WebModule) PortletManager.getManagedBean(request, app.getModuleBeanName());
                    data.setContextRoot(web.getContextPath());
                    String path;
                    if(web.getWARDirectory().getProtocol().equals("file")) {
                        path = web.getWARDirectory().getPath();
                    } else {
                        path = "WARMustBeUnpacked";
                    }

                    data.setWebAppDir(path);
View Full Code Here


                    ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(), info.getState());
                    try {
                        AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                        boolean loaded = loadModule(configManager, configObjName);

                        WebModule webModule = (WebModule) PortletManager.getModule(renderRequest, info.getConfigID());
                        if (webModule != null) {
                            details.getContextPaths().add(webModule.getContextPath());
                        }

                        addDependencies(details, configObjName);
                        if (loaded) {
                            unloadModule(configManager, configObjName);
                        }
                    } catch (InvalidConfigException ice) {
                        // Should not occur
                        ice.printStackTrace();
                    }
                    moduleDetails.add(details);
                } else if (info.getType().getValue() == ConfigurationModuleType.EAR.getValue()) {
                    try {
                        AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                        boolean loaded = loadModule(configManager, configObjName);

                        Configuration config = configManager.getConfiguration(info.getConfigID());
                        for (Configuration child : config.getChildren()) {
                            if (child.getModuleType().getValue() == ConfigurationModuleType.WAR.getValue()) {
                                ModuleDetails childDetails = new ModuleDetails(info.getConfigID(), child.getModuleType(), info.getState());
                                childDetails.setComponentName(child.getId().toString());
                                WebModule webModule = getWebModule(config, child);
                                if (webModule != null) {
                                    childDetails.getContextPaths().add(webModule.getContextPath());
                                }
                                addDependencies(childDetails, configObjName);
                                moduleDetails.add(childDetails);
                            }
                        }

                        if (loaded) {
                            unloadModule(configManager, configObjName);
                        }
                    } catch (InvalidConfigException ice) {
                        // Should not occur
                        ice.printStackTrace();
                    }
                }

            } else if (shouldListConfig(info.getType())) {
                ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(), info.getState());
                try {
                    AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                    boolean loaded = loadModule(configManager, configObjName);

                    if (info.getType().getValue() == ConfigurationModuleType.EAR.getValue()) {
                        Configuration config = configManager.getConfiguration(info.getConfigID());
                        Iterator childs = config.getChildren().iterator();
                        while (childs.hasNext()) {
                            Configuration child = (Configuration) childs.next();
                            if (child.getModuleType().getValue() == ConfigurationModuleType.WAR.getValue()) {
                                WebModule webModule = getWebModule(config, child);
                                if (webModule != null) {
                                    details.getContextPaths().add(webModule.getContextPath());
                                }
                            }
                        }
                    }
View Full Code Here

            ConfigurationInfo info = (ConfigurationInfo) j.next();
            if (shouldListConfig(info)) {
                ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(), info.getState());

                if (info.getType().getValue()== ConfigurationModuleType.WAR.getValue()){
                    WebModule webModule = (WebModule) PortletManager.getModule(renderRequest, info.getConfigID());
                    if (webModule != null) {
                        details.setContextPath(webModule.getContextPath());
                        details.setUrlFor(webModule.getURLFor());
                    }
                }
                try {
                    AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                    boolean flag = false;
View Full Code Here

                    ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(), info.getState());
                    try {
                        AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                        boolean loaded = loadModule(configManager, configObjName);

                        WebModule webModule = (WebModule) PortletManager.getModule(renderRequest, info.getConfigID());
                        if (webModule != null) {
                            details.getContextPaths().add(webModule.getContextPath());
                        }

                        if (showDependencies) {
                            addDependencies(details, configObjName);
                        }
                        if (loaded) {
                            unloadModule(configManager, configObjName);
                        }
                    } catch (InvalidConfigException ice) {
                        // Should not occur
                        ice.printStackTrace();
                    }
                    moduleDetails.add(details);
                } else if (info.getType().getValue() == ConfigurationModuleType.EAR.getValue()) {
                    try {
                        AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                        boolean loaded = loadModule(configManager, configObjName);

                        Configuration config = configManager.getConfiguration(info.getConfigID());
                        if(config != null){
                            for (Configuration child : config.getChildren()) {
                                if (child.getModuleType().getValue() == ConfigurationModuleType.WAR.getValue()) {
                                    ModuleDetails childDetails = new ModuleDetails(info.getConfigID(), child.getModuleType(), info.getState());
                                    childDetails.setComponentName(child.getId().toString());
                                    WebModule webModule = getWebModule(config, child);
                                    if (webModule != null) {
                                        childDetails.getContextPaths().add(webModule.getContextPath());
                                    }
                                    if (showDependencies) {
                                        addDependencies(childDetails, configObjName);
                                    }
                                    moduleDetails.add(childDetails);
                                }
                            }
                        }

                        if (loaded) {
                            unloadModule(configManager, configObjName);
                        }
                    } catch (InvalidConfigException ice) {
                        // Should not occur
                        ice.printStackTrace();
                    }
                }

            } else if (shouldListConfig(info.getType())) {
                ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(), info.getState());
                try {
                    AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                    boolean loaded = loadModule(configManager, configObjName);

                    if (info.getType().getValue() == ConfigurationModuleType.EAR.getValue()) {
                        Configuration config = configManager.getConfiguration(info.getConfigID());
                        if(config != null){
                            Iterator childs = config.getChildren().iterator();
                            while (childs.hasNext()) {
                                Configuration child = (Configuration) childs.next();
                                if (child.getModuleType().getValue() == ConfigurationModuleType.WAR.getValue()) {
                                    WebModule webModule = getWebModule(config, child);
                                    if (webModule != null) {
                                        details.getContextPaths().add(webModule.getContextPath());
                                    }
                                }
                            }                                           
                            if (showDependencies) {
                                addDependencies(details, configObjName);
View Full Code Here

            List list = model.getWebApps();
            for (int i = 0; i < webApps.length; i++) {
                ConfigurationData app = webApps[i];
                WebAppData data = new WebAppData(app.getParentName().getArtifact(), app.getChildName(), app.getModuleBeanName() == null ? null : app.getModuleBeanName(), false, null, false);
                if (app.isRunning()) {
                    WebModule web = (WebModule) PortletManager.getManagedBean(request, app.getModuleBeanName());
                    data.setContextRoot(web.getContextPath());
                    String path;
                    if(web.getWARDirectory().getProtocol().equals("file")) {
                        path = web.getWARDirectory().getPath();
                    } else {
                        path = "WARMustBeUnpacked";
                    }

                    data.setWebAppDir(path);
View Full Code Here

            ConfigurationInfo info = (ConfigurationInfo) j.next();
            if (shouldListConfig(info)) {
                ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(), info.getState());

                if (info.getType().getValue()== ConfigurationModuleType.WAR.getValue()){
                    WebModule webModule = (WebModule) PortletManager.getModule(renderRequest, info.getConfigID());
                    if (webModule != null) {
                        details.setContextPath(webModule.getContextPath());
                        details.setUrlFor(webModule.getURLFor());
                    }
                }
                moduleDetails.add(details);
            }
        }
View Full Code Here

                    ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(), info.getState());
                    try {
                        AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                        boolean loaded = loadModule(configManager, configObjName);

                        WebModule webModule = (WebModule) PortletManager.getModule(renderRequest, info.getConfigID());
                        if (webModule != null) {
                            details.getContextPaths().add(webModule.getContextPath());
                        }

                        if (showDependencies) {
                            addDependencies(details, configObjName);
                        }
                        if (loaded) {
                            unloadModule(configManager, configObjName);
                        }
                    } catch (InvalidConfigException ice) {
                        // Should not occur
                        ice.printStackTrace();
                    }
                    moduleDetails.add(details);
                } else if (info.getType().getValue() == ConfigurationModuleType.EAR.getValue()) {
                    try {
                        AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                        boolean loaded = loadModule(configManager, configObjName);

                        Configuration config = configManager.getConfiguration(info.getConfigID());
                        if(config != null){
                            for (Configuration child : config.getChildren()) {
                                if (child.getModuleType().getValue() == ConfigurationModuleType.WAR.getValue()) {
                                    ModuleDetails childDetails = new ModuleDetails(info.getConfigID(), child.getModuleType(), info.getState());
                                    childDetails.setComponentName(child.getId().toString());
                                    WebModule webModule = getWebModule(config, child);
                                    if (webModule != null) {
                                        childDetails.getContextPaths().add(webModule.getContextPath());
                                    }
                                    if (showDependencies) {
                                        addDependencies(childDetails, configObjName);
                                    }
                                    moduleDetails.add(childDetails);
                                }
                            }
                        }

                        if (loaded) {
                            unloadModule(configManager, configObjName);
                        }
                    } catch (InvalidConfigException ice) {
                        // Should not occur
                        ice.printStackTrace();
                    }
                }

            } else if (shouldListConfig(info.getType())) {
                ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(), getConfigurationState(info));
                try {
                    AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                    boolean loaded = loadModule(configManager, configObjName);

                    if (info.getType().getValue() == ConfigurationModuleType.EAR.getValue()) {
                        Configuration config = configManager.getConfiguration(info.getConfigID());
                        if(config != null){
                            Iterator childs = config.getChildren().iterator();
                            while (childs.hasNext()) {
                                Configuration child = (Configuration) childs.next();
                                if (child.getModuleType().getValue() == ConfigurationModuleType.WAR.getValue()) {
                                    WebModule webModule = getWebModule(config, child);
                                    if (webModule != null) {
                                        details.getContextPaths().add(webModule.getContextPath());
                                    }
                                }
                            }                                           
                        }
                    } else if (info.getType().equals(ConfigurationModuleType.CAR)) {
View Full Code Here

                    ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(), info.getState());
                    try {
                        AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                        boolean loaded = loadModule(configManager, configObjName);

                        WebModule webModule = (WebModule) PortletManager.getModule(renderRequest, info.getConfigID());
                        if (webModule != null) {
                            details.getContextPaths().add(webModule.getContextPath());
                        }

                        if (showDependencies) {
                            addDependencies(details, configObjName);
                        }
                        if (loaded) {
                            unloadModule(configManager, configObjName);
                        }
                    } catch (InvalidConfigException ice) {
                        // Should not occur
                        ice.printStackTrace();
                    }
                    moduleDetails.add(details);
                } else if (info.getType().getValue() == ConfigurationModuleType.EAR.getValue()) {
                    try {
                        AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                        boolean loaded = loadModule(configManager, configObjName);

                        Configuration config = configManager.getConfiguration(info.getConfigID());
                        if(config != null){
                            for (Configuration child : config.getChildren()) {
                                if (child.getModuleType().getValue() == ConfigurationModuleType.WAR.getValue()) {
                                    ModuleDetails childDetails = new ModuleDetails(info.getConfigID(), child.getModuleType(), info.getState());
                                    childDetails.setComponentName(child.getId().toString());
                                    WebModule webModule = getWebModule(config, child);
                                    if (webModule != null) {
                                        childDetails.getContextPaths().add(webModule.getContextPath());
                                    }
                                    if (showDependencies) {
                                        addDependencies(childDetails, configObjName);
                                    }
                                    moduleDetails.add(childDetails);
                                }
                            }
                        }

                        if (loaded) {
                            unloadModule(configManager, configObjName);
                        }
                    } catch (InvalidConfigException ice) {
                        // Should not occur
                        ice.printStackTrace();
                    }
                }

            } else if (shouldListConfig(info.getType())) {
                ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(), getConfigurationState(info));
                try {
                    AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                    boolean loaded = loadModule(configManager, configObjName);

                    if (info.getType().getValue() == ConfigurationModuleType.EAR.getValue()) {
                        Configuration config = configManager.getConfiguration(info.getConfigID());
                        if(config != null){
                            Iterator childs = config.getChildren().iterator();
                            while (childs.hasNext()) {
                                Configuration child = (Configuration) childs.next();
                                if (child.getModuleType().getValue() == ConfigurationModuleType.WAR.getValue()) {
                                    WebModule webModule = getWebModule(config, child);
                                    if (webModule != null) {
                                        details.getContextPaths().add(webModule.getContextPath());
                                    }
                                }
                            }                                           
                        }
                    } else if (info.getType().equals(ConfigurationModuleType.CAR)) {
View Full Code Here

            ConfigurationInfo info = (ConfigurationInfo) j.next();
            if (shouldListConfig(info)) {
                ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(), info.getState());

                if (info.getType().getValue()== ConfigurationModuleType.WAR.getValue()){
                    WebModule webModule = (WebModule) PortletManager.getModule(renderRequest, info.getConfigID());
                    if (webModule != null) {
                        details.setContextPath(webModule.getContextPath());
                        details.setUrlFor(webModule.getURLFor());
                    }
                }
                try {
                    AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
                    boolean flag = false;
View Full Code Here

            List list = model.getWebApps();
            for (int i = 0; i < webApps.length; i++) {
                ConfigurationData app = webApps[i];
                WebAppData data = new WebAppData(app.getParentName().getArtifact(), app.getChildName(), app.getModuleBeanName() == null ? null : app.getModuleBeanName(), false, null, false);
                if (app.isRunning()) {
                    WebModule web = (WebModule) PortletManager.getManagedBean(request, app.getModuleBeanName());
                    data.setContextRoot(web.getContextPath());
                    String path;
                    if(web.getWARDirectory().getProtocol().equals("file")) {
                        path = web.getWARDirectory().getPath();
                    } else {
                        path = "WARMustBeUnpacked";
                    }

                    data.setWebAppDir(path);
View Full Code Here

TOP

Related Classes of org.apache.geronimo.management.geronimo.WebModule

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.