org.apache.jetspeed.services.upload
Class JetspeedUploadService

java.lang.Object
  extended byorg.apache.turbine.services.BaseInitable
      extended byorg.apache.turbine.services.BaseService
          extended byorg.apache.turbine.services.TurbineBaseService
              extended byorg.apache.turbine.services.upload.BaseUploadService
                  extended byorg.apache.turbine.services.upload.TurbineUploadService
                      extended byorg.apache.jetspeed.services.upload.JetspeedUploadService
All Implemented Interfaces:
org.apache.turbine.services.Initable, org.apache.turbine.services.Service, org.apache.turbine.services.upload.UploadService

public class JetspeedUploadService
extends org.apache.turbine.services.upload.TurbineUploadService

This class is an implementation of UploadService.

Files will be stored in temporary disk storage on in memory, depending on request size, and will be available from the ParameterParser as FileItems.

This implementation of UploadService handles multiple files per single html widget, sent using multipar/mixed encoding type, as specified by RFC 1867. Use ParameterParser.getFileItems(String) to acquire an array of FileItems associated with given html widget.

Author:
Shinsuke SUGAYA

Field Summary
 
Fields inherited from class org.apache.turbine.services.upload.BaseUploadService
MAX_HEADER_SIZE
 
Fields inherited from class org.apache.turbine.services.BaseService
configuration, name, properties, serviceBroker
 
Fields inherited from class org.apache.turbine.services.BaseInitable
initableBroker, isInitialized
 
Fields inherited from interface org.apache.turbine.services.upload.UploadService
AUTOMATIC_DEFAULT, AUTOMATIC_KEY, CONTENT_DISPOSITION, CONTENT_TYPE, FORM_DATA, MIXED, MULTIPART, MULTIPART_FORM_DATA, MULTIPART_MIXED, REPOSITORY_DEFAULT, REPOSITORY_KEY, REPOSITORY_PARAMETER, SERVICE_NAME, SIZE_MAX_DEFAULT, SIZE_MAX_KEY, SIZE_THRESHOLD_DEFAULT, SIZE_THRESHOLD_KEY
 
Constructor Summary
JetspeedUploadService()
           
 
Method Summary
 void parseRequest(javax.servlet.http.HttpServletRequest req, org.apache.turbine.util.ParameterParser params, java.lang.String path)
           Processes an RFC 1867 compliant multipart/form-data stream.
 
Methods inherited from class org.apache.turbine.services.upload.TurbineUploadService
createItem, getFieldName, getFileName, getHeader, parseHeaders
 
Methods inherited from class org.apache.turbine.services.upload.BaseUploadService
getRepository, getSizeMax, getSizeThreshold, init
 
Methods inherited from class org.apache.turbine.services.TurbineBaseService
init, init, init, shutdown
 
Methods inherited from class org.apache.turbine.services.BaseService
getConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBroker
 
Methods inherited from class org.apache.turbine.services.BaseInitable
getInit, getInitableBroker, setInit, setInitableBroker
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
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, setInitableBroker, shutdown
 

Constructor Detail

JetspeedUploadService

public JetspeedUploadService()
Method Detail

parseRequest

public void parseRequest(javax.servlet.http.HttpServletRequest req,
                         org.apache.turbine.util.ParameterParser params,
                         java.lang.String path)
                  throws org.apache.turbine.util.TurbineException

Processes an RFC 1867 compliant multipart/form-data stream.

Parameters:
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.
Throws:
org.apache.turbine.util.TurbineException - If there are problems reading/parsing the request or storing files.


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.