public class BoxItemsManagerImpl extends AbstractBoxResourceManager implements IBoxItemsManager
Constructor and Description |
---|
BoxItemsManagerImpl(IBoxConfig config,
IBoxResourceHub resourceHub,
IBoxJSONParser parser,
IBoxRequestAuth auth,
IBoxRESTClient restClient)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
BoxItem |
copyItem(java.lang.String id,
BoxItemCopyRequestObject requestObject,
BoxResourceType type)
Copy an item.
|
BoxItem |
createSharedLink(java.lang.String id,
BoxSharedLinkRequestObject requestObject,
BoxResourceType type)
Create a shared link for an item, given the id .
|
BoxItem |
getItem(java.lang.String id,
BoxDefaultRequestObject requestObject,
BoxResourceType type)
Get item given an item id.
|
BoxItem |
updateItemInfo(java.lang.String id,
BoxItemRequestObject requestObject,
BoxResourceType type)
Update info for an item
|
executeRequestWithNoResponseBody, getAuth, getClassFromType, getConfig, getJSONParser, getResourceHub, getResponseAndParse, getResponseAndParseAndTryCast, getRestClient, tryCastBoxItem, tryCastObject
public BoxItemsManagerImpl(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(java.lang.String id, BoxDefaultRequestObject requestObject, BoxResourceType type) throws BoxRestException, BoxServerException, AuthFatalFailureException
IBoxItemsManager
getItem
in interface IBoxItemsManager
id
- id of the itemrequestObject
- requestObjecttype
- resource typeBoxRestException
- 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 BoxItem copyItem(java.lang.String id, BoxItemCopyRequestObject requestObject, BoxResourceType type) throws BoxRestException, BoxServerException, AuthFatalFailureException
IBoxItemsManager
copyItem
in interface IBoxItemsManager
id
- id of the itemrequestObject
- request objecttype
- resource type of the itemBoxRestException
- 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 BoxItem updateItemInfo(java.lang.String id, BoxItemRequestObject requestObject, BoxResourceType type) throws java.io.UnsupportedEncodingException, BoxRestException, BoxServerException, AuthFatalFailureException
IBoxItemsManager
updateItemInfo
in interface IBoxItemsManager
id
- id of the itemrequestObject
- request objecttype
- resource type of the itemjava.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 BoxItem createSharedLink(java.lang.String id, BoxSharedLinkRequestObject requestObject, BoxResourceType type) throws BoxRestException, BoxServerException, AuthFatalFailureException
IBoxItemsManager
createSharedLink
in interface IBoxItemsManager
id
- id of the itemrequestObject
- request objecttype
- resource type of this itemBoxRestException
- 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.