public class BoxFoldersManageImpl extends BoxItemsManagerImpl implements IBoxFoldersManager
Constructor and Description |
---|
BoxFoldersManageImpl(IBoxConfig config,
IBoxResourceHub resourceHub,
IBoxJSONParser parser,
IBoxRequestAuth auth,
IBoxRESTClient restClient)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
BoxFolder |
copyFolder(java.lang.String folderId,
BoxItemCopyRequestObject requestObject)
Copy a folder.
|
BoxFolder |
createFolder(BoxFolderRequestObject requestObject)
Create a folder.
|
BoxFolder |
createSharedLink(java.lang.String folderId,
BoxSharedLinkRequestObject requestObject)
Create a shared link for a folder, given the id of the file/folder.
|
void |
deleteFolder(java.lang.String folderId,
BoxFolderDeleteRequestObject requestObject)
Delete a folder.
|
BoxFolder |
getFolder(java.lang.String folderId,
BoxDefaultRequestObject requestObject)
Get folder given a folder id.
|
java.util.List<BoxCollaboration> |
getFolderCollaborations(java.lang.String folderId,
BoxDefaultRequestObject requestObject)
Get collaborations of a folder.
|
BoxCollection |
getFolderItems(java.lang.String folderId,
BoxPagingRequestObject requestObject)
Get the items(subfolders, files, weblinks...) under a folder.
|
static java.util.List<BoxFolder> |
getFolders(BoxCollection collection)
Deprecated.
|
BoxFolder |
updateFolderInfo(java.lang.String folderId,
BoxFolderRequestObject requestObject)
Update info for a folder.
|
copyItem, createSharedLink, getItem, updateItemInfo
executeRequestWithNoResponseBody, getAuth, getClassFromType, getConfig, getJSONParser, getResourceHub, getResponseAndParse, getResponseAndParseAndTryCast, getRestClient, tryCastBoxItem, tryCastObject
public BoxFoldersManageImpl(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(java.lang.String folderId, BoxDefaultRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
IBoxFoldersManager
getFolder
in interface IBoxFoldersManager
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 BoxFolder createFolder(BoxFolderRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
IBoxFoldersManager
createFolder
in interface IBoxFoldersManager
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 deleteFolder(java.lang.String folderId, BoxFolderDeleteRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
IBoxFoldersManager
deleteFolder
in interface IBoxFoldersManager
folderId
- 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 copyFolder(java.lang.String folderId, BoxItemCopyRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
IBoxFoldersManager
copyFolder
in interface IBoxFoldersManager
folderId
- 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 BoxCollection getFolderItems(java.lang.String folderId, BoxPagingRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
IBoxFoldersManager
GetFolderItemsRequest#DEFAULT_FOLDER_ITEMS_LIMIT
items, at an offset of GetFolderItemsRequest#DEFAULT_FOLDER_ITEMS_OFFSET
getFolderItems
in interface IBoxFoldersManager
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 BoxFolder updateFolderInfo(java.lang.String folderId, BoxFolderRequestObject requestObject) throws java.io.UnsupportedEncodingException, BoxRestException, BoxServerException, AuthFatalFailureException
IBoxFoldersManager
updateFolderInfo
in interface IBoxFoldersManager
folderId
- id of the folderrequestObject
- request objectjava.io.UnsupportedEncodingException
- exceptionBoxRestException
- 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 createSharedLink(java.lang.String folderId, BoxSharedLinkRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
IBoxFoldersManager
createSharedLink
in interface IBoxFoldersManager
folderId
- 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 java.util.List<BoxCollaboration> getFolderCollaborations(java.lang.String folderId, BoxDefaultRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
IBoxFoldersManager
getFolderCollaborations
in interface IBoxFoldersManager
folderId
- id of the folderBoxRestException
- 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.@Deprecated public static java.util.List<BoxFolder> getFolders(BoxCollection collection)
collection
- collection