Package javax.portlet.filter

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


  @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

      // 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

         {
            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

   {
      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

  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

   {
      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

         {
            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

TOP

Related Classes of javax.portlet.filter.PortletResponseWrapper

Copyright © 2018 www.massapicom. 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.