protected int list(PrintWriter writer) { writer.println("Listed Portlet Applications"); Iterator iter = registry.getPortletApplications().iterator(); PortletApplication pa; while (iter.hasNext()) { pa = (PortletApplication) iter.next(); writer.println(pa.getName() + ":" + pa.getContextPath() + ":" + (portletFactory.isPortletApplicationRegistered(pa) ? "ACTIVE" : "INACTIVE")); } return OK; }
try ApplicationServerManagerResult result = asm.undeploy(pa.getContextPath()); if (result.isOk())
ApplicationServerManagerResult result = asm.stop(pa.getContextPath()); if (result.isOk())
ApplicationServerManagerResult result = asm.start(pa.getContextPath()); if (result.isOk())
public PortletApplicationBean(final PortletApplication portletApplication) contextPath = portletApplication.getContextPath(); localContextPath = portletApplication.getLocalContextPath(); defaultNamespace = portletApplication.getDefaultNamespace();
private PortletInstance getPortletInstance(String portletUniqueName) throws PortletException { PortletRegistry registry = Jetspeed.getComponentManager().lookupComponent("portletRegistry"); PortletFactory portletFactory = Jetspeed.getComponentManager().lookupComponent("portletFactory"); ServletContext portalAppContext = ((ServletConfig) Jetspeed.getComponentManager().lookupComponent("ServletConfig")).getServletContext(); PortletDefinition portletDef = registry.getPortletDefinitionByUniqueName(portletUniqueName, true); PortletApplication portletApp = portletDef.getApplication(); ServletContext portletAppContext = portalAppContext.getContext(portletApp.getContextPath()); return portletFactory.getPortletInstance(portletAppContext, portletDef, false); }
applicationContextPath = portletApplication.getContextPath(); portletName = portletDefinition.getPortletName(); uniqueName = portletDefinition.getUniqueName();
PortletApplication app = portletDefinition.getApplication(); String appContextPath = app.getContextPath();