public class BoxGroupsManagerImpl extends AbstractBoxResourceManager implements IBoxGroupsManager
| Constructor and Description |
|---|
BoxGroupsManagerImpl(IBoxConfig config,
IBoxResourceHub resourceHub,
IBoxJSONParser parser,
IBoxRequestAuth auth,
IBoxRESTClient restClient) |
| Modifier and Type | Method and Description |
|---|---|
BoxGroup |
createGroup(BoxGroupRequestObject requestObject)
Create a group.
|
BoxGroup |
createGroup(java.lang.String name)
Create a group.
|
BoxGroupMembership |
createMembership(BoxGroupMembershipRequestObject requestObject) |
BoxGroupMembership |
createMembership(java.lang.String groupId,
java.lang.String userId,
java.lang.String role) |
void |
deleteGroup(java.lang.String groupId,
BoxDefaultRequestObject requestObject)
Delete a group.
|
void |
deleteMembership(java.lang.String membershipId,
BoxDefaultRequestObject requestObject)
Delete a membership.
|
BoxCollection |
getAllCollaborations(java.lang.String groupId,
BoxDefaultRequestObject requestObject)
Get all collaborations of this group.
|
BoxCollection |
getAllGroups(BoxDefaultRequestObject requestObject)
Get all groups.
|
BoxGroupMembership |
getMembership(java.lang.String membershipId,
BoxDefaultRequestObject requestObject) |
BoxCollection |
getMemberships(java.lang.String groupId,
BoxDefaultRequestObject requestObject)
Get memberships of a group.
|
BoxGroup |
updateGroup(java.lang.String groupId,
BoxGroupRequestObject requestObject)
Update group information.
|
BoxGroupMembership |
updateMembership(java.lang.String membershipId,
BoxGroupMembershipRequestObject requestObject)
update a membership.
|
BoxGroupMembership |
updateMembership(java.lang.String membershipId,
java.lang.String role)
Update role of a membership.
|
executeRequestWithNoResponseBody, getAuth, getClassFromType, getConfig, getJSONParser, getResourceHub, getResponseAndParse, getResponseAndParseAndTryCast, getRestClient, tryCastBoxItem, tryCastObjectpublic BoxGroupsManagerImpl(IBoxConfig config, IBoxResourceHub resourceHub, IBoxJSONParser parser, IBoxRequestAuth auth, IBoxRESTClient restClient)
public BoxCollection getAllGroups(BoxDefaultRequestObject requestObject) throws BoxRestException, AuthFatalFailureException, BoxServerException
IBoxGroupsManagergetAllGroups in interface IBoxGroupsManagerBoxRestException - See BoxRestException for more info.AuthFatalFailureException - See com.box.restclientv2.exceptions.AuthFatalFailureException for more info.BoxServerException - See com.box.restclientv2.exceptions.BoxServerException for more info.public BoxGroup createGroup(BoxGroupRequestObject requestObject) throws BoxRestException, AuthFatalFailureException, BoxServerException
IBoxGroupsManagercreateGroup in interface IBoxGroupsManagerBoxRestException - See BoxRestException for more info.AuthFatalFailureException - See com.box.restclientv2.exceptions.AuthFatalFailureException for more info.BoxServerException - See com.box.restclientv2.exceptions.BoxServerException for more info.public BoxGroup createGroup(java.lang.String name) throws BoxRestException, AuthFatalFailureException, BoxServerException
IBoxGroupsManagercreateGroup in interface IBoxGroupsManagername - name of the group.BoxRestException - See BoxRestException for more info.AuthFatalFailureException - See com.box.restclientv2.exceptions.AuthFatalFailureException for more info.BoxServerException - See com.box.restclientv2.exceptions.BoxServerException for more info.public BoxGroup updateGroup(java.lang.String groupId, BoxGroupRequestObject requestObject) throws BoxRestException, AuthFatalFailureException, BoxServerException
IBoxGroupsManagerupdateGroup in interface IBoxGroupsManagergroupId - id of the group.BoxRestException - See BoxRestException for more info.AuthFatalFailureException - See com.box.restclientv2.exceptions.AuthFatalFailureException for more info.BoxServerException - See com.box.restclientv2.exceptions.BoxServerException for more info.public void deleteGroup(java.lang.String groupId,
BoxDefaultRequestObject requestObject)
throws BoxRestException,
AuthFatalFailureException,
BoxServerException
IBoxGroupsManagerdeleteGroup in interface IBoxGroupsManagergroupId - id of the group.BoxRestException - See BoxRestException for more info.AuthFatalFailureException - See com.box.restclientv2.exceptions.AuthFatalFailureException for more info.BoxServerException - See com.box.restclientv2.exceptions.BoxServerException for more info.public BoxCollection getMemberships(java.lang.String groupId, BoxDefaultRequestObject requestObject) throws BoxRestException, AuthFatalFailureException, BoxServerException
IBoxGroupsManagergetMemberships in interface IBoxGroupsManagergroupId - id of the group.BoxRestException - See BoxRestException for more info.AuthFatalFailureException - See com.box.restclientv2.exceptions.AuthFatalFailureException for more info.BoxServerException - See com.box.restclientv2.exceptions.BoxServerException for more info.public BoxGroupMembership getMembership(java.lang.String membershipId, BoxDefaultRequestObject requestObject) throws BoxRestException, AuthFatalFailureException, BoxServerException
getMembership in interface IBoxGroupsManagerBoxRestExceptionAuthFatalFailureExceptionBoxServerExceptionpublic BoxGroupMembership createMembership(BoxGroupMembershipRequestObject requestObject) throws BoxRestException, AuthFatalFailureException, BoxServerException
createMembership in interface IBoxGroupsManagerBoxRestExceptionAuthFatalFailureExceptionBoxServerExceptionpublic BoxGroupMembership createMembership(java.lang.String groupId, java.lang.String userId, java.lang.String role) throws BoxRestException, AuthFatalFailureException, BoxServerException
createMembership in interface IBoxGroupsManagergroupId - id of the groupuserId - id of the user to be added.role - role of the user. e.g. BoxGroupMembership.ROLE_ADMINBoxRestException - See BoxRestException for more info.AuthFatalFailureException - See com.box.restclientv2.exceptions.AuthFatalFailureException for more info.BoxServerException - See com.box.restclientv2.exceptions.BoxServerException for more info.public BoxGroupMembership updateMembership(java.lang.String membershipId, BoxGroupMembershipRequestObject requestObject) throws BoxRestException, AuthFatalFailureException, BoxServerException
IBoxGroupsManagerupdateMembership in interface IBoxGroupsManagermembershipId - id of the membership to be updated.BoxRestException - See BoxRestException for more info.AuthFatalFailureException - See com.box.restclientv2.exceptions.AuthFatalFailureException for more info.BoxServerException - See com.box.restclientv2.exceptions.BoxServerException for more info.public BoxGroupMembership updateMembership(java.lang.String membershipId, java.lang.String role) throws BoxRestException, AuthFatalFailureException, BoxServerException
IBoxGroupsManagerupdateMembership in interface IBoxGroupsManagermembershipId - id of the membership.role - new role.BoxRestException - See BoxRestException for more info.AuthFatalFailureException - See com.box.restclientv2.exceptions.AuthFatalFailureException for more info.BoxServerException - See com.box.restclientv2.exceptions.BoxServerException for more info.public void deleteMembership(java.lang.String membershipId,
BoxDefaultRequestObject requestObject)
throws BoxRestException,
AuthFatalFailureException,
BoxServerException
IBoxGroupsManagerdeleteMembership in interface IBoxGroupsManagermembershipId - id of the membership.BoxRestException - See BoxRestException for more info.AuthFatalFailureException - See com.box.restclientv2.exceptions.AuthFatalFailureException for more info.BoxServerException - See com.box.restclientv2.exceptions.BoxServerException for more info.public BoxCollection getAllCollaborations(java.lang.String groupId, BoxDefaultRequestObject requestObject) throws BoxRestException, AuthFatalFailureException, BoxServerException
IBoxGroupsManagergetAllCollaborations in interface IBoxGroupsManagergroupId - id of the group.BoxRestException - See BoxRestException for more info.AuthFatalFailureException - See com.box.restclientv2.exceptions.AuthFatalFailureException for more info.BoxServerException - See com.box.restclientv2.exceptions.BoxServerException for more info.