|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object CommonsMultipartRequestHandler com.ibm.wps.portlets.struts.upload.WpsCommonsMultipartRequestHandler
public class WpsCommonsMultipartRequestHandler
This is a modified version of the Struts CommonsMultipartRequestHandler that has the DBCS fix for the file name. This request handler will not be needed in future releases of Struts.
Field Summary | |
---|---|
protected java.util.Hashtable |
elementsAll
The combined text and file request parameters. |
protected java.util.Hashtable |
elementsFile
The file request parameters. |
protected java.util.Hashtable |
elementsText
The text request parameters. |
protected static Log |
log
The commons-logging instance for this class. |
Constructor Summary | |
---|---|
WpsCommonsMultipartRequestHandler()
WpsCommonsMultipartRequestHandler constructor. |
Method Summary | |
---|---|
protected void |
addFileParameter(HttpServletRequest request,
FileItem item)
Adds a file parameter to the set of file parameters for this request and also to the list of all parameters. |
protected void |
addTextParameter(HttpServletRequest request,
FileItem item)
Adds a regular text parameter to the set of text parameters for this request and also to the list of all parameters. |
void |
finish()
Cleans up at the end of a request. |
java.util.Hashtable |
getAllElements()
Returns a hash table containing both text and file request parameters. |
java.util.Hashtable |
getFileElements()
Returns a hash table containing the file (that is, non-text) request parameters. |
protected long |
getSizeFieldThreshold(ModuleConfig mc)
Returns the size field threshold which determines whether an uploaded file will be written to disk or cached in memory. |
java.util.Hashtable |
getTextElements()
Returns a hash table containing the text (that is, non-file) request parameters. |
void |
handleRequest(HttpServletRequest request)
Parses the input stream and partitions the parsed items into a set of form fields and a set of file items. |
void |
rollback()
Cleans up when a problem occurs during request processing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static Log log
protected java.util.Hashtable elementsAll
protected java.util.Hashtable elementsFile
protected java.util.Hashtable elementsText
Constructor Detail |
---|
public WpsCommonsMultipartRequestHandler()
Method Detail |
---|
public void handleRequest(HttpServletRequest request) throws ServletException
FileItem
instances
to Struts FormFile
instances.
request
- The multipart request to be processed.
ServletException
- if an unrecoverable error occurs.public java.util.Hashtable getTextElements()
public java.util.Hashtable getFileElements()
public java.util.Hashtable getAllElements()
public void rollback()
public void finish()
protected void addTextParameter(HttpServletRequest request, FileItem item)
request
- The request in which the parameter was specified.item
- The file item for the parameter to add.protected void addFileParameter(HttpServletRequest request, FileItem item)
item
- The file item for the parameter to add.protected long getSizeFieldThreshold(ModuleConfig mc)
mc
- The current module's configuration.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |