Package com.dropbox.core.v2.clouddocs
Class DbxUserCloudDocsRequests
- java.lang.Object
-
- com.dropbox.core.v2.clouddocs.DbxUserCloudDocsRequests
-
public class DbxUserCloudDocsRequests extends java.lang.ObjectRoutes in namespace "cloud_docs".
-
-
Constructor Summary
Constructors Constructor Description DbxUserCloudDocsRequests(DbxRawClientV2 client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DbxDownloader<java.lang.Void>getContent(java.lang.String fileId)Fetch the binary content of the requested document.GetContentBuildergetContentBuilder(java.lang.String fileId)Fetch the binary content of the requested document.GetMetadataResultgetMetadata()Fetches metadata associated with a Cloud Doc and user.GetMetadataResultgetMetadata(java.lang.String fileId)Fetches metadata associated with a Cloud Doc and user.LockResultlock()Lock a Cloud Doc.LockResultlock(java.lang.String fileId)Lock a Cloud Doc.RenameResultrename()Update the title of a Cloud Doc.RenameBuilderrenameBuilder()Update the title of a Cloud Doc.UnlockResultunlock()Unlock a Cloud Doc.UnlockResultunlock(java.lang.String fileId)Unlock a Cloud Doc.UpdateContentUploaderupdateContent(java.lang.String fileId, java.util.List<java.lang.String> actorTokens)Update the contents of a Cloud Doc.UpdateContentUploaderupdateContent(java.lang.String fileId, java.util.List<java.lang.String> actorTokens, java.util.List<Content> additionalContents)Update the contents of a Cloud Doc.
-
-
-
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 benull.- 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.CloudDocsAccessErrorExceptionDbxException
-
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 benull.- 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() 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.The
fileIdrequest parameter will default to"\"\""(seegetMetadata(String)).
-
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 benull.- Throws:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.GetMetadataErrorExceptionDbxException
-
lock
public LockResult lock() 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.The
fileIdrequest parameter will default to"\"\""(seelock(String)).- Throws:
LockingErrorExceptionDbxException
-
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 benull.- Throws:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.LockingErrorExceptionDbxException
-
rename
public RenameResult rename() throws RenameErrorException, DbxException
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.The default values for the optional request parameters will be used. See
RenameBuilderfor more details.- Throws:
RenameErrorExceptionDbxException
-
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() 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.The
fileIdrequest parameter will default to"\"\""(seeunlock(String)).- Returns:
- Empty message for unlock
- Throws:
LockingErrorExceptionDbxException
-
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 benull.- Returns:
- Empty message for unlock
- Throws:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.LockingErrorExceptionDbxException
-
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 benull.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 anullitem and not benull.- 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 benull.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 anullitem and not benull.additionalContents- Currently, this will always be empty until we implement upload_additional_content. Must not contain anullitem.- Returns:
- Uploader used to upload the request body and finish request.
- Throws:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.DbxException
-
-