com.atlassian.confluence.setup.webwork
Class JakartaMultiPartRequest
java.lang.Object
com.opensymphony.webwork.dispatcher.multipart.MultiPartRequest
com.atlassian.confluence.setup.webwork.JakartaMultiPartRequest
public class JakartaMultiPartRequest
- extends MultiPartRequest
Multipart form data request adapter for Jakarta's file upload package.
This class has been imported from Webwork 2.1.5 and been modified to:
- support the latest Jakarta Commons Fileupload API
- mimmick the way the Pell multipart library reports excess upload size, an IO exception is thrown to be collected
by the
MultiPartRequestWrapper. The format of the message is
unfortunately relied upon by our error reporting mechanisms and needs to be preserved between the implementations.
- Author:
- Bruce Ritchie
- See Also:
GeneralUtil.getUploadFileTooLargeMessage(String)
|
Constructor Summary |
JakartaMultiPartRequest(HttpServletRequest servletRequest,
String saveDir,
int maxSize)
Creates a new request wrapper to handle multi-part data using methods adapted from Jason Pell's
multipart classes (see class description). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JakartaMultiPartRequest
public JakartaMultiPartRequest(HttpServletRequest servletRequest,
String saveDir,
int maxSize)
throws IOException
- Creates a new request wrapper to handle multi-part data using methods adapted from Jason Pell's
multipart classes (see class description).
- Parameters:
maxSize - maximum size post allowedsaveDir - the directory to save off the fileservletRequest - the request containing the multipart
- Throws:
IOException - is thrown if encoding fails.
getFileParameterNames
public Enumeration getFileParameterNames()
- Specified by:
getFileParameterNames in class MultiPartRequest
getContentType
public String[] getContentType(String fieldName)
- Specified by:
getContentType in class MultiPartRequest
getFile
public File[] getFile(String fieldName)
- Specified by:
getFile in class MultiPartRequest
getFileNames
public String[] getFileNames(String fieldName)
- Specified by:
getFileNames in class MultiPartRequest
getFilesystemName
public String[] getFilesystemName(String fieldName)
- Specified by:
getFilesystemName in class MultiPartRequest
getParameter
public String getParameter(String name)
- Specified by:
getParameter in class MultiPartRequest
getParameterNames
public Enumeration getParameterNames()
- Specified by:
getParameterNames in class MultiPartRequest
getParameterValues
public String[] getParameterValues(String name)
- Specified by:
getParameterValues in class MultiPartRequest
getErrors
public List getErrors()