public class DbxUserSharingRequests
extends java.lang.Object
Constructor and Description |
---|
DbxUserSharingRequests(DbxRawClientV2 client) |
Modifier and Type | Method and Description |
---|---|
java.util.List<FileMemberActionResult> |
addFileMember(java.lang.String file,
java.util.List<MemberSelector> members)
Adds specified members to a file.
|
AddFileMemberBuilder |
addFileMemberBuilder(java.lang.String file,
java.util.List<MemberSelector> members)
Adds specified members to a file.
|
void |
addFolderMember(java.lang.String sharedFolderId,
java.util.List<AddMember> members)
Allows an owner or editor (if the ACL update policy allows) of a shared
folder to add another member.
|
AddFolderMemberBuilder |
addFolderMemberBuilder(java.lang.String sharedFolderId,
java.util.List<AddMember> members)
Allows an owner or editor (if the ACL update policy allows) of a shared
folder to add another member.
|
FileMemberActionResult |
changeFileMemberAccess(java.lang.String file,
MemberSelector member,
AccessLevel accessLevel)
Deprecated.
use
updateFileMember(String,MemberSelector,AccessLevel)
instead. |
JobStatus |
checkJobStatus(java.lang.String asyncJobId)
Returns the status of an asynchronous job.
|
RemoveMemberJobStatus |
checkRemoveMemberJobStatus(java.lang.String asyncJobId)
Returns the status of an asynchronous job for sharing a folder.
|
ShareFolderJobStatus |
checkShareJobStatus(java.lang.String asyncJobId)
Returns the status of an asynchronous job for sharing a folder.
|
PathLinkMetadata |
createSharedLink(java.lang.String path)
Deprecated.
|
CreateSharedLinkBuilder |
createSharedLinkBuilder(java.lang.String path)
Deprecated.
|
SharedLinkMetadata |
createSharedLinkWithSettings(java.lang.String path)
Create a shared link with custom settings.
|
SharedLinkMetadata |
createSharedLinkWithSettings(java.lang.String path,
SharedLinkSettings settings)
Create a shared link with custom settings.
|
SharedFileMetadata |
getFileMetadata(java.lang.String file)
Returns shared file metadata.
|
SharedFileMetadata |
getFileMetadata(java.lang.String file,
java.util.List<FileAction> actions)
Returns shared file metadata.
|
java.util.List<GetFileMetadataBatchResult> |
getFileMetadataBatch(java.util.List<java.lang.String> files)
Returns shared file metadata.
|
java.util.List<GetFileMetadataBatchResult> |
getFileMetadataBatch(java.util.List<java.lang.String> files,
java.util.List<FileAction> actions)
Returns shared file metadata.
|
SharedFolderMetadata |
getFolderMetadata(java.lang.String sharedFolderId)
Returns shared folder metadata by its folder ID.
|
SharedFolderMetadata |
getFolderMetadata(java.lang.String sharedFolderId,
java.util.List<FolderAction> actions)
Returns shared folder metadata by its folder ID.
|
DbxDownloader<SharedLinkMetadata> |
getSharedLinkFile(java.lang.String url)
Download the shared link's file from a user's Dropbox.
|
GetSharedLinkFileBuilder |
getSharedLinkFileBuilder(java.lang.String url)
Download the shared link's file from a user's Dropbox.
|
SharedLinkMetadata |
getSharedLinkMetadata(java.lang.String url)
Get the shared link's metadata.
|
GetSharedLinkMetadataBuilder |
getSharedLinkMetadataBuilder(java.lang.String url)
Get the shared link's metadata.
|
GetSharedLinksResult |
getSharedLinks()
Deprecated.
|
GetSharedLinksResult |
getSharedLinks(java.lang.String path)
Deprecated.
|
SharedFileMembers |
listFileMembers(java.lang.String file)
Use to obtain the members who have been invited to a file, both inherited
and uninherited members.
|
java.util.List<ListFileMembersBatchResult> |
listFileMembersBatch(java.util.List<java.lang.String> files)
Get members of multiple files at once.
|
java.util.List<ListFileMembersBatchResult> |
listFileMembersBatch(java.util.List<java.lang.String> files,
long limit)
Get members of multiple files at once.
|
ListFileMembersBuilder |
listFileMembersBuilder(java.lang.String file)
Use to obtain the members who have been invited to a file, both inherited
and uninherited members.
|
SharedFileMembers |
listFileMembersContinue(java.lang.String cursor)
Once a cursor has been retrieved from
listFileMembers(String) or listFileMembersBatch(List,long) , use this to
paginate through all shared file members. |
SharedFolderMembers |
listFolderMembers(java.lang.String sharedFolderId)
Returns shared folder membership by its folder ID.
|
ListFolderMembersBuilder |
listFolderMembersBuilder(java.lang.String sharedFolderId)
Returns shared folder membership by its folder ID.
|
SharedFolderMembers |
listFolderMembersContinue(java.lang.String cursor)
Once a cursor has been retrieved from
listFolderMembers(String) , use this to paginate
through all shared folder members. |
ListFoldersResult |
listFolders()
Return the list of all shared folders the current user has access to.
|
ListFoldersBuilder |
listFoldersBuilder()
Return the list of all shared folders the current user has access to.
|
ListFoldersResult |
listFoldersContinue(java.lang.String cursor)
Once a cursor has been retrieved from
listFolders(com.dropbox.core.v2.sharing.ListFoldersArgs) , use this to paginate through all
shared folders. |
ListFoldersResult |
listMountableFolders()
Return the list of all shared folders the current user can mount or
unmount.
|
ListMountableFoldersBuilder |
listMountableFoldersBuilder()
Return the list of all shared folders the current user can mount or
unmount.
|
ListFoldersResult |
listMountableFoldersContinue(java.lang.String cursor)
Once a cursor has been retrieved from
listMountableFolders(com.dropbox.core.v2.sharing.ListFoldersArgs) , use this to paginate
through all mountable shared folders. |
ListFilesResult |
listReceivedFiles()
Returns a list of all files shared with current user.
|
ListReceivedFilesBuilder |
listReceivedFilesBuilder()
Returns a list of all files shared with current user.
|
ListFilesResult |
listReceivedFilesContinue(java.lang.String cursor)
Get more results with a cursor from
listReceivedFiles(com.dropbox.core.v2.sharing.ListFilesArg) . |
ListSharedLinksResult |
listSharedLinks()
List shared links of this user.
|
ListSharedLinksBuilder |
listSharedLinksBuilder()
List shared links of this user.
|
SharedLinkMetadata |
modifySharedLinkSettings(java.lang.String url,
SharedLinkSettings settings)
Modify the shared link's settings.
|
SharedLinkMetadata |
modifySharedLinkSettings(java.lang.String url,
SharedLinkSettings settings,
boolean removeExpiration)
Modify the shared link's settings.
|
SharedFolderMetadata |
mountFolder(java.lang.String sharedFolderId)
The current user mounts the designated folder.
|
void |
relinquishFileMembership(java.lang.String file)
The current user relinquishes their membership in the designated file.
|
LaunchEmptyResult |
relinquishFolderMembership(java.lang.String sharedFolderId)
The current user relinquishes their membership in the designated shared
folder and will no longer have access to the folder.
|
LaunchEmptyResult |
relinquishFolderMembership(java.lang.String sharedFolderId,
boolean leaveACopy)
The current user relinquishes their membership in the designated shared
folder and will no longer have access to the folder.
|
FileMemberActionIndividualResult |
removeFileMember(java.lang.String file,
MemberSelector member)
Deprecated.
use
removeFileMember2(String,MemberSelector)
instead. |
FileMemberRemoveActionResult |
removeFileMember2(java.lang.String file,
MemberSelector member)
Removes a specified member from the file.
|
LaunchResultBase |
removeFolderMember(java.lang.String sharedFolderId,
MemberSelector member,
boolean leaveACopy)
Allows an owner or editor (if the ACL update policy allows) of a shared
folder to remove another member.
|
void |
revokeSharedLink(java.lang.String url)
Revoke a shared link.
|
ShareFolderLaunch |
setAccessInheritance(java.lang.String sharedFolderId)
Change the inheritance policy of an existing Shared Folder.
|
ShareFolderLaunch |
setAccessInheritance(java.lang.String sharedFolderId,
AccessInheritance accessInheritance)
Change the inheritance policy of an existing Shared Folder.
|
ShareFolderLaunch |
shareFolder(java.lang.String path)
Share a folder with collaborators.
|
ShareFolderBuilder |
shareFolderBuilder(java.lang.String path)
Share a folder with collaborators.
|
void |
transferFolder(java.lang.String sharedFolderId,
java.lang.String toDropboxId)
Transfer ownership of a shared folder to a member of the shared folder.
|
void |
unmountFolder(java.lang.String sharedFolderId)
The current user unmounts the designated folder.
|
void |
unshareFile(java.lang.String file)
Remove all members from this file.
|
LaunchEmptyResult |
unshareFolder(java.lang.String sharedFolderId)
Allows a shared folder owner to unshare the folder.
|
LaunchEmptyResult |
unshareFolder(java.lang.String sharedFolderId,
boolean leaveACopy)
Allows a shared folder owner to unshare the folder.
|
MemberAccessLevelResult |
updateFileMember(java.lang.String file,
MemberSelector member,
AccessLevel accessLevel)
Changes a member's access on a shared file.
|
MemberAccessLevelResult |
updateFolderMember(java.lang.String sharedFolderId,
MemberSelector member,
AccessLevel accessLevel)
Allows an owner or editor of a shared folder to update another member's
permissions.
|
SharedFolderMetadata |
updateFolderPolicy(java.lang.String sharedFolderId)
Update the sharing policies for a shared folder.
|
UpdateFolderPolicyBuilder |
updateFolderPolicyBuilder(java.lang.String sharedFolderId)
Update the sharing policies for a shared folder.
|
public DbxUserSharingRequests(DbxRawClientV2 client)
public java.util.List<FileMemberActionResult> addFileMember(java.lang.String file, java.util.List<MemberSelector> members) throws AddFileMemberErrorException, DbxException
The default values for the optional request parameters will be used.
See AddFileMemberBuilder
for more details.
file
- File to which to add members. Must have length of at least
1, match pattern "((/|id:).*|nspath:[0-9]+:.*)|ns:[0-9]+(/.*)?
", and not be null
.members
- Members to add. Note that even an email address is given,
this may result in a user being directy added to the membership if
that email is the user's main account email. Must not contain a
null
item and not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.AddFileMemberErrorException
DbxException
public AddFileMemberBuilder addFileMemberBuilder(java.lang.String file, java.util.List<MemberSelector> members)
file
- File to which to add members. Must have length of at least
1, match pattern "((/|id:).*|nspath:[0-9]+:.*)|ns:[0-9]+(/.*)?
", and not be null
.members
- Members to add. Note that even an email address is given,
this may result in a user being directy added to the membership if
that email is the user's main account email. Must not contain a
null
item and not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public void addFolderMember(java.lang.String sharedFolderId, java.util.List<AddMember> members) throws AddFolderMemberErrorException, DbxException
For the new member to get access to all the functionality for this
folder, you will need to call mountFolder(String)
on their behalf.
The default values for the optional request parameters will be used.
See AddFolderMemberBuilder
for more details.
sharedFolderId
- The ID for the shared folder. Must match pattern
"[-_0-9a-zA-Z:]+
" and not be null
.members
- The intended list of members to add. Added members will
receive invites to join the shared folder. Must not contain a null
item and not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.AddFolderMemberErrorException
DbxException
public AddFolderMemberBuilder addFolderMemberBuilder(java.lang.String sharedFolderId, java.util.List<AddMember> members)
mountFolder(String)
on their behalf.sharedFolderId
- The ID for the shared folder. Must match pattern
"[-_0-9a-zA-Z:]+
" and not be null
.members
- The intended list of members to add. Added members will
receive invites to join the shared folder. Must not contain a null
item and not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.@Deprecated public FileMemberActionResult changeFileMemberAccess(java.lang.String file, MemberSelector member, AccessLevel accessLevel) throws FileMemberActionErrorException, DbxException
updateFileMember(String,MemberSelector,AccessLevel)
instead.file
- File for which we are changing a member's access. Must have
length of at least 1, match pattern "((/|id:).*|nspath:[0-9]+:.*)|ns:[0-9]+(/.*)?
", and not be null
.member
- The member whose access we are changing. Must not be
null
.accessLevel
- The new access level for the member. Must not be
null
.addFileMember(String,List)
or changeFileMemberAccess(String,MemberSelector,AccessLevel)
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.FileMemberActionErrorException
DbxException
public JobStatus checkJobStatus(java.lang.String asyncJobId) throws PollErrorException, DbxException
asyncJobId
- Id of the asynchronous job. This is the value of a
response returned from the method that launched the job. Must have
length of at least 1 and not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.PollErrorException
DbxException
public RemoveMemberJobStatus checkRemoveMemberJobStatus(java.lang.String asyncJobId) throws PollErrorException, DbxException
asyncJobId
- Id of the asynchronous job. This is the value of a
response returned from the method that launched the job. Must have
length of at least 1 and not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.PollErrorException
DbxException
public ShareFolderJobStatus checkShareJobStatus(java.lang.String asyncJobId) throws PollErrorException, DbxException
asyncJobId
- Id of the asynchronous job. This is the value of a
response returned from the method that launched the job. Must have
length of at least 1 and not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.PollErrorException
DbxException
@Deprecated public PathLinkMetadata createSharedLink(java.lang.String path) throws CreateSharedLinkErrorException, DbxException
createSharedLinkWithSettings(String,SharedLinkSettings)
instead.If a shared link already exists for the given path, that link is returned.
Note that in the returned PathLinkMetadata
, the PathLinkMetadata.getUrl()
field is the shortened URL if CreateSharedLinkArg.getShortUrl()
argument is set to true
.
Previously, it was technically possible to break a shared link by
moving or renaming the corresponding file or folder. In the future, this
will no longer be the case, so your app shouldn't rely on this behavior.
Instead, if your app needs to revoke a shared link, use revokeSharedLink(String)
.
The default values for the optional request parameters will be used.
See CreateSharedLinkBuilder
for more details.
path
- The path to share. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.CreateSharedLinkErrorException
DbxException
@Deprecated public CreateSharedLinkBuilder createSharedLinkBuilder(java.lang.String path)
createSharedLinkWithSettings(String,SharedLinkSettings)
instead.PathLinkMetadata
, the PathLinkMetadata.getUrl()
field is the
shortened URL if CreateSharedLinkArg.getShortUrl()
argument is set
to true
. Previously, it was technically possible to break a
shared link by moving or renaming the corresponding file or folder. In
the future, this will no longer be the case, so your app shouldn't rely
on this behavior. Instead, if your app needs to revoke a shared link, use
revokeSharedLink(String)
.path
- The path to share. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public SharedLinkMetadata createSharedLinkWithSettings(java.lang.String path) throws CreateSharedLinkWithSettingsErrorException, DbxException
RequestedVisibility.PUBLIC
(The
resolved visibility, though, may depend on other aspects such as team and
shared folder settings).path
- The path to be shared by the shared link. Must match pattern
"(/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)
"
and not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.CreateSharedLinkWithSettingsErrorException
DbxException
public SharedLinkMetadata createSharedLinkWithSettings(java.lang.String path, SharedLinkSettings settings) throws CreateSharedLinkWithSettingsErrorException, DbxException
RequestedVisibility.PUBLIC
(The
resolved visibility, though, may depend on other aspects such as team and
shared folder settings).path
- The path to be shared by the shared link. Must match pattern
"(/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)
"
and not be null
.settings
- The requested settings for the newly created shared
link.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.CreateSharedLinkWithSettingsErrorException
DbxException
public SharedFileMetadata getFileMetadata(java.lang.String file) throws GetFileMetadataErrorException, DbxException
file
- The file to query. Must have length of at least 1, match
pattern "((/|id:).*|nspath:[0-9]+:.*)|ns:[0-9]+(/.*)?
", and
not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.GetFileMetadataErrorException
DbxException
public SharedFileMetadata getFileMetadata(java.lang.String file, java.util.List<FileAction> actions) throws GetFileMetadataErrorException, DbxException
file
- The file to query. Must have length of at least 1, match
pattern "((/|id:).*|nspath:[0-9]+:.*)|ns:[0-9]+(/.*)?
", and
not be null
.actions
- A list of `FileAction`s corresponding to
`FilePermission`s that should appear in the response's SharedFileMetadata.getPermissions()
field describing the actions the
authenticated user can perform on the file. Must not contain a null
item.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.GetFileMetadataErrorException
DbxException
public java.util.List<GetFileMetadataBatchResult> getFileMetadataBatch(java.util.List<java.lang.String> files) throws SharingUserErrorException, DbxException
files
- The files to query. Must contain at most 100 items, not
contain a null
item, and not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.SharingUserErrorException
DbxException
public java.util.List<GetFileMetadataBatchResult> getFileMetadataBatch(java.util.List<java.lang.String> files, java.util.List<FileAction> actions) throws SharingUserErrorException, DbxException
files
- The files to query. Must contain at most 100 items, not
contain a null
item, and not be null
.actions
- A list of `FileAction`s corresponding to
`FilePermission`s that should appear in the response's SharedFileMetadata.getPermissions()
field describing the actions the
authenticated user can perform on the file. Must not contain a null
item.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.SharingUserErrorException
DbxException
public SharedFolderMetadata getFolderMetadata(java.lang.String sharedFolderId) throws SharedFolderAccessErrorException, DbxException
sharedFolderId
- The ID for the shared folder. Must match pattern
"[-_0-9a-zA-Z:]+
" and not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.SharedFolderAccessErrorException
DbxException
public SharedFolderMetadata getFolderMetadata(java.lang.String sharedFolderId, java.util.List<FolderAction> actions) throws SharedFolderAccessErrorException, DbxException
sharedFolderId
- The ID for the shared folder. Must match pattern
"[-_0-9a-zA-Z:]+
" and not be null
.actions
- A list of `FolderAction`s corresponding to
`FolderPermission`s that should appear in the response's SharedFolderMetadata.getPermissions()
field describing the actions the
authenticated user can perform on the folder. Must not contain a
null
item.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.SharedFolderAccessErrorException
DbxException
public DbxDownloader<SharedLinkMetadata> getSharedLinkFile(java.lang.String url) throws GetSharedLinkFileErrorException, DbxException
url
- URL of the shared link. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.GetSharedLinkFileErrorException
DbxException
public GetSharedLinkFileBuilder getSharedLinkFileBuilder(java.lang.String url)
url
- URL of the shared link. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public SharedLinkMetadata getSharedLinkMetadata(java.lang.String url) throws SharedLinkErrorException, DbxException
url
- URL of the shared link. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.SharedLinkErrorException
DbxException
public GetSharedLinkMetadataBuilder getSharedLinkMetadataBuilder(java.lang.String url)
url
- URL of the shared link. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.@Deprecated public GetSharedLinksResult getSharedLinks() throws GetSharedLinksErrorException, DbxException
listSharedLinks(com.dropbox.core.v2.sharing.ListSharedLinksArg)
instead.LinkMetadata
objects for this user, including
collection links.
If no path is given, returns a list of all shared links for the current user, including collection links, up to a maximum of 1000 links.
If a non-empty path is given, returns a list of all shared links that allow access to the given path. Collection links are never returned in this case.
Note that the url field in the response is never the shortened URL.
@Deprecated public GetSharedLinksResult getSharedLinks(java.lang.String path) throws GetSharedLinksErrorException, DbxException
listSharedLinks(com.dropbox.core.v2.sharing.ListSharedLinksArg)
instead.LinkMetadata
objects for this user, including
collection links.
If no path is given, returns a list of all shared links for the current user, including collection links, up to a maximum of 1000 links.
If a non-empty path is given, returns a list of all shared links that allow access to the given path. Collection links are never returned in this case.
Note that the url field in the response is never the shortened URL.
path
- See getSharedLinks(String)
description.GetSharedLinksErrorException
DbxException
public SharedFileMembers listFileMembers(java.lang.String file) throws ListFileMembersErrorException, DbxException
The default values for the optional request parameters will be used.
See ListFileMembersBuilder
for more details.
file
- The file for which you want to see members. Must have length
of at least 1, match pattern "((/|id:).*|nspath:[0-9]+:.*)|ns:[0-9]+(/.*)?
", and not be null
.listFileMembers(String)
and
listFileMembersContinue(String)
, and
used as part of the results for listFileMembersBatch(List,long)
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.ListFileMembersErrorException
DbxException
public ListFileMembersBuilder listFileMembersBuilder(java.lang.String file)
file
- The file for which you want to see members. Must have length
of at least 1, match pattern "((/|id:).*|nspath:[0-9]+:.*)|ns:[0-9]+(/.*)?
", and not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public java.util.List<ListFileMembersBatchResult> listFileMembersBatch(java.util.List<java.lang.String> files) throws SharingUserErrorException, DbxException
Inherited users and groups are not included in the result, and permissions are not returned for this endpoint.
The limit
request parameter will default to 10L
(see
listFileMembersBatch(List,long)
).
files
- Files for which to return members. Must contain at most 100
items, not contain a null
item, and not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.SharingUserErrorException
DbxException
public java.util.List<ListFileMembersBatchResult> listFileMembersBatch(java.util.List<java.lang.String> files, long limit) throws SharingUserErrorException, DbxException
Inherited users and groups are not included in the result, and permissions are not returned for this endpoint.
files
- Files for which to return members. Must contain at most 100
items, not contain a null
item, and not be null
.limit
- Number of members to return max per query. Defaults to 10
if no limit is specified. Must be less than or equal to 20.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.SharingUserErrorException
DbxException
public SharedFileMembers listFileMembersContinue(java.lang.String cursor) throws ListFileMembersContinueErrorException, DbxException
listFileMembers(String)
or listFileMembersBatch(List,long)
, use this to
paginate through all shared file members.cursor
- The cursor returned by your last call to listFileMembers(String)
, listFileMembersContinue(String)
, or listFileMembersBatch(List,long)
. Must not be
null
.listFileMembers(String)
and
listFileMembersContinue(String)
, and
used as part of the results for listFileMembersBatch(List,long)
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.ListFileMembersContinueErrorException
DbxException
public SharedFolderMembers listFolderMembers(java.lang.String sharedFolderId) throws SharedFolderAccessErrorException, DbxException
The default values for the optional request parameters will be used.
See ListFolderMembersBuilder
for more details.
sharedFolderId
- The ID for the shared folder. Must match pattern
"[-_0-9a-zA-Z:]+
" and not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.SharedFolderAccessErrorException
DbxException
public ListFolderMembersBuilder listFolderMembersBuilder(java.lang.String sharedFolderId)
sharedFolderId
- The ID for the shared folder. Must match pattern
"[-_0-9a-zA-Z:]+
" and not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public SharedFolderMembers listFolderMembersContinue(java.lang.String cursor) throws ListFolderMembersContinueErrorException, DbxException
listFolderMembers(String)
, use this to paginate
through all shared folder members.cursor
- The cursor returned by your last call to listFolderMembers(String)
or listFolderMembersContinue(String)
. Must not
be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.ListFolderMembersContinueErrorException
DbxException
public ListFoldersResult listFolders() throws DbxApiException, DbxException
The default values for the optional request parameters will be used.
See ListFoldersBuilder
for more details.
listFolders(com.dropbox.core.v2.sharing.ListFoldersArgs)
or listMountableFolders(com.dropbox.core.v2.sharing.ListFoldersArgs)
, depending on which
endpoint was requested. Unmounted shared folders can be identified by
the absence of SharedFolderMetadata.getPathLower()
.DbxApiException
DbxException
public ListFoldersBuilder listFoldersBuilder()
public ListFoldersResult listFoldersContinue(java.lang.String cursor) throws ListFoldersContinueErrorException, DbxException
listFolders(com.dropbox.core.v2.sharing.ListFoldersArgs)
, use this to paginate through all
shared folders. The cursor must come from a previous call to listFolders(com.dropbox.core.v2.sharing.ListFoldersArgs)
or listFoldersContinue(String)
.cursor
- The cursor returned by the previous API call specified in
the endpoint description. Must not be null
.listFolders(com.dropbox.core.v2.sharing.ListFoldersArgs)
or listMountableFolders(com.dropbox.core.v2.sharing.ListFoldersArgs)
, depending on which
endpoint was requested. Unmounted shared folders can be identified by
the absence of SharedFolderMetadata.getPathLower()
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.ListFoldersContinueErrorException
DbxException
public ListFoldersResult listMountableFolders() throws DbxApiException, DbxException
The default values for the optional request parameters will be used.
See ListMountableFoldersBuilder
for more details.
listFolders(com.dropbox.core.v2.sharing.ListFoldersArgs)
or listMountableFolders(com.dropbox.core.v2.sharing.ListFoldersArgs)
, depending on which
endpoint was requested. Unmounted shared folders can be identified by
the absence of SharedFolderMetadata.getPathLower()
.DbxApiException
DbxException
public ListMountableFoldersBuilder listMountableFoldersBuilder()
public ListFoldersResult listMountableFoldersContinue(java.lang.String cursor) throws ListFoldersContinueErrorException, DbxException
listMountableFolders(com.dropbox.core.v2.sharing.ListFoldersArgs)
, use this to paginate
through all mountable shared folders. The cursor must come from a
previous call to listMountableFolders(com.dropbox.core.v2.sharing.ListFoldersArgs)
or
listMountableFoldersContinue(String)
.cursor
- The cursor returned by the previous API call specified in
the endpoint description. Must not be null
.listFolders(com.dropbox.core.v2.sharing.ListFoldersArgs)
or listMountableFolders(com.dropbox.core.v2.sharing.ListFoldersArgs)
, depending on which
endpoint was requested. Unmounted shared folders can be identified by
the absence of SharedFolderMetadata.getPathLower()
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.ListFoldersContinueErrorException
DbxException
public ListFilesResult listReceivedFiles() throws SharingUserErrorException, DbxException
Does not include files the user has received via shared folders, and does not include unclaimed invitations.
The default values for the optional request parameters will be used.
See ListReceivedFilesBuilder
for more details.
listReceivedFiles(com.dropbox.core.v2.sharing.ListFilesArg)
.SharingUserErrorException
DbxException
public ListReceivedFilesBuilder listReceivedFilesBuilder()
public ListFilesResult listReceivedFilesContinue(java.lang.String cursor) throws ListFilesContinueErrorException, DbxException
listReceivedFiles(com.dropbox.core.v2.sharing.ListFilesArg)
.cursor
- Cursor in ListFilesResult.getCursor()
. Must not be
null
.listReceivedFiles(com.dropbox.core.v2.sharing.ListFilesArg)
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.ListFilesContinueErrorException
DbxException
public ListSharedLinksResult listSharedLinks() throws ListSharedLinksErrorException, DbxException
If no path is given, returns a list of all shared links for the current user.
If a non-empty path is given, returns a list of all shared links that allow access to the given path - direct links to the given path and links to parent folders of the given path. Links to parent folders can be suppressed by setting direct_only to true.
public ListSharedLinksBuilder listSharedLinksBuilder()
public SharedLinkMetadata modifySharedLinkSettings(java.lang.String url, SharedLinkSettings settings) throws ModifySharedLinkSettingsErrorException, DbxException
If the requested visibility conflict with the shared links policy of
the team or the shared folder (in case the linked file is part of a
shared folder) then the LinkPermissions.getResolvedVisibility()
of
the returned SharedLinkMetadata
will reflect the actual
visibility of the shared link and the LinkPermissions.getRequestedVisibility()
will reflect the requested
visibility.
The removeExpiration
request parameter will default to false
(see modifySharedLinkSettings(String,SharedLinkSettings,boolean)
).
url
- URL of the shared link to change its settings. Must not be
null
.settings
- Set of settings for the shared link. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.ModifySharedLinkSettingsErrorException
DbxException
public SharedLinkMetadata modifySharedLinkSettings(java.lang.String url, SharedLinkSettings settings, boolean removeExpiration) throws ModifySharedLinkSettingsErrorException, DbxException
If the requested visibility conflict with the shared links policy of
the team or the shared folder (in case the linked file is part of a
shared folder) then the LinkPermissions.getResolvedVisibility()
of
the returned SharedLinkMetadata
will reflect the actual
visibility of the shared link and the LinkPermissions.getRequestedVisibility()
will reflect the requested
visibility.
url
- URL of the shared link to change its settings. Must not be
null
.settings
- Set of settings for the shared link. Must not be null
.removeExpiration
- If set to true, removes the expiration of the
shared link.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.ModifySharedLinkSettingsErrorException
DbxException
public SharedFolderMetadata mountFolder(java.lang.String sharedFolderId) throws MountFolderErrorException, DbxException
Mount a shared folder for a user after they have been added as a member. Once mounted, the shared folder will appear in their Dropbox.
sharedFolderId
- The ID of the shared folder to mount. Must match
pattern "[-_0-9a-zA-Z:]+
" and not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.MountFolderErrorException
DbxException
public void relinquishFileMembership(java.lang.String file) throws RelinquishFileMembershipErrorException, DbxException
file
- The path or id for the file. Must have length of at least 1,
match pattern "((/|id:).*|nspath:[0-9]+:.*)|ns:[0-9]+(/.*)?
",
and not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.RelinquishFileMembershipErrorException
DbxException
public LaunchEmptyResult relinquishFolderMembership(java.lang.String sharedFolderId) throws RelinquishFolderMembershipErrorException, DbxException
This will run synchronously if leave_a_copy is false, and asynchronously if leave_a_copy is true.
The leaveACopy
request parameter will default to false
(see relinquishFolderMembership(String,boolean)
).
sharedFolderId
- The ID for the shared folder. Must match pattern
"[-_0-9a-zA-Z:]+
" and not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.RelinquishFolderMembershipErrorException
DbxException
public LaunchEmptyResult relinquishFolderMembership(java.lang.String sharedFolderId, boolean leaveACopy) throws RelinquishFolderMembershipErrorException, DbxException
This will run synchronously if leave_a_copy is false, and asynchronously if leave_a_copy is true.
sharedFolderId
- The ID for the shared folder. Must match pattern
"[-_0-9a-zA-Z:]+
" and not be null
.leaveACopy
- Keep a copy of the folder's contents upon
relinquishing membership.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.RelinquishFolderMembershipErrorException
DbxException
@Deprecated public FileMemberActionIndividualResult removeFileMember(java.lang.String file, MemberSelector member) throws RemoveFileMemberErrorException, DbxException
removeFileMember2(String,MemberSelector)
instead.file
- File from which to remove members. Must have length of at
least 1, match pattern "((/|id:).*|nspath:[0-9]+:.*)|ns:[0-9]+(/.*)?
", and not be null
.member
- Member to remove from this file. Note that even if an
email is specified, it may result in the removal of a user (not an
invitee) if the user's main account corresponds to that email
address. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.RemoveFileMemberErrorException
DbxException
public FileMemberRemoveActionResult removeFileMember2(java.lang.String file, MemberSelector member) throws RemoveFileMemberErrorException, DbxException
file
- File from which to remove members. Must have length of at
least 1, match pattern "((/|id:).*|nspath:[0-9]+:.*)|ns:[0-9]+(/.*)?
", and not be null
.member
- Member to remove from this file. Note that even if an
email is specified, it may result in the removal of a user (not an
invitee) if the user's main account corresponds to that email
address. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.RemoveFileMemberErrorException
DbxException
public LaunchResultBase removeFolderMember(java.lang.String sharedFolderId, MemberSelector member, boolean leaveACopy) throws RemoveFolderMemberErrorException, DbxException
sharedFolderId
- The ID for the shared folder. Must match pattern
"[-_0-9a-zA-Z:]+
" and not be null
.member
- The member to remove from the folder. Must not be null
.leaveACopy
- If true, the removed user will keep their copy of the
folder after it's unshared, assuming it was mounted. Otherwise, it
will be removed from their Dropbox. Also, this must be set to false
when kicking a group.LaunchEmptyResult
for an example.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.RemoveFolderMemberErrorException
DbxException
public void revokeSharedLink(java.lang.String url) throws RevokeSharedLinkErrorException, DbxException
Note that even after revoking a shared link to a file, the file may
be accessible if there are shared links leading to any of the file parent
folders. To list all shared links that enable access to a specific file,
you can use the listSharedLinks(com.dropbox.core.v2.sharing.ListSharedLinksArg)
with the
file as the ListSharedLinksArg.getPath()
argument.
url
- URL of the shared link. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.RevokeSharedLinkErrorException
DbxException
public ShareFolderLaunch setAccessInheritance(java.lang.String sharedFolderId) throws SetAccessInheritanceErrorException, DbxException
If a ShareFolderLaunch.getAsyncJobIdValue()
is returned, you'll
need to call checkShareJobStatus(String)
until the action completes to get the metadata for the folder.
The accessInheritance
request parameter will default to
AccessInheritance.INHERIT
(see setAccessInheritance(String,AccessInheritance)
).
sharedFolderId
- The ID for the shared folder. Must match pattern
"[-_0-9a-zA-Z:]+
" and not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.SetAccessInheritanceErrorException
DbxException
public ShareFolderLaunch setAccessInheritance(java.lang.String sharedFolderId, AccessInheritance accessInheritance) throws SetAccessInheritanceErrorException, DbxException
If a ShareFolderLaunch.getAsyncJobIdValue()
is returned, you'll
need to call checkShareJobStatus(String)
until the action completes to get the metadata for the folder.
sharedFolderId
- The ID for the shared folder. Must match pattern
"[-_0-9a-zA-Z:]+
" and not be null
.accessInheritance
- The access inheritance settings for the folder.
Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.SetAccessInheritanceErrorException
DbxException
public ShareFolderLaunch shareFolder(java.lang.String path) throws ShareFolderErrorException, DbxException
Most sharing will be completed synchronously. Large folders will be completed asynchronously. To make testing the async case repeatable, set `ShareFolderArg.force_async`.
If a ShareFolderLaunch.getAsyncJobIdValue()
is returned, you'll
need to call checkShareJobStatus(String)
until the action completes to get the metadata for the folder.
The default values for the optional request parameters will be used.
See ShareFolderBuilder
for more details.
path
- The path to the folder to share. If it does not exist, then
a new one is created. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)
" and not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.ShareFolderErrorException
DbxException
public ShareFolderBuilder shareFolderBuilder(java.lang.String path)
ShareFolderLaunch.getAsyncJobIdValue()
is returned, you'll need to
call checkShareJobStatus(String)
until the
action completes to get the metadata for the folder.path
- The path to the folder to share. If it does not exist, then
a new one is created. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)
" and not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public void transferFolder(java.lang.String sharedFolderId, java.lang.String toDropboxId) throws TransferFolderErrorException, DbxException
User must have AccessLevel.OWNER
access to the shared folder
to perform a transfer.
sharedFolderId
- The ID for the shared folder. Must match pattern
"[-_0-9a-zA-Z:]+
" and not be null
.toDropboxId
- A account or team member ID to transfer ownership to.
Must have length of at least 1 and not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.TransferFolderErrorException
DbxException
public void unmountFolder(java.lang.String sharedFolderId) throws UnmountFolderErrorException, DbxException
mountFolder(String)
.sharedFolderId
- The ID for the shared folder. Must match pattern
"[-_0-9a-zA-Z:]+
" and not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.UnmountFolderErrorException
DbxException
public void unshareFile(java.lang.String file) throws UnshareFileErrorException, DbxException
file
- The file to unshare. Must have length of at least 1, match
pattern "((/|id:).*|nspath:[0-9]+:.*)|ns:[0-9]+(/.*)?
", and
not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.UnshareFileErrorException
DbxException
public LaunchEmptyResult unshareFolder(java.lang.String sharedFolderId) throws UnshareFolderErrorException, DbxException
You'll need to call checkJobStatus(String)
to determine if the action
has completed successfully.
The leaveACopy
request parameter will default to false
(see unshareFolder(String,boolean)
).
sharedFolderId
- The ID for the shared folder. Must match pattern
"[-_0-9a-zA-Z:]+
" and not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.UnshareFolderErrorException
DbxException
public LaunchEmptyResult unshareFolder(java.lang.String sharedFolderId, boolean leaveACopy) throws UnshareFolderErrorException, DbxException
You'll need to call checkJobStatus(String)
to determine if the action
has completed successfully.
sharedFolderId
- The ID for the shared folder. Must match pattern
"[-_0-9a-zA-Z:]+
" and not be null
.leaveACopy
- If true, members of this shared folder will get a copy
of this folder after it's unshared. Otherwise, it will be removed
from their Dropbox. The current user, who is an owner, will always
retain their copy.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.UnshareFolderErrorException
DbxException
public MemberAccessLevelResult updateFileMember(java.lang.String file, MemberSelector member, AccessLevel accessLevel) throws FileMemberActionErrorException, DbxException
file
- File for which we are changing a member's access. Must have
length of at least 1, match pattern "((/|id:).*|nspath:[0-9]+:.*)|ns:[0-9]+(/.*)?
", and not be null
.member
- The member whose access we are changing. Must not be
null
.accessLevel
- The new access level for the member. Must not be
null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.FileMemberActionErrorException
DbxException
public MemberAccessLevelResult updateFolderMember(java.lang.String sharedFolderId, MemberSelector member, AccessLevel accessLevel) throws UpdateFolderMemberErrorException, DbxException
sharedFolderId
- The ID for the shared folder. Must match pattern
"[-_0-9a-zA-Z:]+
" and not be null
.member
- The member of the shared folder to update. Only the
MemberSelector.getDropboxIdValue()
may be set at this time.
Must not be null
.accessLevel
- The new access level for UpdateFolderMemberArg.getMember()
. AccessLevel.OWNER
is
disallowed. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.UpdateFolderMemberErrorException
DbxException
public SharedFolderMetadata updateFolderPolicy(java.lang.String sharedFolderId) throws UpdateFolderPolicyErrorException, DbxException
User must have AccessLevel.OWNER
access to the shared folder
to update its policies.
sharedFolderId
- The ID for the shared folder. Must match pattern
"[-_0-9a-zA-Z:]+
" and not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.UpdateFolderPolicyErrorException
DbxException
public UpdateFolderPolicyBuilder updateFolderPolicyBuilder(java.lang.String sharedFolderId)
AccessLevel.OWNER
access to the shared folder to update its policies.sharedFolderId
- The ID for the shared folder. Must match pattern
"[-_0-9a-zA-Z:]+
" and not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.