public class MockMultipartActionRequest extends MockActionRequest implements org.springframework.web.portlet.multipart.MultipartActionRequest
MultipartActionRequest
interface.
Useful for testing application controllers that access multipart uploads.
The MockMultipartFile
can be used to
populate these mock requests with files.
MockMultipartFile
PortletRequest.P3PUserInfos
ACTION_NAME
ACTION_PHASE, ACTION_SCOPE_ID, BASIC_AUTH, CCPP_PROFILE, CLIENT_CERT_AUTH, DIGEST_AUTH, EVENT_PHASE, FORM_AUTH, LIFECYCLE_PHASE, RENDER_HEADERS, RENDER_MARKUP, RENDER_PART, RENDER_PHASE, RESOURCE_PHASE, USER_INFO
Constructor and Description |
---|
MockMultipartActionRequest() |
Modifier and Type | Method and Description |
---|---|
void |
addFile(org.springframework.web.multipart.MultipartFile file)
Add a file to this request.
|
org.springframework.web.multipart.MultipartFile |
getFile(String name) |
Map<String,org.springframework.web.multipart.MultipartFile> |
getFileMap() |
Iterator<String> |
getFileNames() |
List<org.springframework.web.multipart.MultipartFile> |
getFiles(String name) |
org.springframework.util.MultiValueMap<String,org.springframework.web.multipart.MultipartFile> |
getMultiFileMap() |
String |
getMultipartContentType(String paramOrFileName) |
getLifecyclePhase
getCharacterEncoding, getContentLength, getContentType, getMethod, getPortletInputStream, getReader, setCharacterEncoding, setContent, setContentType, setMethod
addLocale, addParameter, addParameter, addPreferredLocale, addPreferredResponseContentType, addProperty, addResponseContentType, addUserRole, checkActive, close, getAttribute, getAttributeNames, getAuthType, getContextPath, getCookies, getLocale, getLocales, getParameter, getParameterMap, getParameterNames, getParameterValues, getPortalContext, getPortletMode, getPortletSession, getPortletSession, getPreferences, getPrivateParameterMap, getProperties, getProperty, getPropertyNames, getPublicParameterMap, getRemoteUser, getRequestedSessionId, getResponseContentType, getResponseContentTypes, getScheme, getServerName, getServerPort, getUserPrincipal, getWindowID, getWindowState, isActive, isPortletModeAllowed, isRequestedSessionIdValid, isSecure, isUserInRole, isWindowStateAllowed, registerPublicParameter, removeAttribute, setAttribute, setAuthType, setContextPath, setCookies, setParameter, setParameter, setParameters, setPortletMode, setPreferences, setProperty, setRemoteUser, setRequestedSessionIdValid, setScheme, setSecure, setServerName, setServerPort, setSession, setUserPrincipal, setWindowID, setWindowState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCharacterEncoding, getContentLength, getContentType, getMethod, getPortletInputStream, getReader, setCharacterEncoding
getAttribute, getAttributeNames, getAuthType, getContextPath, getCookies, getLocale, getLocales, getParameter, getParameterMap, getParameterNames, getParameterValues, getPortalContext, getPortletMode, getPortletSession, getPortletSession, getPreferences, getPrivateParameterMap, getProperties, getProperty, getPropertyNames, getPublicParameterMap, getRemoteUser, getRequestedSessionId, getResponseContentType, getResponseContentTypes, getScheme, getServerName, getServerPort, getUserPrincipal, getWindowID, getWindowState, isPortletModeAllowed, isRequestedSessionIdValid, isSecure, isUserInRole, isWindowStateAllowed, removeAttribute, setAttribute
public void addFile(org.springframework.web.multipart.MultipartFile file)
MultipartFile.getName()
.file
- multipart file to be addedpublic Iterator<String> getFileNames()
getFileNames
in interface org.springframework.web.multipart.MultipartRequest
public org.springframework.web.multipart.MultipartFile getFile(String name)
getFile
in interface org.springframework.web.multipart.MultipartRequest
public List<org.springframework.web.multipart.MultipartFile> getFiles(String name)
getFiles
in interface org.springframework.web.multipart.MultipartRequest
public Map<String,org.springframework.web.multipart.MultipartFile> getFileMap()
getFileMap
in interface org.springframework.web.multipart.MultipartRequest
public org.springframework.util.MultiValueMap<String,org.springframework.web.multipart.MultipartFile> getMultiFileMap()
getMultiFileMap
in interface org.springframework.web.multipart.MultipartRequest