|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.ServletRequestWrapper javax.servlet.http.HttpServletRequestWrapper org.springframework.web.multipart.support.AbstractMultipartHttpServletRequest org.springframework.web.multipart.support.DefaultMultipartHttpServletRequest
public class DefaultMultipartHttpServletRequest
Default implementation of the
MultipartHttpServletRequest
interface. Provides management of pre-generated parameter values.
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,
MultiValueMap<String,MultipartFile> mpFiles,
Map<String,String[]> mpParams,
Map<String,String> mpParamContentTypes)
Wrap the given HttpServletRequest in a MultipartHttpServletRequest. |
Method Summary | |
---|---|
String |
getMultipartContentType(String paramOrFileName)
Determine the content type of the specified request part. |
HttpHeaders |
getMultipartHeaders(String paramOrFileName)
Return the headers associated with the specified part of the multipart request. |
protected Map<String,String> |
getMultipartParameterContentTypes()
Obtain the multipart parameter content type Map for retrieval, lazily initializing it if necessary. |
protected Map<String,String[]> |
getMultipartParameters()
Obtain the multipart parameter Map for retrieval, lazily initializing it if necessary. |
String |
getParameter(String name)
|
Map<String,String[]> |
getParameterMap()
|
Enumeration<String> |
getParameterNames()
|
String[] |
getParameterValues(String name)
|
protected void |
setMultipartParameterContentTypes(Map<String,String> multipartParameterContentTypes)
Set a Map with parameter names as keys and content type Strings as values. |
protected void |
setMultipartParameters(Map<String,String[]> 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, getFiles, getMultiFileMap, getMultipartFiles, getRequest, getRequestHeaders, getRequestMethod, initializeMultipart, setMultipartFiles |
Methods inherited from class javax.servlet.ServletRequestWrapper |
---|
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, 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 |
---|
public DefaultMultipartHttpServletRequest(HttpServletRequest request, MultiValueMap<String,MultipartFile> mpFiles, Map<String,String[]> mpParams, Map<String,String> mpParamContentTypes)
request
- the servlet request to wrapmpFiles
- a map of the multipart filesmpParams
- a map of the parameters to expose,
with Strings as keys and String arrays as valuespublic DefaultMultipartHttpServletRequest(HttpServletRequest request)
request
- the servlet request to wrapMethod Detail |
---|
public Enumeration<String> getParameterNames()
getParameterNames
in interface ServletRequest
getParameterNames
in class ServletRequestWrapper
public String getParameter(String name)
getParameter
in interface ServletRequest
getParameter
in class ServletRequestWrapper
public String[] getParameterValues(String name)
getParameterValues
in interface ServletRequest
getParameterValues
in class ServletRequestWrapper
public Map<String,String[]> getParameterMap()
getParameterMap
in interface ServletRequest
getParameterMap
in class ServletRequestWrapper
public String getMultipartContentType(String paramOrFileName)
MultipartRequest
paramOrFileName
- the name of the part
null
if not definedpublic HttpHeaders getMultipartHeaders(String paramOrFileName)
MultipartHttpServletRequest
If the underlying implementation supports access to headers, then all headers are returned. Otherwise, the returned headers will include a 'Content-Type' header at the very least.
protected final void setMultipartParameters(Map<String,String[]> multipartParameters)
protected Map<String,String[]> getMultipartParameters()
AbstractMultipartHttpServletRequest.initializeMultipart()
protected final void setMultipartParameterContentTypes(Map<String,String> multipartParameterContentTypes)
protected Map<String,String> getMultipartParameterContentTypes()
AbstractMultipartHttpServletRequest.initializeMultipart()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |