private Collection getSupportedModes() { RequestContext rc = Jetspeed.getCurrentRequestContext(); if (rc != null) { PortletWindow window = rc.getCurrentPortletWindow(); if (window != null) { return window.getPortletDefinition().getApplication().getSupportedPortletModes(); } } return JetspeedActions.getStandardPortletModes(); }
private Collection getSupportedStates() { RequestContext rc = Jetspeed.getCurrentRequestContext(); if (rc != null) { PortletWindow window = rc.getCurrentPortletWindow(); if (window != null) { return window.getPortletDefinition().getApplication().getSupportedWindowStates(); } } return JetspeedActions.getStandardWindowStates(); }
public HttpServletRequest getHttpServletRequest(GenericPortlet portlet, PortletRequest request) { PortletWindow window = Jetspeed.getCurrentRequestContext().getCurrentPortletWindow(); HttpServletRequest req = (HttpServletRequest)window.getAttribute(SERVLET_REQUEST); if (req == null) { PortletRequestContext rc = window.getPortletRequestContext(); req = requestDispatcherService.getRequestWrapper(rc.getServletContext(), rc.getServletRequest(), request, null, true, false); req.setAttribute(ContainerConstants.PORTLET_CONFIG, rc.getPortletConfig()); req.setAttribute(ContainerConstants.PORTLET_REQUEST, window.getPortletRequest()); req.setAttribute(ContainerConstants.PORTLET_RESPONSE, window.getPortletResponse()); window.setAttribute(SERVLET_REQUEST, req); } return req; }
public ServletContext getServletContext(GenericPortlet portlet) { PortletWindow window = Jetspeed.getCurrentRequestContext().getCurrentPortletWindow(); ServletContext servletContext = (ServletContext)window.getAttribute(SERVLET_CONTEXT); if (servletContext == null) { servletContext = ServletContextProxy.createProxy(((JetspeedPortletContext)portlet.getPortletContext()).getServletContext(), portlet.getPortletContext()); window.setAttribute(SERVLET_CONTEXT, servletContext); } return servletContext; }
public HttpServletResponse getHttpServletResponse(GenericPortlet portlet, PortletResponse response) { PortletWindow window = Jetspeed.getCurrentRequestContext().getCurrentPortletWindow(); HttpServletResponse res = (HttpServletResponse)window.getAttribute(SERVLET_RESPONSE); if (res == null) { boolean included = window.getAttribute(PortalReservedParameters.PORTLET_CONTAINER_INVOKER_USE_FORWARD) == null; PortletRequestContext rc = window.getPortletRequestContext(); res = requestDispatcherService.getResponseWraper(rc.getServletContext(), rc.getServletResponse(), window.getPortletRequest(), response, included); if (PortletWindow.Action.RENDER == window.getAction() && !included) { res = new HttpServletPortletResourceResponseWrapper(res); } window.setAttribute(SERVLET_RESPONSE, res); } return res; } }
RequestContext rc = Jetspeed.getCurrentRequestContext(); if (rc == null)