@Override public PortletRenderResponseContext getPortletRenderResponseContext( PortletContainer container, HttpServletRequest containerRequest, HttpServletResponse containerResponse, PortletWindow window) { final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow(containerRequest, window); return new PortletRenderResponseContextImpl( container, portletWindow, containerRequest, containerResponse, this.requestPropertiesManager, this.portalUrlProvider, this.portletCookieService); }
@Override public PortletRenderResponseContext getPortletRenderResponseContext( PortletContainer container, HttpServletRequest containerRequest, HttpServletResponse containerResponse, PortletWindow window) { final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow(containerRequest, window); return new PortletRenderResponseContextImpl( container, portletWindow, containerRequest, containerResponse, this.requestPropertiesManager, this.portalUrlProvider, this.portletCookieService); }
@Override public PortletResourceResponseContext getPortletResourceResponseContext( PortletContainer container, HttpServletRequest containerRequest, HttpServletResponse containerResponse, PortletWindow window) { final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow(containerRequest, window); return new PortletResourceResponseContextImpl( container, portletWindow, containerRequest, containerResponse, this.requestPropertiesManager, this.portalUrlProvider, this.portletCookieService); } }
@Override public PortletResourceResponseContext getPortletResourceResponseContext( PortletContainer container, HttpServletRequest containerRequest, HttpServletResponse containerResponse, PortletWindow window) { final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow(containerRequest, window); return new PortletResourceResponseContextImpl( container, portletWindow, containerRequest, containerResponse, this.requestPropertiesManager, this.portalUrlProvider, this.portletCookieService); } }
@Override public Object getAttribute( HttpServletRequest httpServletRequest, PortletWindow plutoPortletWindow, String attributeName) { if (IPortletRenderer.MULTIVALUED_USERINFO_MAP_ATTRIBUTE.equals(attributeName)) { // Get the list of user attributes the portal knows about the user final String remoteUser = httpServletRequest.getRemoteUser(); if (remoteUser == null) { return null; } final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow( httpServletRequest, plutoPortletWindow); final List<? extends UserAttribute> expectedUserAttributes = this.getExpectedUserAttributes(httpServletRequest, portletWindow); return getMultiValuedUserInfoMap(remoteUser, expectedUserAttributes); } return null; }
@Override public Object getAttribute( HttpServletRequest httpServletRequest, PortletWindow plutoPortletWindow, String attributeName) { if (IPortletRenderer.MULTIVALUED_USERINFO_MAP_ATTRIBUTE.equals(attributeName)) { // Get the list of user attributes the portal knows about the user final String remoteUser = httpServletRequest.getRemoteUser(); if (remoteUser == null) { return null; } final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow( httpServletRequest, plutoPortletWindow); final List<? extends UserAttribute> expectedUserAttributes = this.getExpectedUserAttributes(httpServletRequest, portletWindow); return getMultiValuedUserInfoMap(remoteUser, expectedUserAttributes); } return null; }
@Override public PortletResourceRequestContext getPortletResourceRequestContext( PortletContainer container, HttpServletRequest containerRequest, HttpServletResponse containerResponse, PortletWindow window) { final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow(containerRequest, window); final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(containerRequest); return new PortletResourceRequestContextImpl( container, portletWindow, containerRequest, containerResponse, this.requestPropertiesManager, portalRequestInfo, this.portletCookieService, requestAttributeService); }
@Override public PortletRequestContext getPortletEventRequestContext( PortletContainer container, HttpServletRequest containerRequest, HttpServletResponse containerResponse, PortletWindow window) { final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow(containerRequest, window); final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(containerRequest); return new PortletRequestContextImpl( container, portletWindow, containerRequest, containerResponse, this.requestPropertiesManager, portalRequestInfo, portletCookieService, requestAttributeService); }
@Override public PortletRequestContext getPortletRenderRequestContext( PortletContainer container, HttpServletRequest containerRequest, HttpServletResponse containerResponse, PortletWindow window) { final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow(containerRequest, window); final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(containerRequest); return new PortletRequestContextImpl( container, portletWindow, containerRequest, containerResponse, this.requestPropertiesManager, portalRequestInfo, portletCookieService, requestAttributeService); }
@Override public PortletRequestContext getPortletActionRequestContext( PortletContainer container, HttpServletRequest containerRequest, HttpServletResponse containerResponse, PortletWindow window) { final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow(containerRequest, window); final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(containerRequest); return new PortletRequestContextImpl( container, portletWindow, containerRequest, containerResponse, this.requestPropertiesManager, portalRequestInfo, portletCookieService, requestAttributeService); }
@Override public PortletRequestContext getPortletEventRequestContext( PortletContainer container, HttpServletRequest containerRequest, HttpServletResponse containerResponse, PortletWindow window) { final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow(containerRequest, window); final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(containerRequest); return new PortletRequestContextImpl( container, portletWindow, containerRequest, containerResponse, this.requestPropertiesManager, portalRequestInfo, portletCookieService, requestAttributeService); }
@Override public PortletRequestContext getPortletRenderRequestContext( PortletContainer container, HttpServletRequest containerRequest, HttpServletResponse containerResponse, PortletWindow window) { final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow(containerRequest, window); final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(containerRequest); return new PortletRequestContextImpl( container, portletWindow, containerRequest, containerResponse, this.requestPropertiesManager, portalRequestInfo, portletCookieService, requestAttributeService); }
@Override public PortletRequestContext getPortletActionRequestContext( PortletContainer container, HttpServletRequest containerRequest, HttpServletResponse containerResponse, PortletWindow window) { final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow(containerRequest, window); final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(containerRequest); return new PortletRequestContextImpl( container, portletWindow, containerRequest, containerResponse, this.requestPropertiesManager, portalRequestInfo, portletCookieService, requestAttributeService); }
@Override public PortletResourceRequestContext getPortletResourceRequestContext( PortletContainer container, HttpServletRequest containerRequest, HttpServletResponse containerResponse, PortletWindow window) { final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow(containerRequest, window); final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(containerRequest); return new PortletResourceRequestContextImpl( container, portletWindow, containerRequest, containerResponse, this.requestPropertiesManager, portalRequestInfo, this.portletCookieService, requestAttributeService); }
@Override public Map<String, String> getUserInfo(PortletRequest request, PortletWindow plutoPortletWindow) throws PortletContainerException { // Get the remote user final String remoteUser = request.getRemoteUser(); if (remoteUser == null) { return null; } final HttpServletRequest httpServletRequest = this.portalRequestUtils.getPortletHttpRequest(request); final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow( httpServletRequest, plutoPortletWindow); return this.getUserInfo(remoteUser, httpServletRequest, portletWindow); }
@Override public Map<String, String> getUserInfo(PortletRequest request, PortletWindow plutoPortletWindow) throws PortletContainerException { // Get the remote user final String remoteUser = request.getRemoteUser(); if (remoteUser == null) { return null; } final HttpServletRequest httpServletRequest = this.portalRequestUtils.getPortletHttpRequest(request); final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow( httpServletRequest, plutoPortletWindow); return this.getUserInfo(remoteUser, httpServletRequest, portletWindow); }
@Override public PortletSession createPortletSession( PortletContext portletContext, PortletWindow portletWindow, HttpSession session) { // TODO pluto 1.1 PortletEnvironmentService#createPortletSession passed in the request; now // use IPortalRequestUtils#getCurrentPortalRequest()? final HttpServletRequest request = portalRequestUtils.getCurrentPortalRequest(); final IPortletWindow internalPortletWindow = this.portletWindowRegistry.convertPortletWindow(request, portletWindow); final IPortletEntity portletEntity = internalPortletWindow.getPortletEntity(); final IPortletEntityId portletEntityId = portletEntity.getPortletEntityId(); return new ScopingPortletSessionImpl( portletEntityId, portletContext, portletWindow, session); }
@Override public PortletSession createPortletSession( PortletContext portletContext, PortletWindow portletWindow, HttpSession session) { // TODO pluto 1.1 PortletEnvironmentService#createPortletSession passed in the request; now // use IPortalRequestUtils#getCurrentPortalRequest()? final HttpServletRequest request = portalRequestUtils.getCurrentPortalRequest(); final IPortletWindow internalPortletWindow = this.portletWindowRegistry.convertPortletWindow(request, portletWindow); final IPortletEntity portletEntity = internalPortletWindow.getPortletEntity(); final IPortletEntityId portletEntityId = portletEntity.getPortletEntityId(); return new ScopingPortletSessionImpl( portletEntityId, portletContext, portletWindow, session); }
@Override public PortletEventResponseContext getPortletEventResponseContext( PortletContainer container, HttpServletRequest containerRequest, HttpServletResponse containerResponse, PortletWindow window) { final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow(containerRequest, window); final IPortalActionUrlBuilder portalActionUrlBuilder = this.portalUrlProvider.getPortalActionUrlBuilder(containerRequest); final IPortletUrlBuilder portletUrlBuilder = portalActionUrlBuilder.getPortletUrlBuilder(portletWindow.getPortletWindowId()); return new PortletEventResponseContextImpl( container, portletWindow, containerRequest, containerResponse, requestPropertiesManager, portletUrlBuilder, this.portletContextService, this.portletCookieService); }
@Override public PortletEventResponseContext getPortletEventResponseContext( PortletContainer container, HttpServletRequest containerRequest, HttpServletResponse containerResponse, PortletWindow window) { final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow(containerRequest, window); final IPortalActionUrlBuilder portalActionUrlBuilder = this.portalUrlProvider.getPortalActionUrlBuilder(containerRequest); final IPortletUrlBuilder portletUrlBuilder = portalActionUrlBuilder.getPortletUrlBuilder(portletWindow.getPortletWindowId()); return new PortletEventResponseContextImpl( container, portletWindow, containerRequest, containerResponse, requestPropertiesManager, portletUrlBuilder, this.portletContextService, this.portletCookieService); }