| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
 This service handles parsing multipart/form-data
 POST requests and turing them into form fields and uploaded files.
 This can be either performed automatically by the ParameterParser or manually by an user
 definded Action.
| Field Summary | |
| static boolean | AUTOMATIC_DEFAULTThe default value of 'automatic' property ( false). | 
| static java.lang.String | AUTOMATIC_KEYThe key in UploadService properties in TurbineResources.properties 'automatic' property. | 
| static java.lang.String | CONTENT_DISPOSITIONHTTP header. | 
| static java.lang.String | CONTENT_TYPEHTTP header. | 
| static java.lang.String | FORM_DATAHTTP header base type modifier. | 
| static java.lang.String | MIXEDHTTP header base type modifier. | 
| static java.lang.String | MULTIPARTHTTP header base type. | 
| static java.lang.String | MULTIPART_FORM_DATAHTTP header. | 
| static java.lang.String | MULTIPART_MIXEDHTTP header. | 
| static java.lang.String | REPOSITORY_DEFAULTThe default value of 'repository' property (.). | 
| static java.lang.String | REPOSITORY_KEYThe key in UploadService properties in TurbineResources.properties 'repository' property. | 
| static java.lang.String | REPOSITORY_PARAMETERThe request parameter name for overriding 'repository' property (path). | 
| static java.lang.String | SERVICE_NAMEThe key in the TurbineResources.properties that references this service. | 
| static long | SIZE_MAX_DEFAULTThe default value of 'size.max' property (1 megabyte = 1048576 bytes). | 
| static java.lang.String | SIZE_MAX_KEYThe key in UploadService properties in TurbineResources.properties 'size.max' property. | 
| static int | SIZE_THRESHOLD_DEFAULTThe default value of 'size.threshold' property (10 kilobytes = 10240 bytes). | 
| static java.lang.String | SIZE_THRESHOLD_KEYThe key in UploadService properties in TurbineResources.properties 'size.threshold' property. | 
| Method Summary | |
|  boolean | getAutomatic()Retrieves the value of 'automatic' property of UploadService. | 
|  java.lang.String | getRepository()Retrieves the value of the repositoryproperty ofUploadService. | 
|  long | getSizeMax()Retrieves the value of size.maxproperty of theUploadService. | 
|  int | getSizeThreshold()Retrieves the value of size.thresholdproperty ofUploadService. | 
|  void | parseRequest(javax.servlet.http.HttpServletRequest req,
             ParameterParser params,
             java.lang.String path)This method performs parsing the request, and storing the acquired information in apropriate places. | 
| Methods inherited from interface org.apache.turbine.services.Service | 
| getConfiguration, getName, getProperties, setName, setServiceBroker | 
| Methods inherited from interface org.apache.turbine.services.Initable | 
| getInit, init, init, setInitableBroker, shutdown | 
| Field Detail | 
public static final java.lang.String CONTENT_TYPE
public static final java.lang.String CONTENT_DISPOSITION
public static final java.lang.String MULTIPART
public static final java.lang.String FORM_DATA
public static final java.lang.String MIXED
public static final java.lang.String MULTIPART_FORM_DATA
public static final java.lang.String MULTIPART_MIXED
public static final java.lang.String SERVICE_NAME
public static final java.lang.String AUTOMATIC_KEY
public static final boolean AUTOMATIC_DEFAULT
 The default value of 'automatic' property
 (false).  If set to true, parsing the
 multipart request will be performed automaticaly by ParameterParser.  Otherwise, an Action may decide to to parse the
 request by calling parseRequest manually.
public static final java.lang.String REPOSITORY_PARAMETER
public static final java.lang.String REPOSITORY_KEY
public static final java.lang.String REPOSITORY_DEFAULT
The default value of 'repository' property (.). This is the directory where uploaded fiels will get stored temporarily. Note that "." is whatever the servlet container chooses to be it's 'current directory'.
public static final java.lang.String SIZE_MAX_KEY
public static final long SIZE_MAX_DEFAULT
The default value of 'size.max' property (1 megabyte = 1048576 bytes). This is the maximum size of POST request that will be parsed by the uploader. If you need to set specific limits for your users, set this property to the largest limit value, and use an action + no auto upload to enforce limits.
public static final java.lang.String SIZE_THRESHOLD_KEY
public static final int SIZE_THRESHOLD_DEFAULT
The default value of 'size.threshold' property (10 kilobytes = 10240 bytes). This is the maximum size of a POST request that will have it's components stored temporarily in memory, instead of disk.
| Method Detail | 
public void parseRequest(javax.servlet.http.HttpServletRequest req,
                         ParameterParser params,
                         java.lang.String path)
                  throws TurbineException
This method performs parsing the request, and storing the acquired information in apropriate places.
req - The servlet request to be parsed.params - The ParameterParser instance to insert form
 fields into.path - The location where the files should be stored.
TurbineException - Problems reading/parsing the
 request or storing the uploaded file(s).public long getSizeMax()
 Retrieves the value of size.max property of the
 UploadService.
public int getSizeThreshold()
 Retrieves the value of size.threshold property of
 UploadService.
public java.lang.String getRepository()
 Retrieves the value of the repository property of
 UploadService.
public boolean getAutomatic()
 Retrieves the value of 'automatic' property of UploadService.
UploadService.| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||