|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.emfstore.internal.client.model.filetransfer.FileTransferManager
public class FileTransferManager
The main managing class on the client side for file transfers. Each project space has an associated FileTransferManager. All file-related request from the project space are delegated to that manager. The manager provides methods to add files, get files and retrieve additional information about files.
Constructor Summary | |
---|---|
FileTransferManager(ProjectSpaceBase projectSpaceImpl)
Constructor that creates a file transfer manager for a specific project space. |
Method Summary | |
---|---|
FileIdentifier |
addFile(File file)
Adds a file to be transferred (uploaded). |
FileIdentifier |
addFile(File file,
String id)
Adds a file to be transferred (uploaded). |
void |
cancelPendingUpload(FileIdentifier fileIdentifier)
Cancels a pending upload. |
FileDownloadStatus |
getFile(FileIdentifier fileIdentifier,
boolean isTriggeredByUI)
Returns the download status of the file that is associated with the given FileIdentifier . |
FileDownloadStatus |
getFile(FileIdentifier fileIdentifier,
boolean isTriggeredByUI,
boolean forceDownload)
Returns the download status of the file that is associated with the given FileIdentifier . |
FileInformation |
getFileInfo(FileIdentifier fileIdentifier)
returns a file information object for a specific file identifier. |
boolean |
hasWaitingUpload(FileIdentifier fileIdentifier)
Return if a specific file is in the pending upload queue. |
void |
uploadQueuedFiles(org.eclipse.core.runtime.IProgressMonitor progress)
Uploads all files in the commit queue. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileTransferManager(ProjectSpaceBase projectSpaceImpl)
projectSpaceImpl
- the project space to which this transfer manager belongsMethod Detail |
---|
public FileIdentifier addFile(File file) throws FileTransferException
file
- the file to be transferred
FileIdentifier
that associates the file with its ID
FileTransferException
- in case the file
is either null
, a directory
or does not existpublic FileIdentifier addFile(File file, String id) throws FileTransferException
file
- the file to be transferredid
- the ID that will be associated with the file being uploaded
FileIdentifier
that associates the file with its ID
FileTransferException
- in case the file
is either null
, a directory
or does not existpublic void uploadQueuedFiles(org.eclipse.core.runtime.IProgressMonitor progress)
progress
- progress monitorpublic FileDownloadStatus getFile(FileIdentifier fileIdentifier, boolean isTriggeredByUI, boolean forceDownload) throws FileTransferException
FileIdentifier
.
fileIdentifier
- the file identifier whose download status should be retrievedisTriggeredByUI
- whether the download of the file has been triggered by the UIforceDownload
- whether to re-fetch the file even, if a file with the same identifier is already present;
set this to true
in case you have files, which will be updated but keep the same
identifier
FileTransferException
- in case the given file identifier is null
public FileDownloadStatus getFile(FileIdentifier fileIdentifier, boolean isTriggeredByUI) throws FileTransferException
FileIdentifier
.
fileIdentifier
- the file identifier whose download status should be retrievedisTriggeredByUI
- whether the download of the file has been triggered by the UI
FileTransferException
- in case the given file identifier is null
public boolean hasWaitingUpload(FileIdentifier fileIdentifier)
fileIdentifier
- the file to be looked up
public void cancelPendingUpload(FileIdentifier fileIdentifier)
fileIdentifier
- the file to be canceledpublic FileInformation getFileInfo(FileIdentifier fileIdentifier)
fileIdentifier
- the identifier
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |