|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.globalmentor.beans.BoundPropertyObject
com.guiseframework.event.GuiseBoundPropertyObject
com.guiseframework.platform.PlatformFileUploadTask
public class PlatformFileUploadTask
A task to upload a series of files from the platform. The files are uploaded sequentially. This task fires progress events indicating the overall bytes transferred out of the total bytes to transfer. The task state indicates the state of the overall transfer, not each individual transfer.
| Field Summary |
|---|
| Fields inherited from class com.globalmentor.beans.BoundPropertyObject |
|---|
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS |
| Fields inherited from interface com.globalmentor.model.Task |
|---|
STATE_PROPERTY |
| Constructor Summary | |
|---|---|
PlatformFileUploadTask(java.lang.Iterable<PlatformFile> platformFiles,
java.net.URI destinationBaseURI,
Bookmark destinationBookmark)
Platform files, destination URI, and destination bookmark constructor. |
|
| Method Summary | |
|---|---|
void |
addProgressListener(ProgressListener<java.lang.Long> progressListener)
Adds a progress listener. |
void |
cancel()
Cancels the task. |
protected void |
fireProgressed()
Fires a progress event to all registered progress listeners with the current . |
protected void |
fireProgressed(ProgressEvent<java.lang.Long> progressEvent)
Fires a given progress event to all registered progress listeners. |
long |
getCompletion()
|
java.net.URI |
getDestinationBaseURI()
|
Bookmark |
getDestinationBookmark()
|
protected com.globalmentor.event.EventListenerManager |
getEventListenerManager()
|
protected PlatformFile |
getPlatformFile()
|
java.util.List<PlatformFile> |
getPlatformFiles()
|
long |
getProgress()
|
com.globalmentor.model.TaskState |
getState()
|
protected void |
initializeUpload()
Initializes and begins an upload for the current platform file. |
void |
removeProgressListener(ProgressListener<java.lang.Long> progressListener)
Removes an progress listener. |
protected void |
setState(com.globalmentor.model.TaskState newState)
Updates the state of the task. |
void |
start()
Starts the task. |
protected void |
uninitializeUpload()
Cleans up after an upload for the current platform file. |
| Methods inherited from class com.guiseframework.event.GuiseBoundPropertyObject |
|---|
getSession |
| Methods inherited from class com.globalmentor.beans.BoundPropertyObject |
|---|
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPostponedPropertyChangeEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getForwardPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getRepeatPropertyChangeListener, getRepeatVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, getVetoableChangeSupport, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.globalmentor.beans.PropertyBindable |
|---|
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
| Methods inherited from interface com.globalmentor.beans.PropertyConstrainable |
|---|
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, hasVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener |
| Constructor Detail |
|---|
public PlatformFileUploadTask(java.lang.Iterable<PlatformFile> platformFiles,
java.net.URI destinationBaseURI,
Bookmark destinationBookmark)
platformFiles - The platform files to upload.destinationBaseURI - The collection URI representing the base destination of the platform files, either absolute or relative to the application.destinationBookmark - The bookmark to be used in sending resources to the destination URI, or null if there is no bookmark specified.
java.lang.NullPointerException - if the given list of platform files and/or destination URI is null.
java.lang.IllegalArgumentException - if the provided URI is not a collection URI.
java.lang.IllegalArgumentException - if the provided URI specifies a query and/or fragment.| Method Detail |
|---|
protected com.globalmentor.event.EventListenerManager getEventListenerManager()
public java.util.List<PlatformFile> getPlatformFiles()
public java.net.URI getDestinationBaseURI()
null if the destination URI has not yet been set.public Bookmark getDestinationBookmark()
null if there is no bookmark specified.public com.globalmentor.model.TaskState getState()
getState in interface com.globalmentor.model.Tasknull if the task has not been started.protected void setState(com.globalmentor.model.TaskState newState)
newState - The new state of the task, or null if the task has not been started.Task.STATE_PROPERTYpublic long getProgress()
public final long getCompletion()
protected PlatformFile getPlatformFile()
null if no platform file is currently being uploaded.public void start()
public void cancel()
protected void initializeUpload()
protected void uninitializeUpload()
public void addProgressListener(ProgressListener<java.lang.Long> progressListener)
progressListener - The progress listener to add.public void removeProgressListener(ProgressListener<java.lang.Long> progressListener)
progressListener - The progress listener to remove.protected void fireProgressed()
#fireProgessed(ProgressEvent).
ProgressListener,
ProgressEventprotected void fireProgressed(ProgressEvent<java.lang.Long> progressEvent)
progressEvent - The progress event to fire.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||