public class BoxTrashManagerImpl extends AbstractBoxResourceManager implements IBoxTrashManager
Constructor and Description |
---|
BoxTrashManagerImpl(IBoxConfig config,
IBoxResourceHub resourceHub,
IBoxJSONParser parser,
IBoxRequestAuth auth,
IBoxRESTClient restClient) |
Modifier and Type | Method and Description |
---|---|
void |
deleteTrashFile(java.lang.String id,
BoxDefaultRequestObject requestObject)
Permanently delete a trashed file.
|
void |
deleteTrashFolder(java.lang.String id,
BoxDefaultRequestObject requestObject)
Permanently delete a trashed folder.
|
BoxCollection |
getFolderTrashItems(java.lang.String folderId,
BoxPagingRequestObject requestObject)
Get the trashed items(subfolders, files, weblinks...) under a folder.
|
BoxFile |
getTrashFile(java.lang.String fileId,
BoxDefaultRequestObject requestObject)
Get trashed file given a file id.
|
BoxFolder |
getTrashFolder(java.lang.String folderId,
BoxDefaultRequestObject requestObject)
Get trash folder given a folder id.
|
BoxFile |
restoreTrashFile(java.lang.String id,
BoxItemRestoreRequestObject requestObject)
Restore a trashed file.
|
BoxFolder |
restoreTrashFolder(java.lang.String id,
BoxItemRestoreRequestObject requestObject)
Restore a trashed folder.
|
executeRequestWithNoResponseBody, getAuth, getClassFromType, getConfig, getJSONParser, getResourceHub, getResponseAndParse, getResponseAndParseAndTryCast, getRestClient, tryCastBoxItem, tryCastObject
public BoxTrashManagerImpl(IBoxConfig config, IBoxResourceHub resourceHub, IBoxJSONParser parser, IBoxRequestAuth auth, IBoxRESTClient restClient)
public void deleteTrashFile(java.lang.String id, BoxDefaultRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
IBoxTrashManager
deleteTrashFile
in interface IBoxTrashManager
id
- id of the filerequestObject
- request objectBoxRestException
- See BoxRestException
for more info.BoxServerException
- See com.box.restclientv2.exceptions.BoxServerException
for more info.AuthFatalFailureException
- See com.box.restclientv2.exceptions.AuthFatalFailureException
for more info.public BoxFile restoreTrashFile(java.lang.String id, BoxItemRestoreRequestObject requestObject) throws BoxRestException, AuthFatalFailureException, BoxServerException
IBoxTrashManager
restoreTrashFile
in interface IBoxTrashManager
id
- id of the trashed file.BoxRestException
- See BoxRestException
for more info.AuthFatalFailureException
- See com.box.restclientv2.exceptions.AuthFatalFailureException
for more info.BoxServerException
- See com.box.restclientv2.exceptions.BoxServerException
for more info.public BoxFile getTrashFile(java.lang.String fileId, BoxDefaultRequestObject requestObject) throws BoxRestException, AuthFatalFailureException, BoxServerException
IBoxTrashManager
getTrashFile
in interface IBoxTrashManager
fileId
- id of the filerequestObject
- object that goes into request.BoxRestException
- See BoxRestException
for more info.AuthFatalFailureException
- See com.box.restclientv2.exceptions.AuthFatalFailureException
for more info.BoxServerException
- See com.box.restclientv2.exceptions.BoxServerException
for more info.public BoxFolder getTrashFolder(java.lang.String folderId, BoxDefaultRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
IBoxTrashManager
getTrashFolder
in interface IBoxTrashManager
folderId
- id of the folderrequestObject
- object that goes into request.BoxRestException
- See BoxRestException
for more info.BoxServerException
- See com.box.restclientv2.exceptions.BoxServerException
for more info.AuthFatalFailureException
- See com.box.restclientv2.exceptions.AuthFatalFailureException
for more info.public BoxCollection getFolderTrashItems(java.lang.String folderId, BoxPagingRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
IBoxTrashManager
GetFolderItemsRequest#DEFAULT_FOLDER_ITEMS_LIMIT
items, at an offset of GetFolderItemsRequest#DEFAULT_FOLDER_ITEMS_OFFSET
getFolderTrashItems
in interface IBoxTrashManager
folderId
- id of the folder.requestObject
- request objectBoxRestException
- See BoxRestException
for more info.BoxServerException
- See com.box.restclientv2.exceptions.BoxServerException
for more info.AuthFatalFailureException
- See com.box.restclientv2.exceptions.AuthFatalFailureException
for more info.public void deleteTrashFolder(java.lang.String id, BoxDefaultRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
IBoxTrashManager
deleteTrashFolder
in interface IBoxTrashManager
id
- id of the folderrequestObject
- request objectBoxRestException
- See BoxRestException
for more info.BoxServerException
- See com.box.restclientv2.exceptions.BoxServerException
for more info.AuthFatalFailureException
- See com.box.restclientv2.exceptions.AuthFatalFailureException
for more info.public BoxFolder restoreTrashFolder(java.lang.String id, BoxItemRestoreRequestObject requestObject) throws BoxRestException, AuthFatalFailureException, BoxServerException
IBoxTrashManager
restoreTrashFolder
in interface IBoxTrashManager
id
- id of the trashed folder.BoxRestException
- See BoxRestException
for more info.AuthFatalFailureException
- See com.box.restclientv2.exceptions.AuthFatalFailureException
for more info.BoxServerException
- See com.box.restclientv2.exceptions.BoxServerException
for more info.