org.jasig.portal.container.servlet
Class PortletParameterRequestWrapper

java.lang.Object
  extended by javax.servlet.ServletRequestWrapper
      extended by javax.servlet.http.HttpServletRequestWrapper
          extended by org.jasig.portal.container.servlet.PortletParameterRequestWrapper
All Implemented Interfaces:
javax.servlet.http.HttpServletRequest, javax.servlet.ServletRequest

public class PortletParameterRequestWrapper
extends javax.servlet.http.HttpServletRequestWrapper

A HttpServletRequestWrapper that only allows non-portal paramters to be seen. The determination is done by hidding parameters that begin with PortletStateManager.UP_PARAM_PREFIX. All other paramters are let through.

Version:
$Revision: 1.3.2.1 $
Author:
Eric Dalquist edalquist@unicon.net

Field Summary
private static java.lang.String ESCAPE_PREFIX
           
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
PortletParameterRequestWrapper(javax.servlet.http.HttpServletRequest request)
          Creates a new wrapper and wraps the specified request.
 
Method Summary
 java.lang.String getParameter(java.lang.String name)
           
 java.util.Map getParameterMap()
           
 java.util.Enumeration getParameterNames()
           
 java.lang.String[] getParameterValues(java.lang.String name)
           
private  java.util.Map getPortletParameterMap()
          Does the work of creating a Map of non-portal parameters for the public methods of this class to use.
 
Methods inherited from class javax.servlet.http.HttpServletRequestWrapper
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole
 
Methods inherited from class javax.servlet.ServletRequestWrapper
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocale, getLocales, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding, 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
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocale, getLocales, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding
 

Field Detail

ESCAPE_PREFIX

private static final java.lang.String ESCAPE_PREFIX
See Also:
Constant Field Values
Constructor Detail

PortletParameterRequestWrapper

public PortletParameterRequestWrapper(javax.servlet.http.HttpServletRequest request)
Creates a new wrapper and wraps the specified request.

Parameters:
request - The requst to wrap.
See Also:
HttpServletRequestWrapper.HttpServletRequestWrapper(javax.servlet.http.HttpServletRequest)
Method Detail

getParameter

public java.lang.String getParameter(java.lang.String name)
Specified by:
getParameter in interface javax.servlet.ServletRequest
Overrides:
getParameter in class javax.servlet.ServletRequestWrapper

getParameterMap

public java.util.Map getParameterMap()
Specified by:
getParameterMap in interface javax.servlet.ServletRequest
Overrides:
getParameterMap in class javax.servlet.ServletRequestWrapper

getParameterNames

public java.util.Enumeration getParameterNames()
Specified by:
getParameterNames in interface javax.servlet.ServletRequest
Overrides:
getParameterNames in class javax.servlet.ServletRequestWrapper

getParameterValues

public java.lang.String[] getParameterValues(java.lang.String name)
Specified by:
getParameterValues in interface javax.servlet.ServletRequest
Overrides:
getParameterValues in class javax.servlet.ServletRequestWrapper

getPortletParameterMap

private java.util.Map getPortletParameterMap()
Does the work of creating a Map of non-portal parameters for the public methods of this class to use.

Returns:
A Map of non-portal parameters.