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(java.lang.String name) |
java.util.Map<java.lang.String,org.springframework.web.multipart.MultipartFile> |
getFileMap() |
java.util.Iterator<java.lang.String> |
getFileNames() |
java.util.List<org.springframework.web.multipart.MultipartFile> |
getFiles(java.lang.String name) |
org.springframework.util.MultiValueMap<java.lang.String,org.springframework.web.multipart.MultipartFile> |
getMultiFileMap() |
java.lang.String |
getMultipartContentType(java.lang.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 java.util.Iterator<java.lang.String> getFileNames()
getFileNames
in interface org.springframework.web.multipart.MultipartRequest
public org.springframework.web.multipart.MultipartFile getFile(java.lang.String name)
getFile
in interface org.springframework.web.multipart.MultipartRequest
public java.util.List<org.springframework.web.multipart.MultipartFile> getFiles(java.lang.String name)
getFiles
in interface org.springframework.web.multipart.MultipartRequest
public java.util.Map<java.lang.String,org.springframework.web.multipart.MultipartFile> getFileMap()
getFileMap
in interface org.springframework.web.multipart.MultipartRequest
public org.springframework.util.MultiValueMap<java.lang.String,org.springframework.web.multipart.MultipartFile> getMultiFileMap()
getMultiFileMap
in interface org.springframework.web.multipart.MultipartRequest
public java.lang.String getMultipartContentType(java.lang.String paramOrFileName)
getMultipartContentType
in interface org.springframework.web.multipart.MultipartRequest