org.objectweb.jonas.webapp.jonasadmin.deploy
Class UploadForm
java.lang.Object
org.apache.struts.action.ActionForm
org.objectweb.jonas.webapp.jonasadmin.deploy.UploadForm
- All Implemented Interfaces:
- java.io.Serializable
- public class UploadForm
- extends org.apache.struts.action.ActionForm
This class is a placeholder for form values. In a multipart request, files are represented by
set and get methods that use the class org.apache.struts.upload.FormFile, an interface with
basic methods to retrieve file information. The actual structure of the FormFile is dependant
on the underlying impelementation of multipart request handling. The default implementation
that struts uses is org.apache.struts.upload.CommonsMultipartRequestHandler.
- Version:
- $Rev$ $Date: 2005/05/23 14:20:32 $
- See Also:
- Serialized Form
Fields inherited from class org.apache.struts.action.ActionForm |
multipartRequestHandler, servlet |
Method Summary |
org.apache.struts.upload.FormFile |
getUploadedFile()
|
boolean |
isOverwrite()
|
void |
setOverwrite(boolean overwrite)
Replace the existing file ? |
void |
setUploadedFile(org.apache.struts.upload.FormFile uploadedFile)
Set a representation of the file the user has uploaded |
org.apache.struts.action.ActionErrors |
validate(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
Check to make sure the client hasn't exceeded the maximum allowed upload size inside of this
validate method. |
Methods inherited from class org.apache.struts.action.ActionForm |
getMultipartRequestHandler, getServlet, getServletWrapper, reset, reset, setMultipartRequestHandler, setServlet, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UploadForm
public UploadForm()
getUploadedFile
public org.apache.struts.upload.FormFile getUploadedFile()
- Returns:
- a representation of the file the user has uploaded
setUploadedFile
public void setUploadedFile(org.apache.struts.upload.FormFile uploadedFile)
- Set a representation of the file the user has uploaded
- Parameters:
uploadedFile
- the file uploaded
validate
public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
- Check to make sure the client hasn't exceeded the maximum allowed upload size inside of this
validate method.
- Parameters:
mapping
- the mapping used to select this instancerequest
- the servlet request we are processing
- Returns:
- Errors if it fails
isOverwrite
public boolean isOverwrite()
- Returns:
- true if the file will be overwritten
setOverwrite
public void setOverwrite(boolean overwrite)
- Replace the existing file ?
- Parameters:
overwrite
- true/false