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.
MockMultipartFilePortletRequest.P3PUserInfosACTION_NAMEACTION_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) |
getLifecyclePhasegetCharacterEncoding, getContentLength, getContentType, getMethod, getPortletInputStream, getReader, setCharacterEncoding, setContent, setContentType, setMethodaddLocale, 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, setWindowStateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCharacterEncoding, getContentLength, getContentType, getMethod, getPortletInputStream, getReader, setCharacterEncodinggetAttribute, 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, setAttributepublic 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.MultipartRequestpublic org.springframework.web.multipart.MultipartFile getFile(String name)
getFile in interface org.springframework.web.multipart.MultipartRequestpublic List<org.springframework.web.multipart.MultipartFile> getFiles(String name)
getFiles in interface org.springframework.web.multipart.MultipartRequestpublic Map<String,org.springframework.web.multipart.MultipartFile> getFileMap()
getFileMap in interface org.springframework.web.multipart.MultipartRequestpublic org.springframework.util.MultiValueMap<String,org.springframework.web.multipart.MultipartFile> getMultiFileMap()
getMultiFileMap in interface org.springframework.web.multipart.MultipartRequest