public class UploadServletRequestImpl
extends javax.servlet.http.HttpServletRequestWrapper
implements com.liferay.portal.kernel.upload.UploadServletRequest
Constructor and Description |
---|
UploadServletRequestImpl(javax.servlet.http.HttpServletRequest request) |
UploadServletRequestImpl(javax.servlet.http.HttpServletRequest request,
Map<String,com.liferay.portal.kernel.upload.FileItem[]> fileParameters,
Map<String,List<String>> regularParameters) |
Modifier and Type | Method and Description |
---|---|
void |
cleanUp() |
String |
getContentType(String name) |
File |
getFile(String name) |
File |
getFile(String name,
boolean forceCreate) |
InputStream |
getFileAsStream(String name) |
InputStream |
getFileAsStream(String name,
boolean deleteOnClose) |
String |
getFileName(String name) |
String[] |
getFileNames(String name) |
File[] |
getFiles(String name) |
InputStream[] |
getFilesAsStream(String name) |
InputStream[] |
getFilesAsStream(String name,
boolean deleteOnClose) |
String |
getFullFileName(String name) |
javax.servlet.ServletInputStream |
getInputStream() |
protected InputStream |
getInputStream(com.liferay.portal.kernel.upload.FileItem liferayFileItem,
boolean deleteOnClose) |
Map<String,com.liferay.portal.kernel.upload.FileItem[]> |
getMultipartParameterMap() |
String |
getParameter(String name) |
Map<String,String[]> |
getParameterMap() |
Enumeration<String> |
getParameterNames() |
String[] |
getParameterValues(String name) |
Map<String,List<String>> |
getRegularParameterMap() |
Long |
getSize(String name) |
static File |
getTempDir() |
Boolean |
isFormField(String name) |
static void |
setTempDir(File tempDir) |
protected List<org.apache.commons.fileupload.FileItem> |
sort(List<org.apache.commons.fileupload.FileItem> fileItems) |
authenticate, getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole, login, logout
getAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getDispatcherType, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, removeAttribute, setAttribute, setCharacterEncoding, setRequest, startAsync, startAsync
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
authenticate, getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole, login, logout
getAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getDispatcherType, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, removeAttribute, setAttribute, setCharacterEncoding, startAsync, startAsync
public UploadServletRequestImpl(javax.servlet.http.HttpServletRequest request)
public UploadServletRequestImpl(javax.servlet.http.HttpServletRequest request, Map<String,com.liferay.portal.kernel.upload.FileItem[]> fileParameters, Map<String,List<String>> regularParameters)
public static File getTempDir()
public static void setTempDir(File tempDir)
public void cleanUp()
cleanUp
in interface com.liferay.portal.kernel.upload.UploadRequest
public String getContentType(String name)
getContentType
in interface com.liferay.portal.kernel.upload.UploadRequest
public File getFile(String name)
getFile
in interface com.liferay.portal.kernel.upload.UploadRequest
public File getFile(String name, boolean forceCreate)
getFile
in interface com.liferay.portal.kernel.upload.UploadRequest
public InputStream getFileAsStream(String name) throws IOException
getFileAsStream
in interface com.liferay.portal.kernel.upload.UploadRequest
IOException
public InputStream getFileAsStream(String name, boolean deleteOnClose) throws IOException
getFileAsStream
in interface com.liferay.portal.kernel.upload.UploadRequest
IOException
public String getFileName(String name)
getFileName
in interface com.liferay.portal.kernel.upload.UploadRequest
public String[] getFileNames(String name)
getFileNames
in interface com.liferay.portal.kernel.upload.UploadRequest
public File[] getFiles(String name)
getFiles
in interface com.liferay.portal.kernel.upload.UploadRequest
public InputStream[] getFilesAsStream(String name) throws IOException
getFilesAsStream
in interface com.liferay.portal.kernel.upload.UploadRequest
IOException
public InputStream[] getFilesAsStream(String name, boolean deleteOnClose) throws IOException
getFilesAsStream
in interface com.liferay.portal.kernel.upload.UploadRequest
IOException
public String getFullFileName(String name)
getFullFileName
in interface com.liferay.portal.kernel.upload.UploadRequest
public javax.servlet.ServletInputStream getInputStream() throws IOException
getInputStream
in interface javax.servlet.ServletRequest
getInputStream
in class javax.servlet.ServletRequestWrapper
IOException
public Map<String,com.liferay.portal.kernel.upload.FileItem[]> getMultipartParameterMap()
getMultipartParameterMap
in interface com.liferay.portal.kernel.upload.UploadRequest
public String getParameter(String name)
getParameter
in interface javax.servlet.ServletRequest
getParameter
in class javax.servlet.ServletRequestWrapper
public Map<String,String[]> getParameterMap()
getParameterMap
in interface javax.servlet.ServletRequest
getParameterMap
in class javax.servlet.ServletRequestWrapper
public Enumeration<String> getParameterNames()
getParameterNames
in interface javax.servlet.ServletRequest
getParameterNames
in class javax.servlet.ServletRequestWrapper
public String[] getParameterValues(String name)
getParameterValues
in interface javax.servlet.ServletRequest
getParameterValues
in class javax.servlet.ServletRequestWrapper
public Map<String,List<String>> getRegularParameterMap()
getRegularParameterMap
in interface com.liferay.portal.kernel.upload.UploadRequest
public Long getSize(String name)
getSize
in interface com.liferay.portal.kernel.upload.UploadRequest
public Boolean isFormField(String name)
isFormField
in interface com.liferay.portal.kernel.upload.UploadRequest
protected InputStream getInputStream(com.liferay.portal.kernel.upload.FileItem liferayFileItem, boolean deleteOnClose) throws IOException
IOException
protected List<org.apache.commons.fileupload.FileItem> sort(List<org.apache.commons.fileupload.FileItem> fileItems)