String applicationName = contextService.register(sConfig); started = true; portletContext = contextService.getPortletContext(applicationName); portletConfig = contextService.getPortletConfig(applicationName, portletName);
public void destroy() { synchronized (getServletContext()) { if (startTimer != null) { startTimer.cancel(); startTimer = null; } else if (started && portletContext != null) { started = false; contextService.unregister(portletContext); if (invoker != null) { try { invoker.destroy(); } catch (Exception e) { // ignore } invoker = null; } } super.destroy(); } }
public EventProviderImpl( IPortletWindow portletWindow, PortletContextService portletContextService) { this.portletWindow = portletWindow; final PortletDefinition portletDefinition = portletWindow.getPlutoPortletWindow().getPortletDefinition(); final PortletApplicationDefinition application = portletDefinition.getApplication(); final String portletApplicationName = application.getName(); try { this.portletClassLoader = portletContextService.getClassLoader(portletApplicationName); } catch (PortletContainerException e) { throw new IllegalStateException( "Failed to find ClassLoader for portlet applicaiton: " + portletApplicationName, e); } }
public PortletConfig getPortletConfig(String portletId) throws PortletContainerException { String applicationId = PortletWindowConfig.parseContextPath(portletId); String applicationName = applicationId; // if (applicationName.length() > 0) // { // applicationName = applicationName.substring(1); // } String portletName = PortletWindowConfig.parsePortletName(portletId); return portletContextService.getPortletConfig(applicationName, portletName); } }
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; } }
public EventProviderImpl( IPortletWindow portletWindow, PortletContextService portletContextService) { this.portletWindow = portletWindow; final PortletDefinition portletDefinition = portletWindow.getPlutoPortletWindow().getPortletDefinition(); final PortletApplicationDefinition application = portletDefinition.getApplication(); final String portletApplicationName = application.getName(); try { this.portletClassLoader = portletContextService.getClassLoader(portletApplicationName); } catch (PortletContainerException e) { throw new IllegalStateException( "Failed to find ClassLoader for portlet applicaiton: " + portletApplicationName, e); } }
ClassLoader loader = portletContextService.getClassLoader(portletWindow.getPortletDefinition().getApplication().getName()); Class<? extends Serializable> clazz = loader.loadClass(eventDefinitionDD.getValueType()).asSubclass(Serializable.class);
.getClassLoader(portletWindow.getPortletDefinition() .getApplication().getName()); Class<? extends Serializable> clazz = loader.loadClass(
loader = portletContextService.getClassLoader(portletApplicationName); } catch (PortletContainerException e) { throw new IllegalStateException(