org.objectweb.jonas.webapp.jonasadmin.deploy
Class UploadForm

java.lang.Object
  extended by org.apache.struts.action.ActionForm
      extended by 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: 7486 $ $Date: 2005-10-07 22:30:10 +0000 (Fri, 07 Oct 2005) $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet
 
Constructor Summary
UploadForm()
           
 
Method Summary
 boolean getIsConfigurable()
          Return if the current deployment type is configurable.
 boolean getIsDomain()
          Return if the action is a domain management operation.
 org.apache.struts.upload.FormFile getUploadedFile()
           
 boolean isOverwrite()
           
 void setIsConfigurable(boolean isConfigurable)
          Sets if the current deployment type is configurable.
 void setIsDomain(boolean isDomain)
          Sets if the action is a domain management operation.
 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
 

Constructor Detail

UploadForm

public UploadForm()
Method Detail

getIsDomain

public boolean getIsDomain()
Return if the action is a domain management operation.

Returns:
if the action is a domain management operation.

setIsDomain

public void setIsDomain(boolean isDomain)
Sets if the action is a domain management operation.

Parameters:
isDomain - if the action is a domain management operation.

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.

Overrides:
validate in class org.apache.struts.action.ActionForm
Parameters:
mapping - the mapping used to select this instance
request - 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

getIsConfigurable

public boolean getIsConfigurable()
Return if the current deployment type is configurable.

Returns:
if the current deployment type is configurable.

setIsConfigurable

public void setIsConfigurable(boolean isConfigurable)
Sets if the current deployment type is configurable.

Parameters:
isDomain - if current deployment type is configurable.