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, tryCastObject
public BoxGroupsManagerImpl(IBoxConfig config, IBoxResourceHub resourceHub, IBoxJSONParser parser, IBoxRequestAuth auth, IBoxRESTClient restClient)
public BoxCollection getAllGroups(BoxDefaultRequestObject requestObject) throws BoxRestException, AuthFatalFailureException, BoxServerException
IBoxGroupsManager
getAllGroups
in interface IBoxGroupsManager
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 createGroup(BoxGroupRequestObject requestObject) throws BoxRestException, AuthFatalFailureException, BoxServerException
IBoxGroupsManager
createGroup
in interface IBoxGroupsManager
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 createGroup(java.lang.String name) throws BoxRestException, AuthFatalFailureException, BoxServerException
IBoxGroupsManager
createGroup
in interface IBoxGroupsManager
name
- 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
IBoxGroupsManager
updateGroup
in interface IBoxGroupsManager
groupId
- 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
IBoxGroupsManager
deleteGroup
in interface IBoxGroupsManager
groupId
- 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
IBoxGroupsManager
getMemberships
in interface IBoxGroupsManager
groupId
- 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 IBoxGroupsManager
BoxRestException
AuthFatalFailureException
BoxServerException
public BoxGroupMembership createMembership(BoxGroupMembershipRequestObject requestObject) throws BoxRestException, AuthFatalFailureException, BoxServerException
createMembership
in interface IBoxGroupsManager
BoxRestException
AuthFatalFailureException
BoxServerException
public BoxGroupMembership createMembership(java.lang.String groupId, java.lang.String userId, java.lang.String role) throws BoxRestException, AuthFatalFailureException, BoxServerException
createMembership
in interface IBoxGroupsManager
groupId
- 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
IBoxGroupsManager
updateMembership
in interface IBoxGroupsManager
membershipId
- 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
IBoxGroupsManager
updateMembership
in interface IBoxGroupsManager
membershipId
- 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
IBoxGroupsManager
deleteMembership
in interface IBoxGroupsManager
membershipId
- 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
IBoxGroupsManager
getAllCollaborations
in interface IBoxGroupsManager
groupId
- 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.