org.springframework.web.multipart.support
Class DefaultMultipartHttpServletRequest

java.lang.Object
  extended by javax.servlet.ServletRequestWrapper
      extended by javax.servlet.http.HttpServletRequestWrapper
          extended by org.springframework.web.multipart.support.AbstractMultipartHttpServletRequest
              extended by org.springframework.web.multipart.support.DefaultMultipartHttpServletRequest
All Implemented Interfaces:
HttpServletRequest, ServletRequest, MultipartHttpServletRequest, MultipartRequest

public class DefaultMultipartHttpServletRequest
extends AbstractMultipartHttpServletRequest

Default implementation of the MultipartHttpServletRequest interface. Provides management of pre-generated parameter values.

Since:
29.09.2003
Author:
Trevor D. Cook, Juergen Hoeller
See Also:
MultipartResolver

Field Summary
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
DefaultMultipartHttpServletRequest(HttpServletRequest request)
          Wrap the given HttpServletRequest in a MultipartHttpServletRequest.
DefaultMultipartHttpServletRequest(HttpServletRequest request, Map multipartFiles, Map multipartParameters)
          Wrap the given HttpServletRequest in a MultipartHttpServletRequest.
 
Method Summary
protected  Map getMultipartParameters()
          Obtain the multipart parameter Map for retrieval, lazily initializing it if necessary.
 String getParameter(String name)
           
 Map getParameterMap()
           
 Enumeration getParameterNames()
           
 String[] getParameterValues(String name)
           
protected  void setMultipartParameters(Map multipartParameters)
          Set a Map with parameter names as keys and String array objects as values.
 
Methods inherited from class org.springframework.web.multipart.support.AbstractMultipartHttpServletRequest
getFile, getFileMap, getFileNames, getMultipartFiles, initializeMultipart, setMultipartFiles
 
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.http.HttpServletRequest
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 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

DefaultMultipartHttpServletRequest

public DefaultMultipartHttpServletRequest(HttpServletRequest request,
                                          Map multipartFiles,
                                          Map multipartParameters)
Wrap the given HttpServletRequest in a MultipartHttpServletRequest.

Parameters:
request - the servlet request to wrap
multipartFiles - a map of the multipart files
multipartParameters - a map of the parameters to expose, with Strings as keys and String arrays as values

DefaultMultipartHttpServletRequest

public DefaultMultipartHttpServletRequest(HttpServletRequest request)
Wrap the given HttpServletRequest in a MultipartHttpServletRequest.

Parameters:
request - the servlet request to wrap
Method Detail

getParameterNames

public Enumeration getParameterNames()
Specified by:
getParameterNames in interface ServletRequest
Overrides:
getParameterNames in class ServletRequestWrapper

getParameter

public String getParameter(String name)
Specified by:
getParameter in interface ServletRequest
Overrides:
getParameter in class ServletRequestWrapper

getParameterValues

public String[] getParameterValues(String name)
Specified by:
getParameterValues in interface ServletRequest
Overrides:
getParameterValues in class ServletRequestWrapper

getParameterMap

public Map getParameterMap()
Specified by:
getParameterMap in interface ServletRequest
Overrides:
getParameterMap in class ServletRequestWrapper

setMultipartParameters

protected final void setMultipartParameters(Map multipartParameters)
Set a Map with parameter names as keys and String array objects as values. To be invoked by subclasses on initialization.


getMultipartParameters

protected Map getMultipartParameters()
Obtain the multipart parameter Map for retrieval, lazily initializing it if necessary.

See Also:
AbstractMultipartHttpServletRequest.initializeMultipart()


Copyright © 2002-2008 The Spring Framework.