public class

DefaultMultipartActionRequest

extends ActionRequestWrapper
implements MultipartActionRequest
java.lang.Object
   ↳ ActionRequestWrapper
     ↳ org.springframework.web.portlet.multipart.DefaultMultipartActionRequest

Class Overview

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

Summary

Public Constructors
DefaultMultipartActionRequest(ActionRequest request, MultiValueMap<StringMultipartFile> mpFiles, Map<StringString[]> mpParams)
Wrap the given Portlet ActionRequest in a MultipartActionRequest.
Protected Constructors
DefaultMultipartActionRequest(ActionRequest request)
Wrap the given Portlet ActionRequest in a MultipartActionRequest.
Public Methods
MultipartFile getFile(String name)
Return the contents plus description of an uploaded file in this request, or null if it does not exist.
Map<StringMultipartFile> getFileMap()
Return a Map of the multipart files contained in this request.
Iterator<String> getFileNames()
Return an Iterator of String objects containing the parameter names of the multipart files contained in this request.
List<MultipartFile> getFiles(String name)
Return the contents plus description of uploaded files in this request, or an empty list if it does not exist.
MultiValueMap<StringMultipartFile> getMultiFileMap()
Return a MultiValueMap of the multipart files contained in this request.
String getParameter(String name)
Map<StringString[]> getParameterMap()
Enumeration<String> getParameterNames()
String[] getParameterValues(String name)
Protected Methods
MultiValueMap<StringMultipartFile> getMultipartFiles()
Obtain the MultipartFile Map for retrieval, lazily initializing it if necessary.
Map<StringString[]> getMultipartParameters()
Obtain the multipart parameter Map for retrieval, lazily initializing it if necessary.
void initializeMultipart()
Lazily initialize the multipart request, if possible.
final void setMultipartFiles(MultiValueMap<StringMultipartFile> multipartFiles)
Set a Map with parameter names as keys and list of MultipartFile objects as values.
final void setMultipartParameters(Map<StringString[]> multipartParameters)
Set a Map with parameter names as keys and String array objects as values.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.web.multipart.MultipartRequest

Public Constructors

public DefaultMultipartActionRequest (ActionRequest request, MultiValueMap<StringMultipartFile> mpFiles, Map<StringString[]> mpParams)

Wrap the given Portlet ActionRequest in a MultipartActionRequest.

Parameters
request the request to wrap
mpFiles a map of the multipart files
mpParams a map of the parameters to expose, with Strings as keys and String arrays as values

Protected Constructors

protected DefaultMultipartActionRequest (ActionRequest request)

Wrap the given Portlet ActionRequest in a MultipartActionRequest.

Parameters
request the request to wrap

Public Methods

public MultipartFile getFile (String name)

Return the contents plus description of an uploaded file in this request, or null if it does not exist.

Parameters
name a String specifying the parameter name of the multipart file
Returns

public Map<StringMultipartFile> getFileMap ()

Return a Map of the multipart files contained in this request.

Returns
  • a map containing the parameter names as keys, and the MultipartFile objects as values

public Iterator<String> getFileNames ()

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.

Returns
  • the names of the files

public List<MultipartFile> getFiles (String name)

Return the contents plus description of uploaded files in this request, or an empty list if it does not exist.

Parameters
name a String specifying the parameter name of the multipart file
Returns

public MultiValueMap<StringMultipartFile> getMultiFileMap ()

Return a MultiValueMap of the multipart files contained in this request.

Returns
  • a map containing the parameter names as keys, and a list of MultipartFile objects as values

public String getParameter (String name)

public Map<StringString[]> getParameterMap ()

public Enumeration<String> getParameterNames ()

public String[] getParameterValues (String name)

Protected Methods

protected MultiValueMap<StringMultipartFile> getMultipartFiles ()

Obtain the MultipartFile Map for retrieval, lazily initializing it if necessary.

protected Map<StringString[]> getMultipartParameters ()

Obtain the multipart parameter Map for retrieval, lazily initializing it if necessary.

protected void initializeMultipart ()

Lazily initialize the multipart request, if possible. Only called if not already eagerly initialized.

protected final void setMultipartFiles (MultiValueMap<StringMultipartFile> multipartFiles)

Set a Map with parameter names as keys and list of MultipartFile objects as values. To be invoked by subclasses on initialization.

protected final void setMultipartParameters (Map<StringString[]> multipartParameters)

Set a Map with parameter names as keys and String array objects as values. To be invoked by subclasses on initialization.