public class BoxFoldersManager extends BoxItemsManager
| Constructor and Description |
|---|
BoxFoldersManager(IBoxConfig config,
IBoxResourceHub resourceHub,
IBoxJSONParser parser,
IBoxRequestAuth auth,
IBoxRESTClient restClient)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
BoxFolder |
copyFolder(String folderId,
BoxFolderRequestObject requestObject)
Copy a folder.
|
BoxFolder |
createFolder(BoxFolderRequestObject requestObject)
Create a folder.
|
BoxFolder |
createSharedLink(String folderId,
BoxFolderRequestObject requestObject)
Create a shared link for a folder, given the id of the file/folder.
|
void |
deleteFolder(String folderId,
BoxFolderRequestObject requestObject)
Delete a folder.
|
void |
deleteTrashFolder(String id,
BoxFileRequestObject requestObject)
Permanently delete a trashed folder.
|
BoxFolder |
getFolder(String folderId,
BoxDefaultRequestObject requestObject)
Get folder given a folder id.
|
List<BoxCollaboration> |
getFolderCollaborations(String folderId,
BoxDefaultRequestObject requestObject)
Get collaborations of a folder.
|
BoxCollection |
getFolderItems(String folderId,
BoxFolderRequestObject requestObject)
Get the items(subfolders, files, weblinks...) under a folder.
|
static List<BoxFolder> |
getFolders(BoxCollection collection)
Get folders in a collection.
|
BoxCollection |
getFolderTrashItems(String folderId,
BoxFolderRequestObject requestObject)
Get the trashed items(subfolders, files, weblinks...) under a folder.
|
BoxFolder |
getTrashFolder(String folderId,
BoxDefaultRequestObject requestObject)
Get trash folder given a folder id.
|
BoxFolder |
restoreTrashFolder(String id,
BoxItemRestoreRequestObject requestObject)
Restore a trashed folder.
|
BoxFolder |
updateFolderInfo(String folderId,
BoxFolderRequestObject requestObject)
Update info for a folder.
|
copyItem, createSharedLink, deleteTrashItem, getItem, getTrashItem, restoreTrashItem, updateItemInfoexecuteRequestWithNoResponseBody, getAuth, getClassFromType, getConfig, getJSONParser, getResourceHub, getResponseAndParse, getResponseAndParseAndTryCast, getRestClient, tryCastBoxItem, tryCastObjectpublic BoxFoldersManager(IBoxConfig config, IBoxResourceHub resourceHub, IBoxJSONParser parser, IBoxRequestAuth auth, IBoxRESTClient restClient)
config - ConfigresourceHub - IResourceHubparser - json parserauth - auth for api callsrestClient - REST client to make api calls.public BoxFolder getFolder(String folderId, BoxDefaultRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
folderId - id of the folderrequestObject - object that goes into request.BoxRestException - exceptionBoxServerException - exceptionAuthFatalFailureException - exception indicating authentication totally failedpublic BoxFolder getTrashFolder(String folderId, BoxDefaultRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
folderId - id of the folderrequestObject - object that goes into request.BoxRestException - exceptionBoxServerException - exceptionAuthFatalFailureException - exception indicating authentication totally failedpublic BoxFolder createFolder(BoxFolderRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
requestObject - request objectBoxRestException - exceptionBoxServerException - exceptionAuthFatalFailureException - exception indicating authentication totally failedpublic void deleteFolder(String folderId, BoxFolderRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
folderId - id of the folderrequestObject - request objectBoxRestException - exceptionBoxServerException - exceptionAuthFatalFailureException - exception indicating authenticating totally failedpublic void deleteTrashFolder(String id, BoxFileRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
id - id of the folderrequestObject - request objectBoxRestExceptionAuthFatalFailureExceptionBoxServerExceptionpublic BoxFolder restoreTrashFolder(String id, BoxItemRestoreRequestObject requestObject) throws BoxRestException, AuthFatalFailureException, BoxServerException
id - id of the trashed folder.requestObject - BoxRestExceptionAuthFatalFailureExceptionBoxServerExceptionpublic BoxFolder copyFolder(String folderId, BoxFolderRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
folderId - id of the folderrequestObject - request objectBoxRestException - exceptionBoxServerException - exceptionAuthFatalFailureException - exceptionpublic BoxCollection getFolderItems(String folderId, BoxFolderRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
GetFolderItemsRequest#DEFAULT_FOLDER_ITEMS_LIMIT
items, at an offset of GetFolderItemsRequest#DEFAULT_FOLDER_ITEMS_OFFSETfolderId - id of the folder.requestObject - request objectBoxRestException - exceptionBoxServerException - exceptionAuthFatalFailureException - exception indicating authentication totally failedpublic BoxCollection getFolderTrashItems(String folderId, BoxFolderRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
GetFolderItemsRequest#DEFAULT_FOLDER_ITEMS_LIMIT items, at an offset of GetFolderItemsRequest#DEFAULT_FOLDER_ITEMS_OFFSETfolderId - id of the folder.requestObject - request objectBoxRestException - exceptionBoxServerException - exceptionAuthFatalFailureException - exception indicating authentication totally failedpublic BoxFolder updateFolderInfo(String folderId, BoxFolderRequestObject requestObject) throws UnsupportedEncodingException, BoxRestException, BoxServerException, AuthFatalFailureException
fileFolderId - id of the folderrequestObject - request objectUnsupportedEncodingException - exceptionBoxRestException - exceptionBoxServerException - exceptionAuthFatalFailureException - exception indicating authentication totally failedpublic BoxFolder createSharedLink(String folderId, BoxFolderRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
fileFolderId - id of the folderisFolder - whether this is a folder.perm - SharedLinkPermissionsaccess - SharedLinkAccess, String can be the strings defined in BoxSharedLinkAccess.unsharedAt - the time the created shared link expires.BoxRestException - exceptionBoxServerException - exceptionAuthFatalFailureException - exception indicating authentication totally failedpublic List<BoxCollaboration> getFolderCollaborations(String folderId, BoxDefaultRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
folderId - id of the folderBoxRestException - exceptionBoxServerException - exceptionAuthFatalFailureException - exception indicating authentication totally failedpublic static List<BoxFolder> getFolders(BoxCollection collection)
collection - collectionCopyright © 2014. All Rights Reserved.