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(java.lang.String folderId,
BoxCollabRequestObject collabObject)
Add a collaboration for a single user to a folder.
|
void |
deleteCollaboration(java.lang.String collabId,
BoxDefaultRequestObject requestObject)
Delete a collaboration.
|
java.util.List<BoxCollaboration> |
getAllCollaborations(BoxCollabRequestObject collabObject)
Get all collaborations.
|
BoxCollaboration |
getCollaboration(java.lang.String collabId,
BoxDefaultRequestObject requestObject)
Get a collaboration.
|
static java.util.List<BoxCollaboration> |
getCollaborations(BoxCollection collection)
Get collaborations from a collection.
|
BoxCollaboration |
updateCollaboration(java.lang.String collabId,
BoxCollabRequestObject requestObject)
Update a collaboration.
|
executeRequestWithNoResponseBody, getAuth, getConfig, getJSONParser, getResourceHub, getResponseAndParse, getResponseAndParseAndTryCast, tryCastBoxItem, tryCastObject
public 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(java.lang.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(java.lang.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 java.util.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(java.lang.String collabId, BoxDefaultRequestObject requestObject) throws BoxServerException, BoxRestException, AuthFatalFailureException
collabId
- id of the collaborationcollabObject
- object that goes into request.BoxRestException
- exceptionBoxServerException
- exceptionAuthFatalFailureException
- exceptionpublic BoxCollaboration updateCollaboration(java.lang.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'BoxRestException
AuthFatalFailureException
BoxServerException
public static java.util.List<BoxCollaboration> getCollaborations(BoxCollection collection)
collection
- collection