wt.clients.util.http
Class HTTPUploadDownloadEvent

java.lang.Object
  extended byjava.util.EventObject
      extended bywt.clients.util.http.HTTPUploadDownloadEvent
All Implemented Interfaces:
Serializable

public class HTTPUploadDownloadEvent
extends EventObject

Instances of class HTTPUploadDownloadEvent are used communicate significant events related to instances of class HTTPUploadDownload.

Supported API:false

Extendable:false

See Also:
Serialized Form

Field Summary
static int DEFAULT_FILENAME_CHANGE
          Indicates that the default file name has changed.
private  String defaultFilename
           
private  int eventType
           
static int FILE_OPERATION_CANCEL
          File operation cancelled by user.
static int FILE_OPERATION_COMPLETE
           
static int FILE_OPERATION_CONFIRM_OVERWRITE
          HTTPUploadDownload is waiting for file overwrite confirmation.
static int FILE_OPERATION_FAIL
           
static int FILE_OPERATION_REQUEST
          File entry process start.
static int FILE_OPERATION_START
          Upload or download of file entry has started.
static int GLOBAL_OVERWRITE_CHANGE
          Indicates that the global overwrite warning flag has changed.
static int GLOBAL_OVERWRITE_WARNING_CHANGE
           
private  boolean globalOverwriteWarning
           
private  int httpResponseCode
           
private  int index
           
static int OPERATION_CANCEL
          Indicates that the file upload was cancelled by the user.
static int OPERATION_CANCEL_REQUEST
          Indicates that the application has requested that the current upload or download operation be canceled.
static int OPERATION_COMPLETE
          Indicates that the file upload operation has completed succesfully.
static int OPERATION_FAILURE
          Indicates the file upload failed.
static int OPERATION_INACTIVE
          Indicate that there is no upload/download operation active.
static int OPERATION_REQUEST
          Indicates that the user requested upload/download operation.
static int OPERATION_START
          Indicates that the operation has started.
private  int operationFailureCode
           
private  int operationStatus
           
static int OVERWRITE_CHANGE
          Indicates that an individual file overwrite warning flag has changed.
private  boolean overwriteWarning
           
private  String path
           
static int PATH_CHANGE
          Indicates that the path property has changed.
static int UPLOAD_URL_CHANGE
          Indicates that the multi-part upload url has changed.
private  String uploadURL
           
private  String url
           
static int URL_CHANGE
          Indicates that the url property has changed.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
HTTPUploadDownloadEvent(HTTPUploadDownload source, int eventType, int fileIndex)
          Construct an HTTPUploadDownloadEvent.
 
Method Summary
 String getDefaultFilename()
          Return the default file name.
 int getEventType()
          Return the type of the event, e.g.
 boolean getGlobalOverwriteWarning()
          Return the global overwrite warning flag.
 int getHTTPResponseCode()
           
 int getIndex()
          Return the index of the file to which this event applies.
 int getOperationFailureCode()
          Return the overall operation status.
 int getOperationStatus()
          Return the overall operation status.
 boolean getOverwriteWarning()
          Return the individual file overwrite warning flag.
 String getPath()
          Return the current value of the path.
 String getUploadURL()
           
 String getURL()
          Return the current value of the url.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UPLOAD_URL_CHANGE

public static final int UPLOAD_URL_CHANGE
Indicates that the multi-part upload url has changed.

See Also:
Constant Field Values

DEFAULT_FILENAME_CHANGE

public static final int DEFAULT_FILENAME_CHANGE
Indicates that the default file name has changed.

See Also:
Constant Field Values

URL_CHANGE

public static final int URL_CHANGE
Indicates that the url property has changed.

See Also:
Constant Field Values

PATH_CHANGE

public static final int PATH_CHANGE
Indicates that the path property has changed.

See Also:
Constant Field Values

GLOBAL_OVERWRITE_WARNING_CHANGE

public static final int GLOBAL_OVERWRITE_WARNING_CHANGE
See Also:
Constant Field Values

OPERATION_INACTIVE

public static final int OPERATION_INACTIVE
Indicate that there is no upload/download operation active.

See Also:
Constant Field Values

OPERATION_REQUEST

public static final int OPERATION_REQUEST
Indicates that the user requested upload/download operation. At this point Uploaddownload begins to process all of its file entries. For each entry HTTPUploadDownload checks to see if the file is valid. If the file is not valid it will launch the file browse function to locate a valid file.

See Also:
Constant Field Values

OPERATION_START

public static final int OPERATION_START
Indicates that the operation has started.

See Also:
Constant Field Values

OPERATION_COMPLETE

public static final int OPERATION_COMPLETE
Indicates that the file upload operation has completed succesfully.

See Also:
Constant Field Values

OPERATION_CANCEL

public static final int OPERATION_CANCEL
Indicates that the file upload was cancelled by the user.

See Also:
Constant Field Values

OPERATION_FAILURE

public static final int OPERATION_FAILURE
Indicates the file upload failed. Check the operation status for more information.

See Also:
Constant Field Values

OPERATION_CANCEL_REQUEST

public static final int OPERATION_CANCEL_REQUEST
Indicates that the application has requested that the current upload or download operation be canceled.

See Also:
Constant Field Values

FILE_OPERATION_REQUEST

public static final int FILE_OPERATION_REQUEST
File entry process start.

See Also:
Constant Field Values

FILE_OPERATION_CONFIRM_OVERWRITE

public static final int FILE_OPERATION_CONFIRM_OVERWRITE
HTTPUploadDownload is waiting for file overwrite confirmation.

See Also:
Constant Field Values

FILE_OPERATION_CANCEL

public static final int FILE_OPERATION_CANCEL
File operation cancelled by user.

See Also:
Constant Field Values

FILE_OPERATION_START

public static final int FILE_OPERATION_START
Upload or download of file entry has started.

See Also:
Constant Field Values

FILE_OPERATION_FAIL

public static final int FILE_OPERATION_FAIL
See Also:
Constant Field Values

FILE_OPERATION_COMPLETE

public static final int FILE_OPERATION_COMPLETE
See Also:
Constant Field Values

GLOBAL_OVERWRITE_CHANGE

public static final int GLOBAL_OVERWRITE_CHANGE
Indicates that the global overwrite warning flag has changed.

See Also:
Constant Field Values

OVERWRITE_CHANGE

public static final int OVERWRITE_CHANGE
Indicates that an individual file overwrite warning flag has changed.

See Also:
Constant Field Values

eventType

private int eventType

index

private int index

url

private String url

path

private String path

uploadURL

private String uploadURL

globalOverwriteWarning

private boolean globalOverwriteWarning

overwriteWarning

private boolean overwriteWarning

defaultFilename

private String defaultFilename

operationStatus

private int operationStatus

operationFailureCode

private int operationFailureCode

httpResponseCode

private int httpResponseCode
Constructor Detail

HTTPUploadDownloadEvent

public HTTPUploadDownloadEvent(HTTPUploadDownload source,
                               int eventType,
                               int fileIndex)
Construct an HTTPUploadDownloadEvent.

Parameters:
source - The target HTTPUploadDownload object.
fileIndex - The index of the target file entry.
Method Detail

getEventType

public int getEventType()
Return the type of the event, e.g. URL_CHANGE or UPLOAD_FAIL.


getIndex

public int getIndex()
Return the index of the file to which this event applies. Note that an index of -1 indicates the event applies to all files.


getURL

public String getURL()
Return the current value of the url.


getPath

public String getPath()
Return the current value of the path.


getUploadURL

public String getUploadURL()

getGlobalOverwriteWarning

public boolean getGlobalOverwriteWarning()
Return the global overwrite warning flag.


getOverwriteWarning

public boolean getOverwriteWarning()
Return the individual file overwrite warning flag.


getDefaultFilename

public String getDefaultFilename()
Return the default file name.


getOperationStatus

public int getOperationStatus()
Return the overall operation status.


getOperationFailureCode

public int getOperationFailureCode()
Return the overall operation status.


getHTTPResponseCode

public int getHTTPResponseCode()