com.jalios.jcms.upload
Class ProgressMonitorFileItemFactory

java.lang.Object
  extended by org.apache.commons.fileupload.disk.DiskFileItemFactory
      extended by com.jalios.jcms.upload.ProgressMonitorFileItemFactory
All Implemented Interfaces:
org.apache.commons.fileupload.FileItemFactory

public class ProgressMonitorFileItemFactory
extends org.apache.commons.fileupload.disk.DiskFileItemFactory

A factory used to create ProgressMonitorFileItem wrapping a DiskFileItem with progess information stored in HttpSession

Since:
jcms-5.7.0
Version:
$Revision: 18220 $
Author:
Jean-Philippe Encausse

Nested Class Summary
 class ProgressMonitorFileItemFactory.SessionUpdatingProgressObserver
           
 
Field Summary
static String FILE_LENGTH
           
static String FILE_RATE
           
static String FILE_REMAIN
           
static String FILE_UPLOAD
           
static String FILENAME
           
static String PROGRESS
           
static String REVISION
           
static String TIME_ELAPSE
           
static String TIME_REMAIN
           
 
Fields inherited from class org.apache.commons.fileupload.disk.DiskFileItemFactory
DEFAULT_SIZE_THRESHOLD
 
Constructor Summary
ProgressMonitorFileItemFactory(javax.servlet.http.HttpServletRequest request, File repository, int sizeThreshold)
          Builds a new ProgressMonitorFileItemFactory and extract content-length.
 
Method Summary
 org.apache.commons.fileupload.FileItem createItem(String fieldName, String contentType, boolean isFormField, String fileName)
          Create the convenient FileItem
 
Methods inherited from class org.apache.commons.fileupload.disk.DiskFileItemFactory
getRepository, getSizeThreshold, setRepository, setSizeThreshold
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TIME_REMAIN

public static final String TIME_REMAIN
See Also:
Constant Field Values

TIME_ELAPSE

public static final String TIME_ELAPSE
See Also:
Constant Field Values

FILE_UPLOAD

public static final String FILE_UPLOAD
See Also:
Constant Field Values

FILE_REMAIN

public static final String FILE_REMAIN
See Also:
Constant Field Values

FILE_LENGTH

public static final String FILE_LENGTH
See Also:
Constant Field Values

FILE_RATE

public static final String FILE_RATE
See Also:
Constant Field Values

PROGRESS

public static final String PROGRESS
See Also:
Constant Field Values

FILENAME

public static final String FILENAME
See Also:
Constant Field Values

REVISION

public static final String REVISION
See Also:
Constant Field Values
Constructor Detail

ProgressMonitorFileItemFactory

public ProgressMonitorFileItemFactory(javax.servlet.http.HttpServletRequest request,
                                      File repository,
                                      int sizeThreshold)
Builds a new ProgressMonitorFileItemFactory and extract content-length.

Parameters:
request - the HttpServletRequest
repository - the directory to store temporary files
sizeThreshold - limit to store files in memory
Method Detail

createItem

public org.apache.commons.fileupload.FileItem createItem(String fieldName,
                                                         String contentType,
                                                         boolean isFormField,
                                                         String fileName)
Create the convenient FileItem

Specified by:
createItem in interface org.apache.commons.fileupload.FileItemFactory
Overrides:
createItem in class org.apache.commons.fileupload.disk.DiskFileItemFactory
Parameters:
fieldName - the field name
contentType - the content type
isFormField - true if the field is not an upload
fileName - the file name
Returns:
FileItem the ProgressMonitorFileItem
See Also:
DiskFileItemFactory.createItem(java.lang.String, java.lang.String, boolean, java.lang.String)


Copyright © 2001-2007 Jalios SA. All Rights Reserved.