Class DbxUserCloudDocsRequests


  • public class DbxUserCloudDocsRequests
    extends java.lang.Object
    Routes in namespace "cloud_docs".
    • Constructor Detail

      • DbxUserCloudDocsRequests

        public DbxUserCloudDocsRequests​(DbxRawClientV2 client)
    • Method Detail

      • getContent

        public DbxDownloader<java.lang.Void> getContent​(java.lang.String fileId)
                                                 throws CloudDocsAccessErrorException,
                                                        DbxException
        Fetch the binary content of the requested document. This route requires Cloud Docs auth. Please make a request to cloud_docs/authorize and supply that token in the Authorization header.
        Parameters:
        fileId - Must have length of at least 4, match pattern " id:.+", and not be null.
        Returns:
        Downloader used to download the response body and view the server response.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        CloudDocsAccessErrorException
        DbxException
      • getContentBuilder

        public GetContentBuilder getContentBuilder​(java.lang.String fileId)
        Fetch the binary content of the requested document. This route requires Cloud Docs auth. Please make a request to cloud_docs/authorize and supply that token in the Authorization header.
        Parameters:
        fileId - Must have length of at least 4, match pattern " id:.+", and not be null.
        Returns:
        Downloader builder for configuring the request parameters and instantiating a downloader.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • getMetadata

        public GetMetadataResult getMetadata​(java.lang.String fileId)
                                      throws GetMetadataErrorException,
                                             DbxException
        Fetches metadata associated with a Cloud Doc and user. This route requires Cloud Docs auth. Please make a request to cloud_docs/authorize and supply that token in the Authorization header.
        Parameters:
        fileId - API ID ("id:...") associated with the Cloud Doc. Must not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        GetMetadataErrorException
        DbxException
      • lock

        public LockResult lock​(java.lang.String fileId)
                        throws LockingErrorException,
                               DbxException
        Lock a Cloud Doc. This route requires Cloud Docs auth. Please make a request to cloud_docs/authorize and supply that token in the Authorization header.
        Parameters:
        fileId - The API ID ("id:...") associated with the Cloud Doc. Must not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        LockingErrorException
        DbxException
      • renameBuilder

        public RenameBuilder renameBuilder()
        Update the title of a Cloud Doc. This route requires Cloud Docs auth. Please make a request to cloud_docs/authorize and supply that token in the Authorization header.
        Returns:
        Request builder for configuring request parameters and completing the request.
      • unlock

        public UnlockResult unlock​(java.lang.String fileId)
                            throws LockingErrorException,
                                   DbxException
        Unlock a Cloud Doc. This route requires Cloud Docs auth. Please make a request to cloud_docs/authorize and supply that token in the Authorization header.
        Parameters:
        fileId - The API ID ("id:...") associated with the Cloud Doc. Must not be null.
        Returns:
        Empty message for unlock
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        LockingErrorException
        DbxException
      • updateContent

        public UpdateContentUploader updateContent​(java.lang.String fileId,
                                                   java.util.List<java.lang.String> actorTokens)
                                            throws DbxException
        Update the contents of a Cloud Doc. This should be called for files with a max size of 150MB. This route requires Cloud Docs auth. Please make a request to cloud_docs/authorize and supply that token in the Authorization header.
        Parameters:
        fileId - Must have length of at least 4, match pattern " id:.+", and not be null.
        actorTokens - A list of auth_tokens, one for each editor who made changes to the document since the last call to update_content. Must not contain a null item and not be null.
        Returns:
        Uploader used to upload the request body and finish request.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        DbxException
      • updateContent

        public UpdateContentUploader updateContent​(java.lang.String fileId,
                                                   java.util.List<java.lang.String> actorTokens,
                                                   java.util.List<Content> additionalContents)
                                            throws DbxException
        Update the contents of a Cloud Doc. This should be called for files with a max size of 150MB. This route requires Cloud Docs auth. Please make a request to cloud_docs/authorize and supply that token in the Authorization header.
        Parameters:
        fileId - Must have length of at least 4, match pattern " id:.+", and not be null.
        actorTokens - A list of auth_tokens, one for each editor who made changes to the document since the last call to update_content. Must not contain a null item and not be null.
        additionalContents - Currently, this will always be empty until we implement upload_additional_content. Must not contain a null item.
        Returns:
        Uploader used to upload the request body and finish request.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        DbxException