org.davesag.generica.servlet.form
Class UploadForm

java.lang.Object
  extended byorg.apache.struts.action.ActionForm
      extended byorg.apache.struts.action.DynaActionForm
          extended byorg.apache.struts.validator.DynaValidatorForm
              extended byorg.davesag.generica.servlet.form.GenericForm
                  extended byorg.davesag.generica.servlet.form.UploadForm
All Implemented Interfaces:
DynaBean, Serializable

public class UploadForm
extends GenericForm

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. implementation that struts uses is org.apache.struts.upload.DiskMultipartRequestHandler.

Since:
Generica 0.5.4
Version:
CVS Revision $Id: UploadForm.java,v 1.3 2004/03/30 13:00:42 davesag Exp $
Author:
Dave Sag http://www.davesag.com
See Also:
Serialized Form

Field Summary
static String ERROR_PROPERTY_MAX_LENGTH_EXCEEDED
          upload.file.too.big
protected  FormFile theFile
          The file that the user has uploaded
 
Fields inherited from class org.apache.struts.validator.DynaValidatorForm
page, validatorResults
 
Fields inherited from class org.apache.struts.action.DynaActionForm
dynaClass, dynaValues
 
Fields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet
 
Constructor Summary
UploadForm()
           
 
Method Summary
 FormFile getTheFile()
          Retrieve a representation of the file the user has uploaded
 void setTheFile(FormFile theFile)
          Set a representation of the file the user has uploaded
 ActionErrors validate(ActionMapping mapping, 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.davesag.generica.servlet.form.GenericForm
getController, getController, reset
 
Methods inherited from class org.apache.struts.validator.DynaValidatorForm
getPage, getResultValueMap, getValidatorResults, log, log, setPage, setValidatorResults
 
Methods inherited from class org.apache.struts.action.DynaActionForm
contains, get, get, get, getDynaClass, getDynaProperty, getMap, initialize, isDynaAssignable, remove, reset, set, set, set, toString
 
Methods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, setMultipartRequestHandler, setServlet, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.commons.beanutils.DynaBean
contains, get, get, get, getDynaClass, remove, set, set, set
 

Field Detail

ERROR_PROPERTY_MAX_LENGTH_EXCEEDED

public static final String ERROR_PROPERTY_MAX_LENGTH_EXCEEDED
upload.file.too.big

See Also:
Constant Field Values

theFile

protected FormFile theFile
The file that the user has uploaded

Constructor Detail

UploadForm

public UploadForm()
Method Detail

getTheFile

public FormFile getTheFile()
Retrieve a representation of the file the user has uploaded

Returns:
the file the user uploaded.

setTheFile

public void setTheFile(FormFile theFile)
Set a representation of the file the user has uploaded

Parameters:
theFile - the file the user uploaded

validate

public ActionErrors validate(ActionMapping mapping,
                             HttpServletRequest request)
Check to make sure the client hasn't exceeded the maximum allowed upload size inside of this validate method.

Parameters:
mapping - the action mapping.
request - the http request.
Returns:
any action errors


Dave Sag Generica API version 0.5.9 - (prerelease) Copyright 2003 - 2004 Dave Sag.