Examples of PortletResponseWrapper


Examples of javax.portlet.filter.PortletResponseWrapper

   {
      while (true)
      {
         if (wrapped instanceof PortletResponseWrapper)
         {
            PortletResponseWrapper wrapper = (PortletResponseWrapper)wrapped;
            wrapped = wrapper.getResponse();
         }
         else if (unwrapped.isInstance(wrapped))
         {
            return unwrapped.cast(wrapped);
         }
View Full Code Here

Examples of javax.portlet.filter.PortletResponseWrapper

  @Test
  public void testDecoratedNativeRequest() {
    MockRenderRequest portletRequest = new MockRenderRequest();
    MockRenderResponse portletResponse = new MockRenderResponse();
    PortletRequest decoratedRequest = new PortletRequestWrapper(portletRequest);
    PortletResponse decoratedResponse = new PortletResponseWrapper(portletResponse);
    PortletWebRequest request = new PortletWebRequest(decoratedRequest, decoratedResponse);
    assertSame(decoratedRequest, request.getNativeRequest());
    assertSame(decoratedRequest, request.getNativeRequest(PortletRequest.class));
    assertSame(portletRequest, request.getNativeRequest(RenderRequest.class));
    assertSame(portletRequest, request.getNativeRequest(MockRenderRequest.class));
View Full Code Here

Examples of javax.portlet.filter.PortletResponseWrapper

      // replace the response with our wrapper
      //TODO:  need a separate response wrapper for resources
      PortletViewHandlerResourceResponseWrapper resourceResponseWrapper = null;
      PortletViewHandlerRenderResponseWrapper renderResponseWrapper = null;
      PortletResponseWrapper wrapped = null;
      if (BridgeUtil.getPortletRequestPhase() == Bridge.PortletPhase.RESOURCE_PHASE)
      {
        resourceResponseWrapper = new PortletViewHandlerResourceResponseWrapper((ResourceResponse)originalResponse/*, context.getViewRoot().getLocale()*/);
        wrapped =  resourceResponseWrapper;
      }
View Full Code Here

Examples of javax.portlet.filter.PortletResponseWrapper

         {
            return (PortletResponseImpl)wrapped;
         }
         else if (wrapped instanceof PortletResponseWrapper)
         {
            PortletResponseWrapper wrapper = (PortletResponseWrapper)wrapped;
            wrapped = wrapper.getResponse();
         }
         else
         {
            // attempt to invoke a potential getResponse method (workaround for JBPORTAL-2204)
            Class<? extends PortletResponse> wrappedClass = wrapped.getClass();
View Full Code Here

Examples of javax.portlet.filter.PortletResponseWrapper

   {
      while (true)
      {
         if (wrapped instanceof PortletResponseWrapper)
         {
            PortletResponseWrapper wrapper = (PortletResponseWrapper)wrapped;
            wrapped = wrapper.getResponse();
         }
         else if (unwrapped.isInstance(wrapped))
         {
            return unwrapped.cast(wrapped);
         }
View Full Code Here

Examples of javax.portlet.filter.PortletResponseWrapper

  public LiferayPortletResponse(PortletResponse portletResponse) {

    if (portletResponse != null) {

      while (portletResponse instanceof PortletResponseWrapper) {
        PortletResponseWrapper portletResponseWrapper = (PortletResponseWrapper) portletResponse;
        portletResponse = portletResponseWrapper.getResponse();
      }
    }

    this.wrappedPortletResponse = portletResponse;
  }
View Full Code Here

Examples of javax.portlet.filter.PortletResponseWrapper

   {
      while (true)
      {
         if (wrapped instanceof PortletResponseWrapper)
         {
            PortletResponseWrapper wrapper = (PortletResponseWrapper)wrapped;
            wrapped = wrapper.getResponse();
         }
         else if (unwrapped.isInstance(wrapped))
         {
            return unwrapped.cast(wrapped);
         }
View Full Code Here

Examples of javax.portlet.filter.PortletResponseWrapper

         {
            return (PortletResponseImpl)wrapped;
         }
         else if (wrapped instanceof PortletResponseWrapper)
         {
            PortletResponseWrapper wrapper = (PortletResponseWrapper)wrapped;
            wrapped = wrapper.getResponse();
         }
         else
         {
            // attempt to invoke a potential getResponse method (workaround for JBPORTAL-2204)
            Class<? extends PortletResponse> wrappedClass = wrapped.getClass();
View Full Code Here

Examples of org.apache.empire.struts2.web.portlet.PortletResponseWrapper

                EmpireThreadManager.setCurrentRequest( reqObj );
                // Call init() if Request Object implements IWebRequest
                if (reqObj instanceof WebRequest)
                {
                  RequestContext req = new PortletRequestWrapper(request);
                  ResponseContext res = new PortletResponseWrapper(response);
                    return ((WebRequest)reqObj).init( req, res, sessObj );
                }
                else if (logRequestWarning)
                {
                    log.warn("Request object does not implement IWebRequest!");
View Full Code Here

Examples of org.apache.empire.struts2.web.portlet.PortletResponseWrapper

                EmpireThreadManager.setCurrentRequest( reqObj );
                // Call init() if Request Object implements IWebRequest
                if (reqObj instanceof WebRequest)
                {
                  RequestContext req = new PortletRequestWrapper(request);
                  ResponseContext res = new PortletResponseWrapper(response);
                    return ((WebRequest)reqObj).init( req, res, sessObj );
                }
                else if (logRequestWarning)
                {
                    log.warn("Request object does not implement IWebRequest!");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.