public class DbxUserPaperRequests
extends java.lang.Object
Constructor and Description |
---|
DbxUserPaperRequests(DbxRawClientV2 client) |
Modifier and Type | Method and Description |
---|---|
void |
docsArchive(java.lang.String docId)
Marks the given Paper doc as archived.
|
DocsCreateUploader |
docsCreate(ImportFormat importFormat)
Creates a new Paper doc with the provided content.
|
DocsCreateUploader |
docsCreate(ImportFormat importFormat,
java.lang.String parentFolderId)
Creates a new Paper doc with the provided content.
|
DbxDownloader<PaperDocExportResult> |
docsDownload(java.lang.String docId,
ExportFormat exportFormat)
Exports and downloads Paper doc either as HTML or markdown.
|
DocsDownloadBuilder |
docsDownloadBuilder(java.lang.String docId,
ExportFormat exportFormat)
Exports and downloads Paper doc either as HTML or markdown.
|
ListUsersOnFolderResponse |
docsFolderUsersList(java.lang.String docId)
Lists the users who are explicitly invited to the Paper folder in which
the Paper doc is contained.
|
ListUsersOnFolderResponse |
docsFolderUsersList(java.lang.String docId,
int limit)
Lists the users who are explicitly invited to the Paper folder in which
the Paper doc is contained.
|
ListUsersOnFolderResponse |
docsFolderUsersListContinue(java.lang.String docId,
java.lang.String cursor)
Once a cursor has been retrieved from
docsFolderUsersList(String,int) , use this to
paginate through all users on the Paper folder. |
FoldersContainingPaperDoc |
docsGetFolderInfo(java.lang.String docId)
Retrieves folder information for the given Paper doc.
|
ListPaperDocsResponse |
docsList()
Return the list of all Paper docs according to the argument
specifications.
|
DocsListBuilder |
docsListBuilder()
Return the list of all Paper docs according to the argument
specifications.
|
ListPaperDocsResponse |
docsListContinue(java.lang.String cursor)
Once a cursor has been retrieved from
docsList(com.dropbox.core.v2.paper.ListPaperDocsArgs) , use this to paginate through all Paper
doc. |
void |
docsPermanentlyDelete(java.lang.String docId)
Permanently deletes the given Paper doc.
|
SharingPolicy |
docsSharingPolicyGet(java.lang.String docId)
Gets the default sharing policy for the given Paper doc.
|
void |
docsSharingPolicySet(java.lang.String docId,
SharingPolicy sharingPolicy)
Sets the default sharing policy for the given Paper doc.
|
DocsUpdateUploader |
docsUpdate(java.lang.String docId,
PaperDocUpdatePolicy docUpdatePolicy,
long revision,
ImportFormat importFormat)
Updates an existing Paper doc with the provided content.
|
java.util.List<AddPaperDocUserMemberResult> |
docsUsersAdd(java.lang.String docId,
java.util.List<AddMember> members)
Allows an owner or editor to add users to a Paper doc or change their
permissions using their email address or Dropbox account ID.
|
DocsUsersAddBuilder |
docsUsersAddBuilder(java.lang.String docId,
java.util.List<AddMember> members)
Allows an owner or editor to add users to a Paper doc or change their
permissions using their email address or Dropbox account ID.
|
ListUsersOnPaperDocResponse |
docsUsersList(java.lang.String docId)
Lists all users who visited the Paper doc or users with explicit access.
|
DocsUsersListBuilder |
docsUsersListBuilder(java.lang.String docId)
Lists all users who visited the Paper doc or users with explicit access.
|
ListUsersOnPaperDocResponse |
docsUsersListContinue(java.lang.String docId,
java.lang.String cursor)
Once a cursor has been retrieved from
docsUsersList(String) , use this to paginate through
all users on the Paper doc. |
void |
docsUsersRemove(java.lang.String docId,
MemberSelector member)
Allows an owner or editor to remove users from a Paper doc using their
email address or Dropbox account ID.
|
public DbxUserPaperRequests(DbxRawClientV2 client)
public void docsArchive(java.lang.String docId) throws DocLookupErrorException, DbxException
docId
- The Paper doc ID. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.DocLookupErrorException
DbxException
public DocsCreateUploader docsCreate(ImportFormat importFormat) throws DbxException
importFormat
- The format of provided data. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.DbxException
public DocsCreateUploader docsCreate(ImportFormat importFormat, java.lang.String parentFolderId) throws DbxException
importFormat
- The format of provided data. Must not be null
.parentFolderId
- The Paper folder ID where the Paper document
should be created. The API user has to have write access to this
folder or error is thrown.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.DbxException
public DbxDownloader<PaperDocExportResult> docsDownload(java.lang.String docId, ExportFormat exportFormat) throws DocLookupErrorException, DbxException
docId
- The Paper doc ID. Must not be null
.exportFormat
- Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.DocLookupErrorException
DbxException
public DocsDownloadBuilder docsDownloadBuilder(java.lang.String docId, ExportFormat exportFormat)
docId
- The Paper doc ID. Must not be null
.exportFormat
- Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public ListUsersOnFolderResponse docsFolderUsersList(java.lang.String docId) throws DocLookupErrorException, DbxException
The limit
request parameter will default to 1000
(see
docsFolderUsersList(String,int)
).
docId
- The Paper doc ID. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.DocLookupErrorException
DbxException
public ListUsersOnFolderResponse docsFolderUsersList(java.lang.String docId, int limit) throws DocLookupErrorException, DbxException
docId
- The Paper doc ID. Must not be null
.limit
- Size limit per batch. The maximum number of users that can
be retrieved per batch is 1000. Higher value results in invalid
arguments error. Must be greater than or equal to 1 and be less than
or equal to 1000.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.DocLookupErrorException
DbxException
public ListUsersOnFolderResponse docsFolderUsersListContinue(java.lang.String docId, java.lang.String cursor) throws ListUsersCursorErrorException, DbxException
docsFolderUsersList(String,int)
, use this to
paginate through all users on the Paper folder.docId
- The Paper doc ID. Must not be null
.cursor
- The cursor obtained from docsFolderUsersList(String,int)
or docsFolderUsersListContinue(String,String)
.
Allows for pagination. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.ListUsersCursorErrorException
DbxException
public FoldersContainingPaperDoc docsGetFolderInfo(java.lang.String docId) throws DocLookupErrorException, DbxException
Note: If the Paper doc is not in any folder (aka unfiled) the response will be empty.
docId
- The Paper doc ID. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.DocLookupErrorException
DbxException
public ListPaperDocsResponse docsList() throws DbxApiException, DbxException
docsListContinue(String)
.
The default values for the optional request parameters will be used.
See DocsListBuilder
for more details.
DbxApiException
DbxException
public DocsListBuilder docsListBuilder()
docsListContinue(String)
.public ListPaperDocsResponse docsListContinue(java.lang.String cursor) throws ListDocsCursorErrorException, DbxException
docsList(com.dropbox.core.v2.paper.ListPaperDocsArgs)
, use this to paginate through all Paper
doc.cursor
- The cursor obtained from docsList(com.dropbox.core.v2.paper.ListPaperDocsArgs)
or docsListContinue(String)
. Allows for
pagination. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.ListDocsCursorErrorException
DbxException
public void docsPermanentlyDelete(java.lang.String docId) throws DocLookupErrorException, DbxException
Note: This action can be performed only by the doc owner.
docId
- The Paper doc ID. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.DocLookupErrorException
DbxException
public SharingPolicy docsSharingPolicyGet(java.lang.String docId) throws DocLookupErrorException, DbxException
docId
- The Paper doc ID. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.DocLookupErrorException
DbxException
public void docsSharingPolicySet(java.lang.String docId, SharingPolicy sharingPolicy) throws DocLookupErrorException, DbxException
Note: 'public_sharing_policy' cannot be set to the value 'disabled' because this setting can be changed only via the team admin console.
docId
- The Paper doc ID. Must not be null
.sharingPolicy
- The default sharing policy to be set for the Paper
doc. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.DocLookupErrorException
DbxException
public DocsUpdateUploader docsUpdate(java.lang.String docId, PaperDocUpdatePolicy docUpdatePolicy, long revision, ImportFormat importFormat) throws DbxException
docId
- The Paper doc ID. Must not be null
.docUpdatePolicy
- The policy used for the current update call. Must
not be null
.revision
- The latest doc revision. This value must match the head
revision or an error code will be returned. This is to prevent
colliding writes.importFormat
- The format of provided data. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.DbxException
public java.util.List<AddPaperDocUserMemberResult> docsUsersAdd(java.lang.String docId, java.util.List<AddMember> members) throws DocLookupErrorException, DbxException
Note: The Doc owner's permissions cannot be changed.
The default values for the optional request parameters will be used.
See DocsUsersAddBuilder
for more details.
docId
- The Paper doc ID. Must not be null
.members
- User which should be added to the Paper doc. Specify only
email address or Dropbox account ID. Must contain at most 20 items,
not contain a null
item, and not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.DocLookupErrorException
DbxException
public DocsUsersAddBuilder docsUsersAddBuilder(java.lang.String docId, java.util.List<AddMember> members)
Note: The Doc owner's permissions cannot be changed.
docId
- The Paper doc ID. Must not be null
.members
- User which should be added to the Paper doc. Specify only
email address or Dropbox account ID. Must contain at most 20 items,
not contain a null
item, and not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public ListUsersOnPaperDocResponse docsUsersList(java.lang.String docId) throws DocLookupErrorException, DbxException
The default values for the optional request parameters will be used.
See DocsUsersListBuilder
for more details.
docId
- The Paper doc ID. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.DocLookupErrorException
DbxException
public DocsUsersListBuilder docsUsersListBuilder(java.lang.String docId)
docId
- The Paper doc ID. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public ListUsersOnPaperDocResponse docsUsersListContinue(java.lang.String docId, java.lang.String cursor) throws ListUsersCursorErrorException, DbxException
docsUsersList(String)
, use this to paginate through
all users on the Paper doc.docId
- The Paper doc ID. Must not be null
.cursor
- The cursor obtained from docsUsersList(String)
or docsUsersListContinue(String,String)
. Allows
for pagination. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.ListUsersCursorErrorException
DbxException
public void docsUsersRemove(java.lang.String docId, MemberSelector member) throws DocLookupErrorException, DbxException
Note: Doc owner cannot be removed.
docId
- The Paper doc ID. Must not be null
.member
- User which should be removed from the Paper doc. Specify
only email address or Dropbox account ID. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.DocLookupErrorException
DbxException