public class MockMultipartActionRequest extends MockActionRequest implements com.liferay.portletmvc4spring.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| Constructor and Description |
|---|
MockMultipartActionRequest() |
| Modifier and Type | Method and Description |
|---|---|
void |
addFile(MultipartFile file)
Add a file to this request.
|
MultipartFile |
getFile(java.lang.String name) |
java.util.Map<java.lang.String,MultipartFile> |
getFileMap() |
java.util.Iterator<java.lang.String> |
getFileNames() |
java.util.List<MultipartFile> |
getFiles(java.lang.String name) |
MultiValueMap<java.lang.String,MultipartFile> |
getMultiFileMap() |
java.lang.String |
getMultipartContentType(java.lang.String paramOrFileName) |
getActionParameters, getLifecyclePhasegetCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getMethod, getPart, getParts, 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, getPortletContext, getPortletMode, getPortletSession, getPortletSession, getPreferences, getPrivateParameterMap, getProperties, getProperty, getPropertyNames, getPublicParameterMap, getRemoteUser, getRenderParameters, getRequestedSessionId, getResponseContentType, getResponseContentTypes, getScheme, getServerName, getServerPort, getUserAgent, 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, getContentLengthLong, getContentType, getMethod, getPart, getParts, getPortletInputStream, getReader, setCharacterEncodinggetAttribute, getAttributeNames, getAuthType, getContextPath, getCookies, getLocale, getLocales, getParameter, getParameterMap, getParameterNames, getParameterValues, getPortalContext, getPortletContext, getPortletSession, getPortletSession, getPreferences, getPrivateParameterMap, getProperties, getProperty, getPropertyNames, getPublicParameterMap, getRemoteUser, getRequestedSessionId, getResponseContentType, getResponseContentTypes, getScheme, getServerName, getServerPort, getUserAgent, getUserPrincipal, getWindowID, isPortletModeAllowed, isRequestedSessionIdValid, isSecure, isUserInRole, isWindowStateAllowed, removeAttribute, setAttributepublic void addFile(MultipartFile file)
MultipartFile.getName().file - multipart file to be addedpublic MultipartFile getFile(java.lang.String name)
getFile in interface MultipartRequestpublic java.util.Map<java.lang.String,MultipartFile> getFileMap()
getFileMap in interface MultipartRequestpublic java.util.Iterator<java.lang.String> getFileNames()
getFileNames in interface MultipartRequestpublic java.util.List<MultipartFile> getFiles(java.lang.String name)
getFiles in interface MultipartRequestpublic MultiValueMap<java.lang.String,MultipartFile> getMultiFileMap()
getMultiFileMap in interface MultipartRequestpublic java.lang.String getMultipartContentType(java.lang.String paramOrFileName)
getMultipartContentType in interface MultipartRequestCopyright © 2020 Liferay, Inc.. All Rights Reserved.