Examples of PortletRequestWrapper


Examples of javax.portlet.filter.PortletRequestWrapper

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

Examples of javax.portlet.filter.PortletRequestWrapper

  @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));
View Full Code Here

Examples of javax.portlet.filter.PortletRequestWrapper

         {
            return (PortletRequestImpl)wrapped;
         }
         else if (wrapped instanceof PortletRequestWrapper)
         {
            PortletRequestWrapper wrapper = (PortletRequestWrapper)wrapped;
            wrapped = wrapper.getRequest();
         }
         else
         {
            // do we need something similar to unwrap(PortletResponse) behavior?
            throw new IllegalArgumentException("Cannot unwrap request: " + wrapped.getClass().getName());
View Full Code Here

Examples of javax.portlet.filter.PortletRequestWrapper

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

Examples of javax.portlet.filter.PortletRequestWrapper

  public static boolean isLiferayPortletRequest(PortletRequest portletRequest) {

    if (portletRequest != null) {

      while (portletRequest instanceof PortletRequestWrapper) {
        PortletRequestWrapper portletRequestWrapper = (PortletRequestWrapper) portletRequest;
        portletRequest = portletRequestWrapper.getRequest();
      }

      return portletRequest.getClass().getName().startsWith(LiferayConstants.PACKAGE_NAMESPACE);
    }
    else {
View Full Code Here

Examples of javax.portlet.filter.PortletRequestWrapper

  public static boolean isPlutoPortletRequest(PortletRequest portletRequest) {

    if (portletRequest != null) {

      while (portletRequest instanceof PortletRequestWrapper) {
        PortletRequestWrapper portletRequestWrapper = (PortletRequestWrapper) portletRequest;
        portletRequest = portletRequestWrapper.getRequest();
      }

      return portletRequest.getClass().getName().startsWith(PLUTO_PACKAGE_NAMESPACE);
    }
    else {
View Full Code Here

Examples of javax.portlet.filter.PortletRequestWrapper

  public LiferayPortletRequest(PortletRequest portletRequest) {

    if (portletRequest != null) {

      while (portletRequest instanceof PortletRequestWrapper) {
        PortletRequestWrapper portletRequestWrapper = (PortletRequestWrapper) portletRequest;
        portletRequest = portletRequestWrapper.getRequest();
      }
    }

    this.wrappedPortletRequest = portletRequest;
View Full Code Here

Examples of javax.portlet.filter.PortletRequestWrapper

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

Examples of javax.portlet.filter.PortletRequestWrapper

         {
            return (PortletRequestImpl)wrapped;
         }
         else if (wrapped instanceof PortletRequestWrapper)
         {
            PortletRequestWrapper wrapper = (PortletRequestWrapper)wrapped;
            wrapped = wrapper.getRequest();
         }
         else
         {
            // do we need something similar to unwrap(PortletResponse) behavior?
            throw new IllegalArgumentException("Cannot unwrap request: " + wrapped.getClass().getName());
View Full Code Here

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

                // Store Request in Thread Local variable
                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)
                {
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.