org.springframework.web.multipart.MultipartHttpServletRequest
interface. Provides management of pre-generated parameter values.
org.springframework.web.multipart.MultipartResolver
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private Map | |
| private Map |
| Access | Constructor and Description |
|---|---|
| public | DefaultMultipartHttpServletRequest(HttpServletRequest
the servlet request to wrap request, MultiValueMap<String, MultipartFile> a map of the multipart files mpFiles, Map<String, String[]> a map of the parameters to expose,
with Strings as keys and String arrays as values mpParams, Map<String, String> mpParamContentTypes)Wrap the given HttpServletRequest in a MultipartHttpServletRequest. |
| public | DefaultMultipartHttpServletRequest(HttpServletRequest
the servlet request to wrap request)Wrap the given HttpServletRequest in a MultipartHttpServletRequest. |
| Modifier and Type | Method and Description |
|---|---|
| public String | getMultipartContentType(String
the name of the part paramOrFileName)Implements org. Determine the content type of the specified request part. |
| public HttpHeaders | getMultipartHeaders(String paramOrFileName)
Implements org. Return the headers for the specified part of the multipart request. |
| protected Map | getMultipartParameterContentTypes()
Obtain the multipart parameter content type Map for retrieval, lazily initializing it if necessary. |
| protected Map | getMultipartParameters()
Obtain the multipart parameter Map for retrieval, lazily initializing it if necessary. |
| public String | getParameter(String
a name)String specifying the name of the parameterOverrides jakarta. Implements jakarta. Returns the value of a request parameter as a |
| public Map | getParameterMap()
Overrides jakarta. Implements jakarta. Returns a java.util.Map of the parameters of this request. |
| public Enumeration | getParameterNames()
Overrides jakarta. Implements jakarta. Returns an |
| public String[] | getParameterValues(String
a name)String containing the name of the parameter whose value is requestedOverrides jakarta. Implements jakarta. Returns an array of |
| protected final void | setMultipartParameterContentTypes(Map<String, String> multipartParameterContentTypes)
Set a Map with parameter names as keys and content type Strings as values. |
| protected final void | setMultipartParameters(Map<String, String[]> multipartParameters)
Set a Map with parameter names as keys and String array objects as values. |
| CONTENT_TYPE | back to summary |
|---|---|
| private static final String CONTENT_TYPE | |
| multipartParameterContentTypes | back to summary |
|---|---|
| private Map<String, String> multipartParameterContentTypes
| |
| multipartParameters | back to summary |
|---|---|
| private Map<String, String[]> multipartParameters
| |
| DefaultMultipartHttpServletRequest | back to summary |
|---|---|
| public DefaultMultipartHttpServletRequest(HttpServletRequest request, MultiValueMap<String, MultipartFile> mpFiles, Map<String, String[]> mpParams, Map<String, String> mpParamContentTypes) Wrap the given HttpServletRequest in a MultipartHttpServletRequest.
| |
| DefaultMultipartHttpServletRequest | back to summary |
|---|---|
| public DefaultMultipartHttpServletRequest(HttpServletRequest request) Wrap the given HttpServletRequest in a MultipartHttpServletRequest.
| |
| getMultipartContentType | back to summary |
|---|---|
| public String getMultipartContentType(String paramOrFileName) Implements org. Doc from org. Determine the content type of the specified request part. | |
| getMultipartHeaders | back to summary |
|---|---|
| public HttpHeaders getMultipartHeaders(String paramOrFileName) Implements org. Doc from org. Return the headers for the specified part of the multipart request. If the underlying implementation supports access to part headers, then all headers are returned. Otherwise, e.g. for a file upload, the returned headers may expose a 'Content-Type' if available.
| |
| getMultipartParameterContentTypes | back to summary |
|---|---|
| protected Map Obtain the multipart parameter content type Map for retrieval, lazily initializing it if necessary.
| |
| getMultipartParameters | back to summary |
|---|---|
| protected Map Obtain the multipart parameter Map for retrieval, lazily initializing it if necessary.
| |
| getParameter | back to summary |
|---|---|
| public String getParameter(String name) Overrides jakarta. Implements jakarta. Doc from jakarta. Returns the value of a request parameter as a
You should only use this method when you are sure the parameter has only one value. If the parameter might have
more than one value, use
If you use this method with a multivalued parameter, the value returned is equal to the first value in the array
returned by
If the parameter data was sent in the request body, such as occurs with an HTTP POST request, then reading the
body directly via | |
| getParameterMap | back to summary |
|---|---|
| public Map Overrides jakarta. Implements jakarta. Doc from jakarta. Returns a java.util.Map of the parameters of this request. Request parameters are extra information sent with the request. For HTTP servlets, parameters are contained in the query string or posted form data. | |
| getParameterNames | back to summary |
|---|---|
| public Enumeration Overrides jakarta. Implements jakarta. Doc from jakarta. Returns an
| |
| getParameterValues | back to summary |
|---|---|
| public String[] getParameterValues(String name) Overrides jakarta. Implements jakarta. Doc from jakarta. Returns an array of If the parameter has a single value, the array has a length of 1. | |
| setMultipartParameterContentTypes | back to summary |
|---|---|
| protected final void setMultipartParameterContentTypes(Map<String, String> multipartParameterContentTypes) Set a Map with parameter names as keys and content type Strings as values. To be invoked by subclasses on initialization. | |
| setMultipartParameters | back to summary |
|---|---|
| protected final void setMultipartParameters(Map<String, String[]> multipartParameters) Set a Map with parameter names as keys and String array objects as values. To be invoked by subclasses on initialization. | |