java.lang.Object | ||||
↳ | org.springframework.mock.web.portlet.MockPortletRequest | |||
↳ | org.springframework.mock.web.portlet.MockClientDataRequest | |||
↳ | org.springframework.mock.web.portlet.MockActionRequest | |||
↳ | org.springframework.mock.web.portlet.MockMultipartActionRequest |
Mock implementation of the
MultipartActionRequest
interface.
Useful for testing application controllers that access multipart uploads.
The MockMultipartFile
can be used to
populate these mock requests with files.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Add a file to this request.
| |||||||||||
Return the contents plus description of an uploaded file in this request,
or
null if it does not exist. | |||||||||||
Return a
Map of the multipart files contained in this request. | |||||||||||
Return an
Iterator of String objects containing the
parameter names of the multipart files contained in this request. | |||||||||||
Return the contents plus description of uploaded files in this request,
or an empty list if it does not exist.
| |||||||||||
Return a
MultiValueMap of the multipart files contained in this request. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.mock.web.portlet.MockActionRequest
| |||||||||||
From class
org.springframework.mock.web.portlet.MockClientDataRequest
| |||||||||||
From class
org.springframework.mock.web.portlet.MockPortletRequest
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.web.multipart.MultipartRequest
|
Add a file to this request. The parameter name from the multipart
form is taken from the getName()
.
file | multipart file to be added |
---|
Return the contents plus description of an uploaded file in this request,
or null
if it does not exist.
name | a String specifying the parameter name of the multipart file |
---|
MultipartFile
object
Return a Map
of the multipart files contained in this request.
MultipartFile
objects as values
Return an Iterator
of String objects containing the
parameter names of the multipart files contained in this request. These
are the field names of the form (like with normal parameters), not the
original file names.
Return the contents plus description of uploaded files in this request, or an empty list if it does not exist.
name | a String specifying the parameter name of the multipart file |
---|
MultipartFile
listReturn a MultiValueMap
of the multipart files contained in this request.
MultipartFile
objects as values