Package com.dropbox.core.v2.clouddocs
Class DbxUserCloudDocsRequests
- java.lang.Object
-
- com.dropbox.core.v2.clouddocs.DbxUserCloudDocsRequests
-
public class DbxUserCloudDocsRequests extends java.lang.Object
Routes 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.GetContentBuilder
getContentBuilder(java.lang.String fileId)
Fetch the binary content of the requested document.GetMetadataResult
getMetadata()
Fetches metadata associated with a Cloud Doc and user.GetMetadataResult
getMetadata(java.lang.String fileId)
Fetches metadata associated with a Cloud Doc and user.LockResult
lock()
Lock a Cloud Doc.LockResult
lock(java.lang.String fileId)
Lock a Cloud Doc.RenameResult
rename()
Update the title of a Cloud Doc.RenameBuilder
renameBuilder()
Update the title of a Cloud Doc.UnlockResult
unlock()
Unlock a Cloud Doc.UnlockResult
unlock(java.lang.String fileId)
Unlock a Cloud Doc.UpdateContentUploader
updateContent(java.lang.String fileId, java.util.List<java.lang.String> actorTokens)
Update the contents of a Cloud Doc.UpdateContentUploader
updateContent(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.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 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
fileId
request 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.GetMetadataErrorException
DbxException
-
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
fileId
request parameter will default to"\"\""
(seelock(String)
).- Throws:
LockingErrorException
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 benull
.- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.LockingErrorException
DbxException
-
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
RenameBuilder
for more details.- Throws:
RenameErrorException
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() 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
fileId
request parameter will default to"\"\""
(seeunlock(String)
).- Returns:
- Empty message for unlock
- Throws:
LockingErrorException
DbxException
-
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.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 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 anull
item 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 anull
item and not benull
.additionalContents
- Currently, this will always be empty until we implement upload_additional_content. Must not contain anull
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
-
-