public class UploadManager extends Object
Modifier and Type | Field and Description |
---|---|
String |
Hash
Hash
|
static String |
REMOVE_ALL
REMOVE_ALL
|
Constructor and Description |
---|
UploadManager(APISession session) |
Modifier and Type | Method and Description |
---|---|
void |
addUploadManagerEventListener(IUploadManagerEvent listener)
addUploadManagerEventListener
|
static String |
EscAddress(String p)
EscAddress
|
void |
getDocumentIDByName(int roomId,
String destinationFileName,
String folder,
UploadResult uploadResult)
Gets documentID by name
|
String |
getHash()
Gets Hash
|
boolean |
getKill()
Gets Kill
|
String |
getNewGuidForDocument()
Get a new guid for document.
|
String |
getNewGuidForTransientDocument(String workspaceUuid)
Get a new guid for a transient document
|
long |
getRemainingBytes()
getRemainingBytes
|
long |
getTotalSent()
Gets Total sent
|
void |
onProgressChanged(IFileRequestData fileRequestData,
long totalBytes,
int sentBytes)
onProgressChanged Raises the event for the UI when the upload progress was changed
|
void |
reportStatus(IFileRequestData fileRequestData,
int progress,
Enums.UploadStatus status)
reportStatus
|
void |
setHash(String Hash)
Sets Hash
|
void |
setKill(boolean m_KillUpload)
Sets Kill
|
void |
setRemainingBytes(long m_TotalRemaining)
setRemainingBytes
|
void |
setTotalSent(long m_TotalSent)
Sets Total sent
|
void |
setTotalSize(long m_TotalSize)
Sets Total size
|
void |
updateDocumentClassification(int roomId,
String guid,
String classification)
Updates the classification field for the give document
|
void |
updateDocumentGroups(int roomId,
String guid,
List<String> groups,
boolean openForAllRoom)
UpdateDocumentGroups
|
void |
updateDocumentTags(int roomID,
String docID,
TagListJson uploadTags)
Update tags for known document by ID (GUID)
|
UploadResult |
uploadDocument(SubmitDocumentSdsJson uploadInfo,
String localPath,
String tempPath,
String filename,
String targetID)
Uploads a new file to Exchange.
|
UploadResult |
uploadDocumentToRoom(SubmitDocumentsVdrJson uploadInfo,
int roomId,
String destinationFileName,
String filename,
String classification,
boolean updateMetaDataOnly)
Uploads a new file to the specific workspace.
|
public static final String REMOVE_ALL
public String Hash
public UploadManager(APISession session)
public static String EscAddress(String p)
p
- Email addresspublic String getNewGuidForDocument()
public String getNewGuidForTransientDocument(String workspaceUuid)
workspaceUuid
- public UploadResult uploadDocumentToRoom(SubmitDocumentsVdrJson uploadInfo, int roomId, String destinationFileName, String filename, String classification, boolean updateMetaDataOnly)
uploadInfo
- Information used when submitting filesroomId
- The room ID of the room (workspace) into which the files will be submitted.destinationFileName
- Destination file namefilename
- File nameclassification
- New classification to setupdateMetaDataOnly
- True if to update meta datapublic UploadResult uploadDocument(SubmitDocumentSdsJson uploadInfo, String localPath, String tempPath, String filename, String targetID)
uploadInfo
- Information needed when submitting files in SDS mode (not to a workspace).localPath
- Local path of the filetempPath
- Temporary pathfilename
- File nametargetID
- ID of specific document to upload new versionpublic void getDocumentIDByName(int roomId, String destinationFileName, String folder, UploadResult uploadResult)
roomId
- Room ID for workspace containing the filesdestinationFileName
- File namefolder
- Pathname to file (excluding file name)uploadResult
- Uploads resultpublic void updateDocumentTags(int roomID, String docID, TagListJson uploadTags)
roomID
- room id of the documentdocID
- document GUIDuploadTags
- tags collectionpublic void updateDocumentClassification(int roomId, String guid, String classification)
roomId
- The document's workspace room IDguid
- The document's IDclassification
- New classification to setpublic void updateDocumentGroups(int roomId, String guid, List<String> groups, boolean openForAllRoom)
roomId
- The room ID of the room (workspace)guid
- Document guidgroups
- List of groupsopenForAllRoom
- True if the room is open for all; otherwise falsepublic long getRemainingBytes()
public void setRemainingBytes(long m_TotalRemaining)
m_TotalRemaining
- public void setTotalSize(long m_TotalSize)
m_TotalSize
- public long getTotalSent()
public void setTotalSent(long m_TotalSent)
m_TotalSent
- public boolean getKill()
public void setKill(boolean m_KillUpload)
m_KillUpload
- public void setHash(String Hash)
Hash
- public String getHash()
public void addUploadManagerEventListener(IUploadManagerEvent listener)
listener
- IUploadManagerEventpublic void reportStatus(IFileRequestData fileRequestData, int progress, Enums.UploadStatus status)
fileRequestData
- progress
- status
- public void onProgressChanged(IFileRequestData fileRequestData, long totalBytes, int sentBytes)
fileRequestData
- totalBytes
- sentBytes
- Copyright © 2019. All rights reserved.