org.apache.wicket.portlet
Class PortletServletRequestWrapper

java.lang.Object
  extended by javax.servlet.ServletRequestWrapper
      extended by javax.servlet.http.HttpServletRequestWrapper
          extended by org.apache.wicket.portlet.PortletServletRequestWrapper
All Implemented Interfaces:
HttpServletRequest, ServletRequest

public class PortletServletRequestWrapper
extends HttpServletRequestWrapper

Wraps servlet request object with Portlet specific functionality by overriding the HttpServletRequestWrapper retrieval of the context path, path info, request URI etc... to return the portal specific translations. FIXME javadoc

Author:
Ate Douma, Sebastian Thomschke, Peter Pastrnak, Ronny Pscheidl

Field Summary
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
  PortletServletRequestWrapper(ServletContext context, HttpServletRequest request, HttpSession proxiedSession, String filterPath)
          FIXME javadoc Public constructor which internally builds the path info from request URI, instead of deriving it.
  PortletServletRequestWrapper(ServletContext context, HttpServletRequest request, HttpSession proxiedSession, String filterPath, String pathInfo)
          FIXME javadoc Public constructor called when not running in a portlet environment, which is passed in the path info instead of deriving it.
protected PortletServletRequestWrapper(ServletContext context, HttpSession proxiedSession, HttpServletRequest request, String filterPath)
          Package private constructor which is called from either of the two public constructors - sets up the various portlet specific versions of the context path, servlet path, request URI etc...
 
Method Summary
 Object getAttribute(String name)
          
 String getContextPath()
          
 String getHeader(String name)
           
 Enumeration getHeaders(String name)
           
 String getPathInfo()
          
 String getQueryString()
          
 String getRequestURI()
          
 String getServletPath()
          
 HttpSession getSession()
          
 HttpSession getSession(boolean create)
           
 void setCharacterEncoding(String enc)
           
 
Methods inherited from class javax.servlet.http.HttpServletRequestWrapper
getAuthType, getCookies, getDateHeader, getHeaderNames, getIntHeader, getMethod, getPathTranslated, getRemoteUser, getRequestedSessionId, getRequestURL, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole
 
Methods inherited from class javax.servlet.ServletRequestWrapper
getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.ServletRequest
getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute
 

Constructor Detail

PortletServletRequestWrapper

public PortletServletRequestWrapper(ServletContext context,
                                    HttpServletRequest request,
                                    HttpSession proxiedSession,
                                    String filterPath)
FIXME javadoc

Public constructor which internally builds the path info from request URI, instead of deriving it.

Parameters:
context -
request -
proxiedSession -
filterPath -

PortletServletRequestWrapper

public PortletServletRequestWrapper(ServletContext context,
                                    HttpServletRequest request,
                                    HttpSession proxiedSession,
                                    String filterPath,
                                    String pathInfo)
FIXME javadoc

Public constructor called when not running in a portlet environment, which is passed in the path info instead of deriving it. It overrides the generated request URI from the internal constructor.

Parameters:
context -
request -
proxiedSession -
filterPath - ???
pathInfo - ???

PortletServletRequestWrapper

protected PortletServletRequestWrapper(ServletContext context,
                                       HttpSession proxiedSession,
                                       HttpServletRequest request,
                                       String filterPath)
Package private constructor which is called from either of the two public constructors - sets up the various portlet specific versions of the context path, servlet path, request URI etc...

Parameters:
context -
proxiedSession -
request -
filterPath -
Method Detail

getAttribute

public Object getAttribute(String name)

Specified by:
getAttribute in interface ServletRequest
Overrides:
getAttribute in class ServletRequestWrapper

getContextPath

public String getContextPath()

Specified by:
getContextPath in interface HttpServletRequest
Overrides:
getContextPath in class HttpServletRequestWrapper

getPathInfo

public String getPathInfo()

Specified by:
getPathInfo in interface HttpServletRequest
Overrides:
getPathInfo in class HttpServletRequestWrapper

getQueryString

public String getQueryString()

Specified by:
getQueryString in interface HttpServletRequest
Overrides:
getQueryString in class HttpServletRequestWrapper

getRequestURI

public String getRequestURI()

Specified by:
getRequestURI in interface HttpServletRequest
Overrides:
getRequestURI in class HttpServletRequestWrapper

getServletPath

public String getServletPath()

Specified by:
getServletPath in interface HttpServletRequest
Overrides:
getServletPath in class HttpServletRequestWrapper

getSession

public HttpSession getSession()

Specified by:
getSession in interface HttpServletRequest
Overrides:
getSession in class HttpServletRequestWrapper

getSession

public HttpSession getSession(boolean create)
Specified by:
getSession in interface HttpServletRequest
Overrides:
getSession in class HttpServletRequestWrapper

getHeader

public String getHeader(String name)
Specified by:
getHeader in interface HttpServletRequest
Overrides:
getHeader in class HttpServletRequestWrapper

getHeaders

public Enumeration getHeaders(String name)
Specified by:
getHeaders in interface HttpServletRequest
Overrides:
getHeaders in class HttpServletRequestWrapper

setCharacterEncoding

public void setCharacterEncoding(String enc)
                          throws UnsupportedEncodingException
Specified by:
setCharacterEncoding in interface ServletRequest
Overrides:
setCharacterEncoding in class ServletRequestWrapper
Throws:
UnsupportedEncodingException
See Also:
ServletRequestWrapper.setCharacterEncoding(java.lang.String)


Copyright © 2015. All Rights Reserved.