|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.struts.upload.DiskMultipartRequestHandler
This is a MultipartRequestHandler that writes file data directly to to temporary files on disk.
Field Summary | |
protected java.util.Hashtable |
allElements
A Hashtable representing all elemnents. |
protected java.util.Hashtable |
fileElements
A Hashtable representing the form files uploaded. |
protected static org.apache.commons.logging.Log |
log
Commons Logging instance. |
protected ActionMapping |
mapping
The ActionMapping instance used for this class. |
protected ActionServlet |
servlet
The ActionServlet instance used for this class. |
protected java.lang.String |
tempDir
The temporary directory. |
protected java.util.Hashtable |
textElements
A Hashtable representing the form text input names and values. |
Fields inherited from interface org.apache.struts.upload.MultipartRequestHandler |
ATTRIBUTE_MAX_LENGTH_EXCEEDED |
Constructor Summary | |
DiskMultipartRequestHandler()
|
Method Summary | |
protected void |
createDiskFile(MultipartElement element)
|
protected void |
createTextElement(javax.servlet.http.HttpServletRequest request,
MultipartElement element)
|
void |
finish()
Calls on rollback() to delete
temporary files. |
java.util.Hashtable |
getAllElements()
This method returns all elements of a multipart request. |
java.util.Hashtable |
getFileElements()
This method is called on to retrieve all the FormFile input elements of the request. |
ActionMapping |
getMapping()
Get the ActionMapping instance for this request |
protected long |
getMaxSize(java.lang.String stringSize)
Gets the maximum post data size in bytes from the string representation in the configuration file. |
ActionServlet |
getServlet()
Get the ActionServlet instance |
java.util.Hashtable |
getTextElements()
This method is called on to retrieve all the text input elements of the request. |
void |
handleRequest(javax.servlet.http.HttpServletRequest request)
This method populates the internal hashtables with multipart request data. |
protected void |
retrieveTempDir(ModuleConfig moduleConfig)
Retrieves the temporary directory from either ActionServlet, a context property, or a system property, in that order. |
void |
rollback()
Delete all the files uploaded. |
void |
setMapping(ActionMapping mapping)
Convienience method to set a reference to a working ActionMapping instance. |
void |
setServlet(ActionServlet servlet)
Convienience method to set a reference to a working ActionServlet instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static org.apache.commons.logging.Log log
protected ActionServlet servlet
protected ActionMapping mapping
protected java.util.Hashtable fileElements
protected java.util.Hashtable textElements
protected java.util.Hashtable allElements
protected java.lang.String tempDir
Constructor Detail |
public DiskMultipartRequestHandler()
Method Detail |
public void handleRequest(javax.servlet.http.HttpServletRequest request) throws javax.servlet.ServletException
handleRequest
in interface MultipartRequestHandler
javax.servlet.ServletException
- thrown if something goes wrongprotected void createTextElement(javax.servlet.http.HttpServletRequest request, MultipartElement element)
protected void createDiskFile(MultipartElement element)
public java.util.Hashtable getAllElements()
MultipartRequestHandler
getAllElements
in interface MultipartRequestHandler
public java.util.Hashtable getTextElements()
MultipartRequestHandler
getTextElements
in interface MultipartRequestHandler
public java.util.Hashtable getFileElements()
MultipartRequestHandler
getFileElements
in interface MultipartRequestHandler
FormFile
public void rollback()
rollback
in interface MultipartRequestHandler
public void finish()
rollback()
to delete
temporary files.
finish
in interface MultipartRequestHandler
public void setServlet(ActionServlet servlet)
MultipartRequestHandler
setServlet
in interface MultipartRequestHandler
public void setMapping(ActionMapping mapping)
MultipartRequestHandler
setMapping
in interface MultipartRequestHandler
public ActionServlet getServlet()
MultipartRequestHandler
getServlet
in interface MultipartRequestHandler
public ActionMapping getMapping()
MultipartRequestHandler
getMapping
in interface MultipartRequestHandler
protected long getMaxSize(java.lang.String stringSize) throws javax.servlet.ServletException
javax.servlet.ServletException
protected void retrieveTempDir(ModuleConfig moduleConfig)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |