Class UploadManager

java.lang.Object
com.blackberry.workspaces.sdk.api.UploadManager

public class UploadManager
extends Object
UploadManager
  • Field Details

  • Constructor Details

  • Method Details

    • EscAddress

      public static String EscAddress​(String p)
      EscAddress
      Parameters:
      p - Email address
      Returns:
      escaped email address
    • getNewGuidForDocument

      public String getNewGuidForDocument()
      Get a new guid for document.
      Returns:
      a new guid
    • getNewGuidForTransientDocument

      public String getNewGuidForTransientDocument​(String workspaceUuid)
      Get a new guid for a transient document
      Parameters:
      workspaceUuid -
      Returns:
      a new guid
    • uploadDocumentToRoom

      public UploadResult uploadDocumentToRoom​(SubmitDocumentsVdrJson uploadInfo, int roomId, String destinationFileName, String filename, String classification, boolean updateMetaDataOnly)
      Uploads a new file to the specific workspace. This operation is divided into three different API calls:

      • Get the document GUID
      • Upload and Process the document in server
      • Submit the document along with its permissions and location

      Parameters:
      uploadInfo - Information used when submitting files
      roomId - The room ID of the room (workspace) into which the files will be submitted.
      destinationFileName - Destination file name
      filename - File name
      classification - New classification to set
      updateMetaDataOnly - True if to update meta data
      Returns:
      Uploads result
    • uploadDocument

      public UploadResult uploadDocument​(SubmitDocumentSdsJson uploadInfo, String localPath, String tempPath, String filename, String targetID)
      Uploads a new file to Exchange. This operation is divided into three different API calls:

      • Get the document GUID
      • Upload and Process the document in server
      • Submit the document along with its permissions and location

      Parameters:
      uploadInfo - Information needed when submitting files in SDS mode (not to a workspace).
      localPath - Local path of the file
      tempPath - Temporary path
      filename - File name
      targetID - ID of specific document to upload new version
      Returns:
      Upload result
    • getDocumentIDByName

      public void getDocumentIDByName​(int roomId, String destinationFileName, String folder, UploadResult uploadResult)
      Gets documentID by name
      Parameters:
      roomId - Room ID for workspace containing the files
      destinationFileName - File name
      folder - Pathname to file (excluding file name)
      uploadResult - Uploads result
    • updateDocumentTags

      public void updateDocumentTags​(int roomID, String docID, TagListJson uploadTags)
      Update tags for known document by ID (GUID)
      Parameters:
      roomID - room id of the document
      docID - document GUID
      uploadTags - tags collection
    • updateDocumentClassification

      public void updateDocumentClassification​(int roomId, String guid, String classification)
      Updates the classification field for the give document
      Parameters:
      roomId - The document's workspace room ID
      guid - The document's ID
      classification - New classification to set
    • updateDocumentGroups

      public void updateDocumentGroups​(int roomId, String guid, List<String> groups, boolean openForAllRoom)
      UpdateDocumentGroups
      Parameters:
      roomId - The room ID of the room (workspace)
      guid - Document guid
      groups - List of groups
      openForAllRoom - True if the room is open for all; otherwise false
    • getRemainingBytes

      public long getRemainingBytes()
      getRemainingBytes
      Returns:
    • setRemainingBytes

      public void setRemainingBytes​(long m_TotalRemaining)
      setRemainingBytes
      Parameters:
      m_TotalRemaining -
    • setTotalSize

      public void setTotalSize​(long m_TotalSize)
      Sets Total size
      Parameters:
      m_TotalSize -
    • getTotalSent

      public long getTotalSent()
      Gets Total sent
      Returns:
      m_TotalSent
    • setTotalSent

      public void setTotalSent​(long m_TotalSent)
      Sets Total sent
      Parameters:
      m_TotalSent -
    • getKill

      public boolean getKill()
      Gets Kill
      Returns:
      m_KillUpload
    • setKill

      public void setKill​(boolean m_KillUpload)
      Sets Kill
      Parameters:
      m_KillUpload -
    • setHash

      public void setHash​(String Hash)
      Sets Hash
      Parameters:
      Hash -
    • getHash

      public String getHash()
      Gets Hash
      Returns:
      Hash
    • addUploadManagerEventListener

      public void addUploadManagerEventListener​(IUploadManagerEvent listener)
      addUploadManagerEventListener
      Parameters:
      listener - IUploadManagerEvent
    • reportStatus

      public void reportStatus​(IFileRequestData fileRequestData, int progress, Enums.UploadStatus status)
      reportStatus
      Parameters:
      fileRequestData -
      progress -
      status -
    • onProgressChanged

      public void onProgressChanged​(IFileRequestData fileRequestData, long totalBytes, int sentBytes)
      onProgressChanged Raises the event for the UI when the upload progress was changed
      Parameters:
      fileRequestData -
      totalBytes -
      sentBytes -