Package com.dropbox.core.v2.filerequests
Class DbxUserFileRequestsRequests
- java.lang.Object
-
- com.dropbox.core.v2.filerequests.DbxUserFileRequestsRequests
-
public class DbxUserFileRequestsRequests extends java.lang.Object
Routes in namespace "file_requests".
-
-
Constructor Summary
Constructors Constructor Description DbxUserFileRequestsRequests(DbxRawClientV2 client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CountFileRequestsResult
count()
Returns the total number of file requests owned by this user.FileRequest
create(java.lang.String title, java.lang.String destination)
Creates a file request for this user.CreateBuilder
createBuilder(java.lang.String title, java.lang.String destination)
Creates a file request for this user.DeleteFileRequestsResult
delete(java.util.List<java.lang.String> ids)
Delete a batch of closed file requests.DeleteAllClosedFileRequestsResult
deleteAllClosed()
Delete all closed file requests owned by this user.FileRequest
get(java.lang.String id)
Returns the specified file request.ListFileRequestsResult
list()
Returns a list of file requests owned by this user.ListFileRequestsV2Result
listContinue(java.lang.String cursor)
Once a cursor has been retrieved fromlistV2(long)
, use this to paginate through all file requests.ListFileRequestsV2Result
listV2()
Returns a list of file requests owned by this user.ListFileRequestsV2Result
listV2(long limit)
Returns a list of file requests owned by this user.FileRequest
update(java.lang.String id)
Update a file request.UpdateBuilder
updateBuilder(java.lang.String id)
Update a file request.
-
-
-
Constructor Detail
-
DbxUserFileRequestsRequests
public DbxUserFileRequestsRequests(DbxRawClientV2 client)
-
-
Method Detail
-
count
public CountFileRequestsResult count() throws CountFileRequestsErrorException, DbxException
Returns the total number of file requests owned by this user. Includes both open and closed file requests.- Returns:
- Result for
count()
. - Throws:
CountFileRequestsErrorException
DbxException
-
create
public FileRequest create(java.lang.String title, java.lang.String destination) throws CreateFileRequestErrorException, DbxException
Creates a file request for this user.The default values for the optional request parameters will be used. See
CreateBuilder
for more details.- Parameters:
title
- The title of the file request. Must not be empty. Must have length of at least 1 and not benull
.destination
- The path of the folder in the Dropbox where uploaded files will be sent. For apps with the app folder permission, this will be relative to the app folder. Must match pattern "/(.|[\\r\\n])*
" and not benull
.- Returns:
- A file request for receiving files into the user's Dropbox account.
- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.CreateFileRequestErrorException
DbxException
-
createBuilder
public CreateBuilder createBuilder(java.lang.String title, java.lang.String destination)
Creates a file request for this user.- Parameters:
title
- The title of the file request. Must not be empty. Must have length of at least 1 and not benull
.destination
- The path of the folder in the Dropbox where uploaded files will be sent. For apps with the app folder permission, this will be relative to the app folder. Must match pattern "/(.|[\\r\\n])*
" and not benull
.- Returns:
- Request builder for configuring request parameters and completing the request.
- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
delete
public DeleteFileRequestsResult delete(java.util.List<java.lang.String> ids) throws DeleteFileRequestErrorException, DbxException
Delete a batch of closed file requests.- Parameters:
ids
- List IDs of the file requests to delete. Must not contain anull
item and not benull
.- Returns:
- Result for
delete(List)
. - Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.DeleteFileRequestErrorException
DbxException
-
deleteAllClosed
public DeleteAllClosedFileRequestsResult deleteAllClosed() throws DeleteAllClosedFileRequestsErrorException, DbxException
Delete all closed file requests owned by this user.- Returns:
- Result for
deleteAllClosed()
. - Throws:
DeleteAllClosedFileRequestsErrorException
DbxException
-
get
public FileRequest get(java.lang.String id) throws GetFileRequestErrorException, DbxException
Returns the specified file request.- Parameters:
id
- The ID of the file request to retrieve. Must have length of at least 1, match pattern "[-_0-9a-zA-Z]+
", and not benull
.- Returns:
- A file request for receiving files into the user's Dropbox account.
- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.GetFileRequestErrorException
DbxException
-
listV2
public ListFileRequestsV2Result listV2() throws ListFileRequestsErrorException, DbxException
Returns a list of file requests owned by this user. For apps with the app folder permission, this will only return file requests with destinations in the app folder.The
limit
request parameter will default to1000L
(seelistV2(long)
).- Returns:
- Result for
listV2(long)
andlistContinue(String)
. - Throws:
ListFileRequestsErrorException
DbxException
-
listV2
public ListFileRequestsV2Result listV2(long limit) throws ListFileRequestsErrorException, DbxException
Returns a list of file requests owned by this user. For apps with the app folder permission, this will only return file requests with destinations in the app folder.- Parameters:
limit
- The maximum number of file requests that should be returned per request.- Returns:
- Result for
listV2(long)
andlistContinue(String)
. - Throws:
ListFileRequestsErrorException
DbxException
-
list
public ListFileRequestsResult list() throws ListFileRequestsErrorException, DbxException
Returns a list of file requests owned by this user. For apps with the app folder permission, this will only return file requests with destinations in the app folder.- Returns:
- Result for
list()
. - Throws:
ListFileRequestsErrorException
DbxException
-
listContinue
public ListFileRequestsV2Result listContinue(java.lang.String cursor) throws ListFileRequestsContinueErrorException, DbxException
Once a cursor has been retrieved fromlistV2(long)
, use this to paginate through all file requests. The cursor must come from a previous call tolistV2(long)
orlistContinue(String)
.- Parameters:
cursor
- The cursor returned by the previous API call specified in the endpoint description. Must not benull
.- Returns:
- Result for
listV2(long)
andlistContinue(String)
. - Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.ListFileRequestsContinueErrorException
DbxException
-
update
public FileRequest update(java.lang.String id) throws UpdateFileRequestErrorException, DbxException
Update a file request.The default values for the optional request parameters will be used. See
UpdateBuilder
for more details.- Parameters:
id
- The ID of the file request to update. Must have length of at least 1, match pattern "[-_0-9a-zA-Z]+
", and not benull
.- Returns:
- A file request for receiving files into the user's Dropbox account.
- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.UpdateFileRequestErrorException
DbxException
-
updateBuilder
public UpdateBuilder updateBuilder(java.lang.String id)
Update a file request.- Parameters:
id
- The ID of the file request to update. Must have length of at least 1, match pattern "[-_0-9a-zA-Z]+
", and not benull
.- Returns:
- Request builder for configuring request parameters and completing the request.
- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
-