Package com.atlassian.jira.web
Class TempFileRemovingMultipartRequestWrapper
java.lang.Object
webwork.multipart.MultiPartRequest
com.atlassian.jira.web.TempFileRemovingMultipartRequestWrapper
Wrapper class so that we can parse and replace special characters in the request params.
-
Field Summary
Fields inherited from class webwork.multipart.MultiPartRequest
log -
Constructor Summary
ConstructorsConstructorDescriptionTempFileRemovingMultipartRequestWrapper(javax.servlet.http.HttpServletRequest servletRequest, String saveDir, int maxSize) -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()Deletes all the temporary files; Intentionally not abstract to preserve backwards compatibility Not abstract to preserve backwards compatibility.getContentType(String name) Get the File as saved by the multipart parser on the server filesystem.getFilesystemName(String name) Get the client file name of the specified uploaded file.getParameter(String name) String[]getParameterValues(String name) Methods inherited from class webwork.multipart.MultiPartRequest
isMultiPart
-
Constructor Details
-
TempFileRemovingMultipartRequestWrapper
public TempFileRemovingMultipartRequestWrapper(javax.servlet.http.HttpServletRequest servletRequest, String saveDir, int maxSize) - Parameters:
servletRequest- the request containing the multipartsaveDir- the directory to save off the filemaxSize- maximum size post allowed
-
-
Method Details
-
getParameterNames
- Specified by:
getParameterNamesin classMultiPartRequest
-
getParameter
- Specified by:
getParameterin classMultiPartRequest
-
getParameterValues
- Specified by:
getParameterValuesin classMultiPartRequest
-
getFileNames
- Specified by:
getFileNamesin classMultiPartRequest
-
getFilesystemName
Description copied from class:MultiPartRequestGet the client file name of the specified uploaded file.- Specified by:
getFilesystemNamein classMultiPartRequest- Parameters:
name- the parameter name of the uploaded file- Returns:
- The client filename
-
getContentType
- Specified by:
getContentTypein classMultiPartRequest
-
getFile
Description copied from class:MultiPartRequestGet the File as saved by the multipart parser on the server filesystem.- Specified by:
getFilein classMultiPartRequest- Parameters:
name- The parameter name of the uploaded file- Returns:
- the File on the local filesystem, or null if the multipart parser has not stored the file on disk (for example, if it is a memory based file upload)
-
cleanup
public void cleanup()Description copied from class:MultiPartRequestDeletes all the temporary files; Intentionally not abstract to preserve backwards compatibility Not abstract to preserve backwards compatibility. Please override in subclass if you want to support the cleanup after request.- Overrides:
cleanupin classMultiPartRequest
-