public static class BoxRequestsShare.AddCollaboration extends BoxRequest<BoxCollaboration,BoxRequestsShare.AddCollaboration>
BoxRequest.BoxRequestHandler<R extends BoxRequest>, BoxRequest.ContentTypes, BoxRequest.Methods| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ERROR_CODE_USER_ALREADY_COLLABORATOR |
JSON_OBJECT, mBodyMap, mContentType, mHeaderMap, mListener, mQueryMap, mRequestMethod, mRequestUrlString, mRequiresSocket, mSession, mTimeout| Constructor and Description |
|---|
AddCollaboration(java.lang.String url,
java.lang.String folderId,
BoxCollaboration.Role role,
BoxCollaborator collaborator,
BoxSession session)
Adds a user or group to a folder as a collaborator.
|
AddCollaboration(java.lang.String url,
java.lang.String folderId,
BoxCollaboration.Role role,
java.lang.String userEmail,
BoxSession session)
Adds a user by email to a folder as a collaborator.
|
| Modifier and Type | Method and Description |
|---|---|
BoxCollaborator |
getAccessibleBy()
Gets the collaborator that the folder will be accessible by
|
java.lang.String |
getFolderId()
Returns the id of the folder collaborations are being added to.
|
BoxRequestsShare.AddCollaboration |
notifyCollaborators(boolean notify)
Determines if the user, (or all the users in the group) should receive email notification of the collaboration.
|
protected void |
onSendCompleted(BoxResponse<BoxCollaboration> response)
Post action that will be performed after a successful send occurs.
|
buildUrl, createHeaderMap, createHttpRequest, createQuery, equals, getIfMatchEtag, getIfNoneMatchEtag, getRequestHandler, getSession, getSocket, getStringBody, handleSendForCachedResult, handleToTaskForCachedResult, handleUpdateCache, hashCode, importRequestContentMapsFrom, logDebug, logRequest, onSend, parseHashMapEntry, parseJsonObject, send, sendRequest, setBody, setContentType, setHeaders, setIfMatchEtag, setIfNoneMatchEtag, setRequestHandler, setTimeOut, toTaskpublic static final java.lang.String ERROR_CODE_USER_ALREADY_COLLABORATOR
public AddCollaboration(java.lang.String url,
java.lang.String folderId,
BoxCollaboration.Role role,
java.lang.String userEmail,
BoxSession session)
url - the url for the add collaboration requestfolderId - id of the folder to be collaborated.role - role of the collaborationuserEmail - login email of the user who this collaboration applies to, use null if this is a group or you already supplied a accessibleById.session - session to use for the add collaboration requestpublic AddCollaboration(java.lang.String url,
java.lang.String folderId,
BoxCollaboration.Role role,
BoxCollaborator collaborator,
BoxSession session)
url - the url for the add collaboration requestfolderId - id of the folder to be collaborated.role - role of the collaborationcollaborator - the user or group to add to the folder as a collaboratorsession - session to use for the add collaboration requestpublic BoxRequestsShare.AddCollaboration notifyCollaborators(boolean notify)
notify - whether or not to notify the collaborators via email about the collaboration.public java.lang.String getFolderId()
public BoxCollaborator getAccessibleBy()
protected void onSendCompleted(BoxResponse<BoxCollaboration> response) throws BoxException
BoxRequestonSendCompleted in class BoxRequest<BoxCollaboration,BoxRequestsShare.AddCollaboration>response - response of the BoxRequestBoxException - thrown if there was a problem with handling the request.