Class BoxGroupsManager
- java.lang.Object
-
- org.apache.camel.component.box.api.BoxGroupsManager
-
public class BoxGroupsManager extends Object
Provides operations to manage Box groups.
-
-
Constructor Summary
Constructors Constructor Description BoxGroupsManager(com.box.sdk.BoxAPIConnection boxConnection)Create groups manager to manage the users of Box connection's authenticated user.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.box.sdk.BoxGroupMembershipaddGroupMembership(String groupId, String userId, com.box.sdk.BoxGroupMembership.Role role)Add a member to group with the specified role.com.box.sdk.BoxGroupcreateGroup(String name, String provenance, String externalSyncIdentifier, String description, String invitabilityLevel, String memberViewabilityLevel)Create a new group with a specified name and optional additional parameters.voiddeleteGroup(String groupId)Delete group.voiddeleteGroupMembership(String groupMembershipId)Delete group membership.Collection<com.box.sdk.BoxGroup>getAllGroups()Get all the groups in the enterprise.com.box.sdk.BoxGroup.InfogetGroupInfo(String groupId)Get group information.com.box.sdk.BoxGroupMembership.InfogetGroupMembershipInfo(String groupMembershipId)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.BoxGroupupdateGroupInfo(String groupId, com.box.sdk.BoxGroup.Info groupInfo)Update group information.com.box.sdk.BoxGroupMembershipupdateGroupMembershipInfo(String groupMembershipId, com.box.sdk.BoxGroupMembership.Info info)Update group membership information.
-
-
-
Method Detail
-
getAllGroups
public Collection<com.box.sdk.BoxGroup> getAllGroups()
Get all the groups in the enterprise.- Returns:
- Collection containing all the enterprise's groups.
-
createGroup
public 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. Optional parameters may be null.- Parameters:
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.- Returns:
- The newly created group.
-
deleteGroup
public void deleteGroup(String groupId)
Delete group.- Parameters:
groupId- - the id of group to delete.
-
getGroupInfo
public com.box.sdk.BoxGroup.Info getGroupInfo(String groupId)
Get group information.- Parameters:
groupId- - the id of group.- Returns:
- The group information.
-
updateGroupInfo
public com.box.sdk.BoxGroup updateGroupInfo(String groupId, com.box.sdk.BoxGroup.Info groupInfo)
Update group information.- Parameters:
groupId- - the id of group to update.groupInfo- - the updated information- Returns:
- The updated group.
-
getGroupMemberships
public Collection<com.box.sdk.BoxGroupMembership.Info> getGroupMemberships(String groupId)
Get information about all of the group memberships for this group.- Parameters:
groupId- - the id of group.- Returns:
- The group information.
-
addGroupMembership
public com.box.sdk.BoxGroupMembership addGroupMembership(String groupId, String userId, com.box.sdk.BoxGroupMembership.Role role)
Add a member to group with the specified role.- Parameters:
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 benullto assign the default role.- Returns:
- The group information.
-
deleteGroupMembership
public void deleteGroupMembership(String groupMembershipId)
Delete group membership.- Parameters:
groupMembershipId- - the id of group membership to delete.
-
getGroupMembershipInfo
public com.box.sdk.BoxGroupMembership.Info getGroupMembershipInfo(String groupMembershipId)
Get group membership information.- Parameters:
groupMembershipId- - the id of group membership.- Returns:
- The group information.
-
updateGroupMembershipInfo
public com.box.sdk.BoxGroupMembership updateGroupMembershipInfo(String groupMembershipId, com.box.sdk.BoxGroupMembership.Info info)
Update group membership information.- Parameters:
groupMembershipId- - the id of group membership to update.info- - the updated information.- Returns:
- The group information.
-
-