Class Files

java.lang.Object
com.blackberry.workspaces.sdk.api.resource.Files

public class Files
extends Object
Functions for sending secure files via BlackBerry Workspaces.
  • Constructor Details

  • Method Details

    • addDocumentPermissionRequestV30

      public BulkOperationResultJson addDocumentPermissionRequestV30​(AddDocumentPermissionRequestJson addDocumentPermissionRequestJson)
      Adds a new permission request.
      Parameters:
      addDocumentPermissionRequestJson - object detailing the permissions request parameters
      Returns:
      List which indicates if the action was successful or, if not, the problems.
    • addPermissionsV30

      public BulkOperationResultJson addPermissionsV30​(SdsAddPermissionsJson sdsAddPermissionsJson)
      Adds permissions to entities (users, groups) for a file or a list of files.
      Parameters:
      sdsAddPermissionsJson - List of permissions to add and entities to be granted the permissions.
      Returns:
      List which indicates whether all requests were successful or, if not, a list of errors.
    • addRecipientsV30

      public BulkOperationResultJson addRecipientsV30​(SdsAddRecipientsJson sdsAddRecipientsJson)
      Adds recipients to files.
      Parameters:
      sdsAddRecipientsJson - List of recipients
      Returns:
      List which indicates if the action was successful or, if not, the problems.
    • copyDocumentsFromInboxV30

      public DocumentJson copyDocumentsFromInboxV30​(CopyDocumentFromInboxJson copyDocumentFromInboxJson)
      Submits files in the WD Exchange. This submits inbox files to recipients within SDS the files will be copied from the inbox, that is a new copy separate from the original file
      Parameters:
      copyDocumentFromInboxJson - list of users to receive notification and link to the files, permissions to assign the file.
      Returns:
      An indication whether the request succeeded, or indication where it failed.
    • copyMultipleDocumentsToExchangeV30

      public BulkOperationResultJson copyMultipleDocumentsToExchangeV30​(CopyMultipleDocumentsToExchangeAsyncJson copyMultipleDocumentsToExchangeAsyncJson)
      Parameters:
      copyMultipleDocumentsToExchangeAsyncJson -
      request -
      response -
    • deleteDocumentsV30

      public BulkOperationResultJson deleteDocumentsV30​(DeleteDocumentsSelectionSdsJson deleteDocumentsSelectionSdsJson)
      Deletes files from the WD Exchange server.
      Parameters:
      deleteDocumentsSelectionSdsJson - List of file guids for documents to be deleted.
      Returns:
      List which indicates whether all requests were successful or, if not, a list of errors.
    • documentReadConfirmedV30

      public BulkOperationResultJson documentReadConfirmedV30​(DocumentVersionReadConfirmedJson documentVersionReadConfirmedJson)
      the user is updated that he had read the document
      Parameters:
      DocumentVersionReadConfirmedJson - json to set read confirmation flags for folders
      Returns:
      bulkOperationResultJson - indicates if actions were successful or, if not, the problems.
    • documentUploadCompleteV30

      public BulkOperationResultJson documentUploadCompleteV30​(String documentGuid)
      Completes the already uploaded by chunks file.
      Parameters:
      documentGuid - The file's guid
      Returns:
      List which indicates whether all requests were successful or, if not, a list of errors.
    • documentsReadConfirmationEditV30

      public BulkOperationResultJson documentsReadConfirmationEditV30​(DocumentsReadConfirmationEditJson documentsReadConfirmationEditJson)
      set the read confirmation flag for folders
      Parameters:
      DocumentsReadConfirmationEditJson - json to set read confirmation flags for doccuments
      Returns:
      bulkOperationResultJson - indicates if actions were successful or, if not, the problems.
    • downloadGenericDocumentsV30

      public InputStream downloadGenericDocumentsV30​(DownloadDocumentsSelectionSdsJson downloadDocumentsSelectionSdsJson)
      Downloads generic files. THe files are downloaded into zip file.
      Parameters:
      downloadDocumentsSelectionSdsJson - List of files to download.
      Returns:
      a binary stream of data
    • downloadOriginalCrossBrowserV30

      @Deprecated public InputStream downloadOriginalCrossBrowserV30​(String filename, String guid)
      Deprecated.
      Downloads the original (un-protected) version of the file. May only be done if user is permitted to access original files (file owner always has this right)
      Parameters:
      filename - File to be downloaded
      guid - The guid of the file to be downloaded
      Returns:
      Binary file data
    • downloadOriginalDocumentsV30

      @Deprecated public InputStream downloadOriginalDocumentsV30​(DocumentsSelectionSdsJson documentsSelectionSdsJson)
      Deprecated.
      Download original files. Original files are files without any WatchDox protection . They can only be downloaded by the file owner or by a user with appropriate rights.
      Parameters:
      documentsSelectionSdsJson - List of files to download
      Returns:
      a binary stream of data
    • downloadOriginalForWebV30

      public InputStream downloadOriginalForWebV30​(String guid)
      Downloads the original (un-protected) version of the file. May only be done if user is permitted to access original files (file owner always has this right)
      Parameters:
      guid - The guid of the file to be downloaded
      Returns:
      Binary file data
    • downloadOriginalV30

      public InputStream downloadOriginalV30​(String guid)
      Downloads the original (un-protected) version of the file. May only be done if user is permitted to access original files (file owner always has this right)
      Parameters:
      guid - The guid of the file to be downloaded
      Returns:
      Binary file data
    • downloadProtectedCrossBrowserV30

      @Deprecated public InputStream downloadProtectedCrossBrowserV30​(String filename, String guid)
      Deprecated.
      Downloads a protected named file.
      Parameters:
      filename - The name of a the file
      guid - The guid of the file to be downloaded
      Returns:
      Binary file data
    • downloadProtectedDocumentsV30

      @Deprecated public InputStream downloadProtectedDocumentsV30​(DocumentsSelectionSdsJson documentsSelectionSdsJson)
      Deprecated.
      Parameters:
      documentsSelectionSdsJson - List of files to download
      Returns:
      a binary stream of data
    • downloadProtectedForWebV30

      public InputStream downloadProtectedForWebV30​(String guid)
      Downloads a protected file.
      Parameters:
      guid - The guid of the file to be downloaded
      Returns:
      Binary file data
    • downloadProtectedV30

      public InputStream downloadProtectedV30​(String guid)
      Downloads a protected file.
      Parameters:
      guid - The guid of the file to be downloaded
      Returns:
      Binary file data
    • downloadSentItemsWithRecycleBinV30

      public InputStream downloadSentItemsWithRecycleBinV30​(DownloadSentItemsDocumentsWithRecycleBinJson downloadSentItemsDocumentsWithRecycleBinJson)
      Downloads sent items of a user with it's recycle bin.
      Parameters:
      downloadSentItemsDocumentsWithRecycleBinJson - Details about the request
      Returns:
      a binary stream of data
    • downloadSentItemsWithRecycleBinV30

      public InputStream downloadSentItemsWithRecycleBinV30​(String userAddress)
      Downloads sent items of a user with it's recycle bin.
      Parameters:
      userAddress - Email address of the user
      Returns:
      a binary stream of data
    • downloadSingleDocumentV30

      public InputStream downloadSingleDocumentV30​(DownloadSingleDocumentSelectionJson downloadSingleDocumentSelectionJson)
      Downloads a single file.
      Parameters:
      downloadSingleDocumentSelectionJson - file guid and version
      Returns:
      InputStream file data
    • editCollaborationV30

      public BulkOperationResultJson editCollaborationV30​(EditCollaborationJson editCollaborationJson)
      Edits collaboration of files.
      Parameters:
      editCollaborationJson - Collaboration details
      Returns:
      List which indicates if the action was successful or, if not, the problems.
    • editPermissionsV30

      public BulkOperationResultJson editPermissionsV30​(SdsEditPermissionsJson sdsEditPermissionsJson)
      Edits permissions of a file in the WD Exchange.
      Parameters:
      sdsEditPermissionsJson - List of permissions to change, and entities (users, groups, lists) affected.
      Returns:
      List which indicates whether all requests were successful or, if not, a list of errors.
    • generateGuidV30

      public GuidJson generateGuidV30()
      Generates a new GUID for a new file that is about to be uploaded.
      Returns:
      A new guid
    • getActivityLogV30

      public PagingItemListJson<ActivityLogRecordJson> getActivityLogV30​(GetDocumentActivityLogRequestJson getDocumentActivityLogRequestJson)
      Gets activity log for a file in WD.
      Parameters:
      getDocumentActivityLogRequestJson - Information about what to get from the activity log
      Returns:
      List of log activity items
    • getActivityLogV30

      @Deprecated public PagingItemListJson<ActivityLogRecordJson> getActivityLogV30​(String guid, boolean lastActionPerUser, Integer pageNumber, Integer pageSize, SendNotificationsJson sendNotificationsJson)
      Deprecated.
      Use Files#getActivityLogV30(String, GetDocumentActivityLogRequestJson) instead.
      Gets activity log for a file in WD.
      Parameters:
      guid - The guid for file
      lastActionPerUser - Flag indicating that only the last actions for the user should be retrieved.
      pageNumber - The page number to retrieve (for multipage activity log)
      pageSize - The displayed page size in the browser (in rows)
      Returns:
      An activity list (or partial list) for the file, up to the specified page size
    • getDocumentChunksStatusV30

      public DocumentChunksJson getDocumentChunksStatusV30​(String guid)
      Gets file uploaded chunks status using GUID.
      Parameters:
      guid - Guid of file to get status of
      Returns:
      Document chunks
    • getDocumentConversionStatusV30

      public DocumentConversionStatusJson getDocumentConversionStatusV30​(String guid)
      Gets file conversion status using GUID.
      Parameters:
      guid - Guid of the file to get status of
      Returns:
      The conversion status
    • getDocumentLinkInfoV30

      public DocumentLinkInfoResultJson getDocumentLinkInfoV30​(GetDocumentLinkInfoRequestJson getDocumentLinkInfoRequestJson)
      Gets information on encrypted doc link.
      Parameters:
      getDocumentLinkInfoRequestJson - File to request information about
      Returns:
      Result
    • getDocumentsActivityLogV30

      public PagingItemListJson<ActivityLogRecordJson> getDocumentsActivityLogV30​(GetDocumentsActivityLogRequestJson getDocumentsActivityLogRequestJson)
      Gets activity log for files in WD.
      Parameters:
      getDocumentsActivityLogRequestJson - Information about what to get from the activity log
      Returns:
      List of log activity items
    • getDocumentsConversionStatusV30

      public ItemListJson<DocumentConversionStatusJson> getDocumentsConversionStatusV30​(GetDocumentsConversionStatusJson getDocumentsConversionStatusJson)
      Gets file Conversion status.
      Parameters:
      getDocumentsConversionStatusJson - Version uuids to get status of
      Returns:
      List of file statuses
    • getDocumentsInfoV30

      public PagingItemListJson<DocumentJson> getDocumentsInfoV30​(GetDocumentsGuidsInfoJson getDocumentsGuidsInfoJson)
      Returns a list of info of all the files that are specified and the current user is permitted to view .
      Parameters:
      getDocumentsGuidsInfoJson - details about documents guid
      Returns:
      pagingItemListJson
    • getDownloadPrepareDocumentStatusV30

      public DownloadPrepareDocumentStatusOutputJson getDownloadPrepareDocumentStatusV30​(DownloadPrepareDocumentStatusInputJson downloadPrepareDocumentStatusInputJson)
      Gets download file chunk status.
      Parameters:
      downloadPrepareDocumentStatusInputJson - Uuid of file
      Returns:
      Status of the prepare chunk download
    • getInfoUnauthV30

      public GetInfoUnauthDocumentResultJson getInfoUnauthV30​(UnauthDocumentJson unauthDocumentJson)
      Get information about an unauthorized document.
      Parameters:
      unauthDocumentJson - id and details about the file to get
      Returns:
      GetInfoUnauthDocumentResultJson
    • getInfoV30

      public DocumentJson getInfoV30​(String guid, boolean fetchEvenIfDeleted, boolean markAsExplicit)
      Gets information about the uploaded file.
      Parameters:
      fetchEvenIfDeleted - True to retrieve deleted document info
      guid - The file guid to get the information about.
      markAsExplicit - True to mark this as explicit, false otherwise
      Returns:
      Information about the file, including name, sender, creation date expiration date, permissions, URL
    • getLastDocsWithActivityV30

      public LastDocsWithActivityJson getLastDocsWithActivityV30()
      Gets last document the user had activity with.
      Returns:
      LastDocsWithActivityJson
    • getPdfOnDemandTimeEstimationV30

      public TimeEstimationJson getPdfOnDemandTimeEstimationV30​(String guid)
      Gets Time estimation for completion of PDF conversion task using GUID.
      Parameters:
      guid - Guid of file to check on
      Returns:
      The estimated time
    • getPdfOnDemandTimeEstimationV30

      public TimeEstimationJson getPdfOnDemandTimeEstimationV30​(OnDemandRequestJson onDemandRequestJson)
      Gets Time estimation for completion of PDF conversion task.
      Parameters:
      onDemandRequestJson - File to check on
      Returns:
      The estimated time
    • getPermissionsV30

      public ItemListJson<EntityPermissionJson> getPermissionsV30​(String guid)
      Returns a list of a file's current recipients and their permissions for the file.
      Parameters:
      guid - The guid for the file
      Returns:
      List of recipients and permissions for the file.
    • getTransactionStatusV30

      public TransactionStatusJson getTransactionStatusV30​(TransactionInputJson transactionInputJson)
      Gets file transaction status.
      Parameters:
      transactionInputJson - Uuid of transaction
      Returns:
      Status of the transaction
    • getValidDocumentsInfoV30

      public PagingItemListJson<DocumentJson> getValidDocumentsInfoV30​(GetValidDocumentsGuidsInfoJson getValidDocumentsGuidsInfoJson)
      Returns a list of info of all the valid files that are specified and the current user is permitted to view .
      Parameters:
      getValidDocumentsGuidsInfoJson - details about documents guid
      Returns:
      pagingItemListJson
    • getViewerInfoUnauthV30

      public UnauthDocumentInfoJson getViewerInfoUnauthV30​(DocumentAndVersionJson documentAndVersionJson)
      Get viewer information about an unauthorized document.
      Parameters:
      documentAndVersionJson - guids for the file and version to use
      Returns:
      UnauthDocumentInfoJson
    • listDocumentsPermissionRequestsV30

      public ItemListJson<DocumentPermissionRequestsResultsJson> listDocumentsPermissionRequestsV30​(ListDocumentsPermissionRequestsJson listDocumentsPermissionRequestsJson)
      Lists existing permission requests for a file.
      Parameters:
      listDocumentsPermissionRequestsJson - Details about the file to get info on
      Returns:
      List which indicates whether all requests were successful or, if not, a list of errors.
    • listDocumentsVersionsReadConfirmedV30

      public ListVersionsReadConfirmationRetJson listDocumentsVersionsReadConfirmedV30​(ListVersionsReadConfirmationJson listVersionsReadConfirmationJson)
      list the document versions read by specific user
      Parameters:
      DocumentsReadConfirmationEditJson - json to set read confirmation flags for folders
      Returns:
      bulkOperationResultJson - indicates if actions were successful or, if not, the problems.
    • listExchangesRecycleBinDocumentsV30

      public PagingItemListJson<RecycleBinDocumentJson> listExchangesRecycleBinDocumentsV30​(ListExchangesRecycleBinDocumentsJson listExchangesRecycleBinDocumentsJson)
      Lists files in the Sent items recycle bin/Inbox hidden files. These are files that have been deleted from the exchange but not permanently deleted from the recycle bin. files in the recycle bin can be restored to their original folders in the exchange.
      Parameters:
      listExchangesRecycleBinDocumentsJson - Indicates sort direction and page size (lines) for response
      Returns:
      A list (or partial list) of files in the recycle bin, sorted according to the sort flag and page size.
    • listLastResolvedDocumentPermissionRequestsV30

      public ItemListJson<LastResolvedDocumentPermissionRequestResultJson> listLastResolvedDocumentPermissionRequestsV30​(ListLastResolvedFolderPermissionRequestsJson listLastResolvedFolderPermissionRequestsJson)
      Lists last resolved permission requests on files in workspaces and in Sent items.
      Parameters:
      listLastResolvedFolderPermissionRequestsJson - Details about what requests to get
      Returns:
      A list of resolved permissions
    • listRecipientsV30

      public ItemListJson<UserJson> listRecipientsV30​(SdsGetRecipientsJson sdsGetRecipientsJson)
      Lists recipients for a file.
      Parameters:
      sdsGetRecipientsJson - Guid of the file
      Returns:
      List of recipients
    • listV30

      public PagingItemListJson<DocumentJson> listV30​(ApiDocumentFilter filter, ApiDocumentOrderSDS order, boolean orderAscending, Integer pageNumber, Integer pageSize)
      Returns a list of all the files that the current user is permitted to view (and are not part of a workspace).
      Parameters:
      filter - Define a sub-set of the files to be returned.
      order - How the list will be ordered.
      orderAscending - The alphabetical order of the files in the returned list.
      pageNumber - The number of the page to retrieve (zero-based, 0 is the first page)
      pageSize - Size of a result page (lines)
      Returns:
      List or partial list of files, up to the page size
    • markV30

      public BulkOperationResultJson markV30​(MarkDocumentsSelectionSdsJson markDocumentsSelectionSdsJson)
      Marks a set of files for a specific operation (e.g. delete, download).
      Parameters:
      markDocumentsSelectionSdsJson - Selection of files (by list of guids or filter)
      Returns:
      List which indicates whether all actions were successful or, if not, lists the problems.
    • renameDocumentV30

      public String renameDocumentV30​(String guid, UpdateDocumentJson updateDocumentJson)
      Renames a file in the Sent items. The file remains in the same folder and with the same permissions.
      Parameters:
      guid - Guid of file to be renamed
      updateDocumentJson - New filename for file
      Returns:
      "success"
    • resolveActionForDocumentPermissionRequestV30

      public BulkOperationResultJson resolveActionForDocumentPermissionRequestV30​(ResolveActionForDocumentPermissionRequestJson resolveActionForDocumentPermissionRequestJson)
      Applies a decision on a request.
      Parameters:
      resolveActionForDocumentPermissionRequestJson - File and requestor information
      Returns:
      List which indicates if the action was successful or, if not, the problems.
    • restoreExchangesRecycleBinDocumentsV30

      public BulkOperationResultJson restoreExchangesRecycleBinDocumentsV30​(RestoreExchangesRecycleBinDocumentsJson restoreExchangesRecycleBinDocumentsJson)
      Restores files from the Sent items Recycle bin to their original folders.
      Parameters:
      restoreExchangesRecycleBinDocumentsJson - List of files in recycle bin to restore, and their original folders
      Returns:
      A list which indicates whether all restore actions were successful or, if not, the problems.
    • revokePermissionsV30

      public BulkOperationResultJson revokePermissionsV30​(SdsRevokePermissionsJson sdsRevokePermissionsJson)
      Revokes all permissions for entities (users, groups, lists) for files in Sent items.
      Parameters:
      sdsRevokePermissionsJson - The list of files and recipients for whom permissions are revoked
      Returns:
      List which indicates whether all requests were successful or, if not, a list of errors.
    • searchDocumentsV30

      public PagingItemListJson<BaseJson> searchDocumentsV30​(SearchDocumentsSdsJson searchDocumentsSdsJson)
      Searches for a file in the Inbox/Sent items by name or string. The search string can be a full name or partial one. All folders that the user has access to are searched.
      Parameters:
      searchDocumentsSdsJson - Search parameters, including the file name.
      Returns:
      List of files (if any) matching the search string.
    • sendEmailV30

      public void sendEmailV30​(String guid, SendEmailJson sendEmailJson)
      Sends an email to recipients for a file.
      Parameters:
      guid - The guid of document
      sendEmailJson - The list of email recipients (SendEmailJson)
    • submitDocumentsV30

      public ItemListJson<DocumentJson> submitDocumentsV30​(SubmitDocumentSdsJson submitDocumentSdsJson)
      Submits files in Inbox/Sent items. The submit method is used after an upload, to set file disposition (for example, to send it to a recipient). This action can be done on a list of files.
      Parameters:
      submitDocumentSdsJson - List of users to receive notification and link to the files, permissions to assign the file.
      Returns:
      An indication whether the request succeeded, or indication where it failed.
    • updateDocumentV30

      public String updateDocumentV30​(String guid, File data, DeviceType deviceType, String documentName, String mailBody, String mailSubject, Boolean sendMail)
      Updates the file on the server with a new version. Older versions are maintained, but the latest version is the one accessed by default.
      Parameters:
      data - Data stream to download the file from.
      deviceType - The device type
      documentName - The name of the file to be uploaded(may be left null).
      guid - The guid of the file to be updated with a new version.
      mailBody - Body of email for notification email
      mailSubject - Subject line for notification email
      sendMail - Flag indicating whether the server should notify recipients about the new version by email.
      Returns:
      "success".
    • upgradePdfRequestToOnDemandV30

      public BulkOperationResultJson upgradePdfRequestToOnDemandV30​(String guid)
      Sets a request for PDF on demand using GUID.
      Parameters:
      guid - Guid of file to update
      Returns:
      List which indicates whether all requests were successful or, if not, a list of errors.
    • upgradePdfRequestToOnDemandV30

      public BulkOperationResultJson upgradePdfRequestToOnDemandV30​(OnDemandRequestJson onDemandRequestJson)
      Sets a request for PDF on demand.
      Parameters:
      onDemandRequestJson - File to update
      Returns:
      List which indicates whether all requests were successful or, if not, a list of errors.
    • upgradePdfRequestToOnDemandV30

      public BulkOperationResultJson upgradePdfRequestToOnDemandV30​(GuidJson guidJson)
      Upgrade PDF request to on demand.
      Parameters:
      guidJson - guid of file to update
      Returns:
      BulkOperationResultJson indication whether all requests were successful or, if not, a list of errors.
    • uploadDocumentBase64V30

      public String uploadDocumentBase64V30​(String guid, File data, DeviceType deviceType, String documentName)
      Uploads a file to Sent items in base64 format.
      Parameters:
      data - The file data
      deviceType - The device type
      documentName - The name of the file as a string (eg "filename.txt")
      guid - Guid for the file to be uploaded
      Returns:
      "success" if successful
    • uploadDocumentByPostV30

      public String uploadDocumentByPostV30​(String guid, File data, DeviceType deviceType, String documentName, String fileName, Long start)
      Uploads to Sent items in base64 format.
      Parameters:
      data - The binary data of the file
      deviceType - The device type
      documentName - The name of the uploaded file (e.g. 'filename1.doc' or 'exampleFileNameWithNoExtension')
      fileName - The file name of the uploaded file
      guid - The new file's guid (e.g. 'f627e7a8-5ec7-459f-ad93-182baa60d2b2')
      start - The start
      Returns:
      "success" if successful
    • uploadDocumentByPostV30

      public String uploadDocumentByPostV30​(String guid, InputStream data, DeviceType deviceType, String documentName, String fileName, Long start)
      Uploads to Sent items in base64 format.
      Parameters:
      data - The binary data of the file
      deviceType - The device type
      documentName - The name of the uploaded file (e.g. 'filename1.doc' or 'exampleFileNameWithNoExtension')
      fileName - The file name of the uploaded file
      guid - The new file's guid (e.g. 'f627e7a8-5ec7-459f-ad93-182baa60d2b2')
      start - The start
      Returns:
      "success" if successful
    • validateDocumentsToDownloadV30

      public BulkOperationResultJson validateDocumentsToDownloadV30​(ValidateDownloadDocumentsSelectionSdsJson validateDownloadDocumentsSelectionSdsJson)
      Validates a list of files prior to requesting the download. The validation request checks whether all the files exist and whether the user as sufficient rights to download them.
      Parameters:
      validateDownloadDocumentsSelectionSdsJson - list of files to validate.
      Returns:
      List which indicates whether all files can be downloaded or, if not, which cannot.
    • validateDownloadSentItemsWithRecycleBinV30

      public BulkOperationResultJson validateDownloadSentItemsWithRecycleBinV30​(ValidateDownloadSentItemsDocumentsWithRecycleBinJson validateDownloadSentItemsDocumentsWithRecycleBinJson)
      Validates sent items download of a user with it's recycle bin.
      Parameters:
      validateDownloadSentItemsDocumentsWithRecycleBinJson - user information
      Returns:
      List which indicates whether all requests were successful or, if not, a list of errors.