Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jasig.portal
Class RequestParamWrapper

    java.lang.Object
      javax.servlet.ServletRequestWrapper
          javax.servlet.http.HttpServletRequestWrapper
              org.jasig.portal.RequestParamWrapper

All Implemented Interfaces:
  javax.servlet.http.HttpServletRequest, javax.servlet.ServletRequest

    public class RequestParamWrapper

extends javax.servlet.http.HttpServletRequestWrapper

Wraps an http request object to prevent unverified requests from accessing any of the request parameters.

Version:
  $Revision: 1.16.2.1 $
Author:
  Peter Kharchenko

Field Summary
`private static int` | `DEFAULT_SIZE_LIMIT` Default value for the upload size limit.
`protected java.util.Map` | `parameters`
`protected boolean` | `request_verified`
`private static int` | `sizeLimit`

Fields inherited from interface javax.servlet.http.HttpServletRequest
`BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH`

Constructor Summary
`RequestParamWrapper(javax.servlet.http.HttpServletRequest source, boolean request_verified)` Creates a new `RequestParamWrapper` instance.

Method Summary
`java.lang.Object[]` | `getObjectParameterValues(java.lang.String name)` Return the Object represented by this parameter name
`java.lang.String` | `getParameter(java.lang.String name)` Overloaded method
`java.util.Map` | `getParameterMap()` Overloaded method
`java.util.Enumeration` | `getParameterNames()` Overloaded method
`java.lang.String[]` | `getParameterValues(java.lang.String name)` Return a String[] for this parameter
`private void` | `setFileUploadMaxSize()`

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

### parameters

    protected final java.util.Map parameters

### request_verified

    protected boolean request_verified

### sizeLimit

    private static int sizeLimit

### DEFAULT_SIZE_LIMIT

    private static final int DEFAULT_SIZE_LIMIT

  Default value for the upload size limit. This value will be used when we are unable to load the corresponding property.

  See Also:
    Constant Field Values

Constructor Detail

### RequestParamWrapper

    public RequestParamWrapper(javax.servlet.http.HttpServletRequest source,
                               boolean request_verified)

  Creates a new `RequestParamWrapper` instance.

  Parameters:
    `source` - an `HttpServletRequest` value that's being wrapped.
    `request_verified` - a `boolean` flag that determines if the request params should be accessable.

Method Detail

### getParameter

    public java.lang.String getParameter(java.lang.String name)

  Overloaded method

  Specified by:
    `getParameter` in interface `javax.servlet.ServletRequest`
  Overrides:
    `getParameter` in class `javax.servlet.ServletRequestWrapper`
  Parameters:
    `name` - the parameter name
  Returns:
    parameter

### getParameterNames

    public java.util.Enumeration getParameterNames()

  Overloaded method

  Specified by:
    `getParameterNames` in interface `javax.servlet.ServletRequest`
  Overrides:
    `getParameterNames` in class `javax.servlet.ServletRequestWrapper`
  Returns:
    parameter names

### getParameterValues

    public java.lang.String[] getParameterValues(java.lang.String name)

  Return a String[] for this parameter

  Specified by:
    `getParameterValues` in interface `javax.servlet.ServletRequest`
  Overrides:
    `getParameterValues` in class `javax.servlet.ServletRequestWrapper`
  Parameters:
    `name` - the parameter name
  Returns:
    String[] if parameter is not an Object[]

### getParameterMap

    public java.util.Map getParameterMap()

  Overloaded method

  Specified by:
    `getParameterMap` in interface `javax.servlet.ServletRequest`
  Overrides:
    `getParameterMap` in class `javax.servlet.ServletRequestWrapper`
  Returns:
    a `Map` value

### getObjectParameterValues

    public java.lang.Object[] getObjectParameterValues(java.lang.String name)

  Return the Object represented by this parameter name

  Parameters:
    `name` - the parameter name
  Returns:
    Object

### setFileUploadMaxSize

    private void setFileUploadMaxSize()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD