Project Wonder 5.0

er.ajax
Class AjaxFileUploadRequestHandler

java.lang.Object
  extended by com.webobjects.appserver.WORequestHandler
      extended by er.ajax.AjaxFileUploadRequestHandler

public class AjaxFileUploadRequestHandler
extends com.webobjects.appserver.WORequestHandler

Provides the backend for Ajax uploads. This has to be implemented differently than a normal file upload because we can't block the session while uploading.

Author:
mschrag
Properties
er.ajax.AjaxFileRequestHandler.tempFileFolder the location of the temp file folder. If not specified, this will go to Java's default temporary folder (/tmp on Mac OS X)
           
er.ajax.AjaxFileRequestHandler.maxUploadSize the maximum size in bytes of the file
           

Field Summary
static org.apache.log4j.Logger log
           
static java.lang.String REQUEST_HANDLER_KEY
           
static java.lang.String UPLOAD_FINISHED_KEY
           
 
Fields inherited from class com.webobjects.appserver.WORequestHandler
DidHandleRequestNotification
 
Constructor Summary
  AjaxFileUploadRequestHandler()
           
  AjaxFileUploadRequestHandler(java.io.File tempFileFolder, long maxUploadSize)
           
protected AjaxFileUploadRequestHandler(java.lang.String tempFilePath, long maxUploadSize)
           
 
Method Summary
static AjaxUploadProgress ajaxUploadProgress(com.webobjects.appserver.WOSession session, java.lang.String id)
          Type-safe wrapper around AjaxProgressBar.progress.
protected  void downloadFinished(AjaxUploadProgress progress)
           
 com.webobjects.appserver.WOResponse handleRequest(com.webobjects.appserver.WORequest request)
           
 
Methods inherited from class com.webobjects.appserver.WORequestHandler
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UPLOAD_FINISHED_KEY

public static final java.lang.String UPLOAD_FINISHED_KEY
See Also:
Constant Field Values

REQUEST_HANDLER_KEY

public static final java.lang.String REQUEST_HANDLER_KEY
See Also:
Constant Field Values

log

public static final org.apache.log4j.Logger log
Constructor Detail

AjaxFileUploadRequestHandler

public AjaxFileUploadRequestHandler()

AjaxFileUploadRequestHandler

protected AjaxFileUploadRequestHandler(java.lang.String tempFilePath,
                                       long maxUploadSize)

AjaxFileUploadRequestHandler

public AjaxFileUploadRequestHandler(java.io.File tempFileFolder,
                                    long maxUploadSize)
Method Detail

handleRequest

public com.webobjects.appserver.WOResponse handleRequest(com.webobjects.appserver.WORequest request)
Specified by:
handleRequest in class com.webobjects.appserver.WORequestHandler

downloadFinished

protected void downloadFinished(AjaxUploadProgress progress)

ajaxUploadProgress

public static AjaxUploadProgress ajaxUploadProgress(com.webobjects.appserver.WOSession session,
                                                    java.lang.String id)
Type-safe wrapper around AjaxProgressBar.progress.

Parameters:
session - the session
id - the id of the progress model to retrieve
Returns:
the AjaxUploadProgress

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.