public String getNamespace() { if (namespace == null) { namespace = getPortletContainer().getContainerServices().getNamespaceMapper().encode(getPortletWindow().getId(), ""); StringBuffer validNamespace = new StringBuffer(); for (int i = 0; i < namespace.length(); i++) { char ch = namespace.charAt(i); if (Character.isJavaIdentifierPart(ch)) { validNamespace.append(ch); } else { validNamespace.append('_'); } } namespace = validNamespace.toString(); } return namespace; }
if (userInfo == null) { try { userInfo = getPortletContainer().getContainerServices().getUserInfoService().getUserInfo(this, getPortletWindow()); } catch (Exception e) { userInfo = Collections.emptyMap(); } else if (name.equals(PortletRequest.CCPP_PROFILE)) { if (ccppProfile == null) { ccppProfile = getPortletContainer().getContainerServices().getCCPPProfileService().getCCPPProfile(getServletRequest());
/** * The method initialise the FilterManager for later use in the PortletServlet * @param portletWindow the PortletWindow * @param lifeCycle like ACTION_PHASE, RENDER_PHASE,... * @return FilterManager * @throws PortletContainerException */ private FilterManager filterInitialisation(PortletWindow portletWindow, String lifeCycle) throws PortletContainerException{ return getContainerServices().getFilterManagerService().getFilterManager(portletWindow, lifeCycle); } }
public void doAdmin(PortletWindow portletWindow, HttpServletRequest request, HttpServletResponse response) throws PortletException, IOException, PortletContainerException { ensureInitialized(); debugWithName("Admin request received for portlet: " +portletWindow.getPortletDefinition().getPortletName()); PortletRequestContextService rcService = getContainerServices().getPortletRequestContextService(); PortletEnvironmentService envService = getContainerServices().getPortletEnvironmentService(); PortletInvokerService invoker = getContainerServices().getPortletInvokerService(); PortletRequestContext requestContext = rcService.getPortletRenderRequestContext(this, request, response, portletWindow); PortletRenderResponseContext responseContext = rcService.getPortletRenderResponseContext(this, request, response, portletWindow, requestContext); RenderRequest portletRequest = envService.createRenderRequest(requestContext, responseContext); RenderResponse portletResponse = envService.createRenderResponse(responseContext); try { invoker.admin(requestContext, portletRequest, portletResponse); // Mark portlet interaction is completed: backend implementation can flush response state now responseContext.close(); } finally { responseContext.release(); } debugWithName("Portlet admin request done for: " + portletWindow.getPortletDefinition().getPortletName()); }
+ portletWindow.getPortletDefinition().getPortletName()); PortletRequestContextService rcService = getContainerServices().getPortletRequestContextService(); PortletEnvironmentService envService = getContainerServices().getPortletEnvironmentService(); PortletInvokerService invoker = getContainerServices().getPortletInvokerService(); getContainerServices().getEventCoordinationService().processEvents(this, portletWindow, request, response, events);
public EventProvider getEventProvider() { if (!isClosed()) { return ((JetspeedEventCoordinationService)getContainer().getContainerServices().getEventCoordinationService()).createEventProvider(getServletRequest(), getPortletWindow()); } return null; } }
final PortletEnvironmentService portletEnvironmentService = containerServices.getPortletEnvironmentService();
public PortletRequestImpl(PortletRequestContext requestContext, PortletResponseContext responseContext, String lifecyclePhase) { this.requestContext = requestContext; this.responseContext = responseContext; this.lifecyclePhase = lifecyclePhase; this.portalContext = getPortletContainer().getContainerServices().getPortalContext(); }
.getPortletPreferencesService(); if (LOG.isTraceEnabled()) { LOG.trace("Using PortletPreferencesService: "
try { PortletURLListenerService service = responseContext.getContainer() .getContainerServices().getPortletURLListenerService(); PortletApplicationDefinition portletApp = responseContext .getPortletWindow().getPortletDefinition().getApplication();
+ portletWindow.getPortletDefinition().getPortletName()); PortletRequestContextService rcService = getContainerServices().getPortletRequestContextService(); PortletEnvironmentService envService = getContainerServices().getPortletEnvironmentService(); PortletInvokerService invoker = getContainerServices().getPortletInvokerService();
+ portletWindow.getPortletDefinition().getPortletName()); PortletRequestContextService rcService = getContainerServices().getPortletRequestContextService(); PortletEnvironmentService envService = getContainerServices().getPortletEnvironmentService(); PortletInvokerService invoker = getContainerServices().getPortletInvokerService(); if (!events.isEmpty()) getContainerServices().getEventCoordinationService().processEvents(this, portletWindow, request, response, events);
protected PortalContext getPortalContext() { return getPortletContainer().getContainerServices().getPortalContext(); }
+ portletWindow.getPortletDefinition().getPortletName()); PortletRequestContextService rcService = getContainerServices().getPortletRequestContextService(); PortletEnvironmentService envService = getContainerServices().getPortletEnvironmentService(); PortletInvokerService invoker = getContainerServices().getPortletInvokerService();
protected String encodeAttributeName(String name) { if (isReservedAttributeName(name)) { return name; } return container.getContainerServices().getNamespaceMapper().encode(window.getId(), name); }
protected BaseURLImpl(PortletResponseContext responseContext, PortletURLProvider urlProvider) { this.responseContext = responseContext; this.portalContext = responseContext.getContainer() .getContainerServices().getPortalContext(); this.windowId = responseContext.getPortletWindow().getId().getStringId(); this.urlProvider = urlProvider; renderURL = PortletURLProvider.TYPE.RENDER == urlProvider.getType(); if (isTrace) { StringBuilder txt = new StringBuilder(); txt.append("URL provider type=").append(urlProvider.getType()); txt.append(", WindowId=").append(windowId); txt.append(", isRender=").append(renderURL); LOGGER.debug(txt.toString()); } }
+ portletWindow.getPortletDefinition().getPortletName()); PortletRequestContextService rcService = getContainerServices().getPortletRequestContextService(); PortletEnvironmentService envService = getContainerServices().getPortletEnvironmentService(); PortletInvokerService invoker = getContainerServices().getPortletInvokerService();
protected String decodeAttributeName(String name) { if (isReservedAttributeName(name)) { return name; } String result = container.getContainerServices().getNamespaceMapper().decode(window.getId(), name); return result != null ? result : name; }
+ portletWindow.getPortletDefinition().getPortletName()); PortletRequestContextService rcService = getContainerServices().getPortletRequestContextService(); PortletEnvironmentService envService = getContainerServices().getPortletEnvironmentService(); PortletInvokerService invoker = getContainerServices().getPortletInvokerService();
public HttpServletPortletRequestWrapper(HttpServletRequest hreq, HttpSession session, PortletRequest preq) { super(hreq); this.preq = preq; this.session = session; reqctx = (PortletRequestContext) preq.getAttribute(PortletInvokerService.REQUEST_CONTEXT); this.mapper = reqctx.getContainer().getContainerServices().getNamespaceMapper(); this.winId = reqctx.getPortletWindow().getId(); this.phase = (String) preq.getAttribute(PortletRequest.LIFECYCLE_PHASE); }