@Override public PortletApplicationDefinition getPortletApplication(String applicationName) throws PortletContainerException { DriverPortletContext ipc = portletContexts.get(applicationName); if (ipc != null) { return ipc.getPortletApplicationDefinition(); } String msg = "Unable to retrieve portlet application: '" + applicationName + "'"; logger.warn(msg); throw new PortletContainerException(msg); }
private void fireRemoved(DriverPortletContext context) { PortletRegistryEvent event = new PortletRegistryEvent(); event.setPortletApplication(context.getPortletApplicationDefinition()); for (PortletRegistryListener l : registryListeners) { l.portletApplicationRemoved(event); } logger.info("Portlet Context '" + context.getApplicationName() + "' removed."); }
private void fireRegistered(DriverPortletContext context) { PortletRegistryEvent event = new PortletRegistryEvent(); event.setPortletApplication(context.getPortletApplicationDefinition()); for (PortletRegistryListener l : registryListeners) { l.portletApplicationRegistered(event); } logger.info("Portlet Context '" + context.getApplicationName() + "' registered."); }
public void init(ServletContext context) throws DriverConfigurationException { if (PlutoServices.getServices() != null) { PageConfig page = new PageConfig(); page.setName("Embedded Portlets"); page.setUri("/WEB-INF/themes/pluto.jsp"); PortletContextService contextService = PlutoServices.getServices().getPortletContextService(); Iterator<DriverPortletContext> portletContexts = contextService.getPortletContexts(); String contextPath = context.getContextPath(); while (portletContexts.hasNext()) { DriverPortletContext driverPortletContext = portletContexts.next(); List<? extends PortletDefinition> portlets = driverPortletContext.getPortletApplicationDefinition() .getPortlets(); for (PortletDefinition portletDefinition : portlets) { String portletName = portletDefinition.getPortletName(); page.addPortlet(contextPath, portletName); } } pages.add(page); initialized = true; } }