public final class BoxCollaborationsManager extends BoxResourceManager
| Constructor and Description |
|---|
BoxCollaborationsManager(IBoxConfig config,
IBoxResourceHub resourceHub,
IBoxJSONParser parser,
IBoxRequestAuth auth,
IBoxRESTClient restClient)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
BoxCollaboration |
createCollaboration(String folderId,
BoxCollabRequestObject collabObject)
Add a collaboration for a single user to a folder.
|
void |
deleteCollaboration(String collabId,
BoxDefaultRequestObject requestObject)
Delete a collaboration.
|
List<BoxCollaboration> |
getAllCollaborations(BoxCollabRequestObject collabObject)
Get all collaborations.
|
BoxCollaboration |
getCollaboration(String collabId,
BoxDefaultRequestObject requestObject)
Get a collaboration.
|
static List<BoxCollaboration> |
getCollaborations(BoxCollection collection)
Get collaborations from a collection.
|
BoxCollaboration |
updateCollaboration(String collabId,
BoxCollabRequestObject requestObject)
Update a collaboration.
|
executeRequestWithNoResponseBody, getAuth, getClassFromType, getConfig, getJSONParser, getResourceHub, getResponseAndParse, getResponseAndParseAndTryCast, getRestClient, tryCastBoxItem, tryCastObjectpublic BoxCollaborationsManager(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 BoxCollaboration getCollaboration(String collabId, BoxDefaultRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
collabId - id of the collaborationrequestObject - object that goes into request.BoxRestException - exceptionBoxServerException - exceptionAuthFatalFailureException - exception indicating authentication totally failedpublic BoxCollaboration createCollaboration(String folderId, BoxCollabRequestObject collabObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
folderId - id of the foldercollabObject - object that goes into request body.BoxRestException - exceptionBoxServerException - exceptionAuthFatalFailureException - exception indicating authentication totally failedpublic List<BoxCollaboration> getAllCollaborations(BoxCollabRequestObject collabObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
collabObject - object that goes into request.BoxRestException - exceptionBoxServerException - exceptionAuthFatalFailureException - exception indicating authentication totally failedpublic void deleteCollaboration(String collabId, BoxDefaultRequestObject requestObject) throws BoxServerException, BoxRestException, AuthFatalFailureException
collabId - id of the collaborationcollabObject - object that goes into request.BoxRestException - exceptionBoxServerException - exceptionAuthFatalFailureException - exceptionpublic BoxCollaboration updateCollaboration(String collabId, BoxCollabRequestObject requestObject) throws BoxRestException, AuthFatalFailureException, BoxServerException
collabId - id of the collaborationrequestObject - request object. Note the you can set the status in this object to 'accepted' or 'rejected' if you are the 'accessible_by' user and the current
status is 'pending'BoxRestExceptionAuthFatalFailureExceptionBoxServerExceptionpublic static List<BoxCollaboration> getCollaborations(BoxCollection collection)
collection - collectionCopyright © 2014. All Rights Reserved.