public class BoxGroupsManager extends Object
Provides operations to manage Box groups.
Constructor and Description |
---|
BoxGroupsManager(com.box.sdk.BoxAPIConnection boxConnection)
Create groups manager to manage the users of Box connection's
authenticated user.
|
Modifier and Type | Method and Description |
---|---|
com.box.sdk.BoxGroupMembership |
addGroupMembership(String groupId,
String userId,
com.box.sdk.BoxGroupMembership.Role role)
Add a member to group with the specified role.
|
com.box.sdk.BoxGroup |
createGroup(String name,
String provenance,
String externalSyncIdentifier,
String description,
String invitabilityLevel,
String memberViewabilityLevel)
Create a new group with a specified name and optional additional parameters.
|
void |
deleteGroup(String groupId)
Delete group.
|
void |
deleteGroupMembership(String groupMembershipId)
Delete group membership.
|
Collection<com.box.sdk.BoxGroup> |
getAllGroups()
Get all the groups in the enterprise.
|
com.box.sdk.BoxGroup.Info |
getGroupInfo(String groupId)
Get group information.
|
com.box.sdk.BoxGroupMembership.Info |
getGroupMembershipInfo(String groupMemebershipId)
Get group membership information.
|
Collection<com.box.sdk.BoxGroupMembership.Info> |
getGroupMemberships(String groupId)
Get information about all of the group memberships for this group.
|
com.box.sdk.BoxGroup |
updateGroupInfo(String groupId,
com.box.sdk.BoxGroup.Info groupInfo)
Update group information.
|
com.box.sdk.BoxGroupMembership |
updateGroupMembershipInfo(String groupMemebershipId,
com.box.sdk.BoxGroupMembership.Info info)
Update group membership information.
|
public BoxGroupsManager(com.box.sdk.BoxAPIConnection boxConnection)
boxConnection
- - Box connection to authenticated user account.public Collection<com.box.sdk.BoxGroup> getAllGroups()
public com.box.sdk.BoxGroup createGroup(String name, String provenance, String externalSyncIdentifier, String description, String invitabilityLevel, String memberViewabilityLevel)
name
- - the name of the new group.provenance
- - the provenance of the new group.externalSyncIdentifier
- - the external_sync_identifier of the new group.description
- - the description of the new group.invitabilityLevel
- - the invitibility_level of the new group.memberViewabilityLevel
- - the member_viewability_level of the new group.public void deleteGroup(String groupId)
groupId
- - the id of group to delete.public com.box.sdk.BoxGroup.Info getGroupInfo(String groupId)
groupId
- - the id of group.public com.box.sdk.BoxGroup updateGroupInfo(String groupId, com.box.sdk.BoxGroup.Info groupInfo)
groupId
- - the id of group to update.groupInfo
- - the updated informationpublic Collection<com.box.sdk.BoxGroupMembership.Info> getGroupMemberships(String groupId)
groupId
- - the id of group.public com.box.sdk.BoxGroupMembership addGroupMembership(String groupId, String userId, com.box.sdk.BoxGroupMembership.Role role)
groupId
- - the id of group.userId
- - the id of user to be added to group.role
- - the role of the user in this group. Can be null
to assign the default role.public void deleteGroupMembership(String groupMembershipId)
groupMembershipId
- - the id of group membership to delete.public com.box.sdk.BoxGroupMembership.Info getGroupMembershipInfo(String groupMemebershipId)
groupMemebershipId
- - the id of group membership.public com.box.sdk.BoxGroupMembership updateGroupMembershipInfo(String groupMemebershipId, com.box.sdk.BoxGroupMembership.Info info)
groupMembershipId
- - the id of group membership to update.info
- - the updated information.Apache Camel