Esri Geoportal Server
1.0

com.esri.gpt.control.filter
Class MultipartWrapper

java.lang.Object
  extended by javax.servlet.ServletRequestWrapper
      extended by javax.servlet.http.HttpServletRequestWrapper
          extended by com.esri.gpt.control.filter.MultipartWrapper
All Implemented Interfaces:
HttpServletRequest, ServletRequest

public class MultipartWrapper
extends HttpServletRequestWrapper

HTTP servlet request wrapper for a multipart requests.

The wrapper uses the org.apache.commons.fileupload package for parsing and handling the incoming request.

The typical usage is based upon an incoming form with an enctype of multipart/form-data.

org.apache.commons.fileupload.FileUploadBase$FileSizeLimitExceededException is the exception thrown when the uploaded file size exceeds the limit.


Field Summary
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
MultipartWrapper(HttpServletRequest request)
          Construct with a current HTTP servlet request.
 
Method Summary
 String getParameter(String name)
          Gets the form parameter value associated with a name.
 Map getParameterMap()
          Gets the form parameter map.
 Enumeration getParameterNames()
          Gets the form parameter names.
 String[] getParameterValues(String name)
          Gets the form parameter values associated with a name.
static boolean isMultipartContent(ServletRequest request)
          Determine if a request contains multipart content.
 
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, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, 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, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding
 

Constructor Detail

MultipartWrapper

public MultipartWrapper(HttpServletRequest request)
                 throws org.apache.commons.fileupload.FileUploadException
Construct with a current HTTP servlet request.

Parameters:
request - the current HTTP servlet request
Throws:
org.apache.commons.fileupload.FileUploadException - if an exception occurs during file upload
Method Detail

getParameter

public String getParameter(String name)
Gets the form parameter value associated with a name.

Specified by:
getParameter in interface ServletRequest
Overrides:
getParameter in class ServletRequestWrapper
Parameters:
name - the subject parameter name
Returns:
the associated value (null if none)

getParameterMap

public Map getParameterMap()
Gets the form parameter map.

Specified by:
getParameterMap in interface ServletRequest
Overrides:
getParameterMap in class ServletRequestWrapper
Returns:
the form parameter map

getParameterNames

public Enumeration getParameterNames()
Gets the form parameter names.

Specified by:
getParameterNames in interface ServletRequest
Overrides:
getParameterNames in class ServletRequestWrapper
Returns:
the form parameter names

getParameterValues

public String[] getParameterValues(String name)
Gets the form parameter values associated with a name.

Specified by:
getParameterValues in interface ServletRequest
Overrides:
getParameterValues in class ServletRequestWrapper
Parameters:
name - the subject parameter name
Returns:
the associated values (null if none)

isMultipartContent

public static boolean isMultipartContent(ServletRequest request)
Determine if a request contains multipart content.

Parameters:
request - the current request
Returns:
true if the request contains multipart content

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.