public class BoxItemsManager extends BoxResourceManager
| Constructor and Description |
|---|
BoxItemsManager(IBoxConfig config,
IBoxResourceHub resourceHub,
IBoxJSONParser parser,
IBoxRequestAuth auth,
IBoxRESTClient restClient)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
BoxItem |
copyItem(String id,
BoxItemRequestObject requestObject,
BoxResourceType type)
Copy an item.
|
BoxItem |
createSharedLink(String id,
BoxItemRequestObject requestObject,
BoxResourceType type)
Create a shared link for an item, given the id .
|
void |
deleteTrashItem(String id,
BoxResourceType type,
BoxFileRequestObject requestObject)
Permanently delete a trashed item.
|
BoxItem |
getItem(String id,
BoxDefaultRequestObject requestObject,
BoxResourceType type)
Get item given an item id.
|
BoxItem |
getTrashItem(String itemId,
BoxResourceType type,
BoxDefaultRequestObject requestObject)
Get a trashed item.
|
BoxItem |
restoreTrashItem(String id,
BoxResourceType type,
BoxItemRestoreRequestObject requestObject)
Restore a trashed item.
|
BoxItem |
updateItemInfo(String id,
BoxItemRequestObject requestObject,
BoxResourceType type)
Update info for an item
|
executeRequestWithNoResponseBody, getAuth, getClassFromType, getConfig, getJSONParser, getResourceHub, getResponseAndParse, getResponseAndParseAndTryCast, getRestClient, tryCastBoxItem, tryCastObjectpublic BoxItemsManager(IBoxConfig config, IBoxResourceHub resourceHub, IBoxJSONParser parser, IBoxRequestAuth auth, IBoxRESTClient restClient)
config - BoxConfigresourceHub - IResourceHubparser - json parserauth - auth for api callsrestClient - REST client to make api calls.public BoxItem getItem(String id, BoxDefaultRequestObject requestObject, BoxResourceType type) throws BoxRestException, BoxServerException, AuthFatalFailureException
id - id of the itemBoxBasicRequestObject - requestObjecttype - resource typeBoxRestException - exceptionBoxServerException - exceptionAuthFatalFailureException - exception indicating authentication totally failedpublic BoxItem getTrashItem(String itemId, BoxResourceType type, BoxDefaultRequestObject requestObject) throws BoxRestException, AuthFatalFailureException, BoxServerException
itemId - item idtype - typerequestObject - request objectBoxRestException - exceptionAuthFatalFailureException - exceptionBoxServerException - exceptionpublic BoxItem copyItem(String id, BoxItemRequestObject requestObject, BoxResourceType type) throws BoxRestException, BoxServerException, AuthFatalFailureException
id - id of the itemrequestObject - request objecttype - resource type of the itemBoxRestException - exceptionBoxServerException - exceptionAuthFatalFailureException - exceptionpublic BoxItem updateItemInfo(String id, BoxItemRequestObject requestObject, BoxResourceType type) throws UnsupportedEncodingException, BoxRestException, BoxServerException, AuthFatalFailureException
id - id of the itemrequestObject - request objecttype - resource type of the itemUnsupportedEncodingException - exceptionBoxRestException - exceptionBoxServerException - exceptionAuthFatalFailureException - exception indicating authentication totally failedpublic BoxItem createSharedLink(String id, BoxItemRequestObject requestObject, BoxResourceType type) throws BoxRestException, BoxServerException, AuthFatalFailureException
auth - authorizationid - id of the itemrequestObject - request objecttype - resource type of this itemBoxRestException - exceptionBoxServerException - exceptionAuthFatalFailureException - exception indicating authentication totally failedpublic void deleteTrashItem(String id, BoxResourceType type, BoxFileRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
id - id of the itemtype - resource type of the item.requestObject - request objectBoxRestExceptionAuthFatalFailureExceptionBoxServerExceptionpublic BoxItem restoreTrashItem(String id, BoxResourceType type, BoxItemRestoreRequestObject requestObject) throws BoxRestException, AuthFatalFailureException, BoxServerException
id - id of the trashed item.type - type of the itemrequestObject - BoxRestExceptionAuthFatalFailureExceptionBoxServerExceptionCopyright © 2014. All Rights Reserved.