Package javax.portlet.filter

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


  @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

         {
            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

   {
      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

  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

  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

  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

   {
      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

         {
            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

TOP

Related Classes of javax.portlet.filter.PortletRequestWrapper

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.