Package com.cbe
Class Group
java.lang.Object
com.cbe.Group
A group of members.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGroup
(long cPtr, boolean cMemoryOwn) Group
(DefaultCtor arg0) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptioncreateGroup
(String name, String memberAlias, Visibility visibility, CreateGroupDelegate delegate) Create a new Group.void
createRole
(String name, CreateRoleDelegate delegate) Creates a new role in the group.void
delete()
void
finalize()
static long
Visibility of the Group, Public is searchable and Private is not.Every group has a drive/container where resources can be shared with the members of the group.long
id()
Returns the id number of the group.void
join
(String alias, Visibility memberVisibility, String applicationComment, JoinDelegate delegate) Ask to join a group.boolean
joined()
Searched groups are obtained through the GroupQuery response.void
leave
(LeaveDelegate delegate) Leave group.void
listBannedMembers
(ListMembersDelegate delegate) Lists all banned former members, or users.void
listMembers
(ListMembersDelegate delegate) List all members in the group.void
listRoles
(ListRolesDelegate delegate) Lists all roles in the group.name()
Returns the name of the group.long
parentId()
Group's Parent id number.void
remove
(RemoveDelegate delegate) Remove group.void
removeRole
(long roleId, RemoveRoleDelegate delegate) Removes a role in the group.void
rename
(String newName, RenameDelegate delegate) Rename the Group; group id does not change.requests()
Requests to join the group.
-
Field Details
-
swigCMemOwn
protected transient boolean swigCMemOwn
-
-
Constructor Details
-
Group
public Group(long cPtr, boolean cMemoryOwn) -
Group
-
-
Method Details
-
getCPtr
-
finalize
public void finalize() -
delete
public void delete() -
name
Returns the name of the group. -
id
public long id()Returns the id number of the group. -
parentId
public long parentId()Group's Parent id number. -
groupContainer
Every group has a drive/container where resources can be shared with the members of the group. Works like a shared container. -
getVisibility
Visibility of the Group, Public is searchable and Private is not.
In this early version you can create Private groups but the ability to
invite has been blocked. (work in progress)
see Types.h for cbe::PublishVisibility enum -
joined
public boolean joined()Searched groups are obtained through the GroupQuery response. This list of
groups have non-joined and joined groups. Already joined groups can be
found on thegroupManager.groups()
and they are also cached.
The joined bool is used to easily sort out groups in the GroupQuery. -
requests
Requests to join the group. To retrieve the list call
listJoinRequests(cbe::GroupDelegatePtr delegate) on the group object. -
createGroup
public Group createGroup(String name, String memberAlias, Visibility visibility, CreateGroupDelegate delegate) Create a new Group.
Note: Can only be used by Tenant admin/owners to create new groups.- Parameters:
name
- of the groupmemberAlias
- another popular namedelegate
- Pointer to a delegate::CreateGroupDelegate instance
that is implemented by the user.visibility
- default: public- Returns:
- cbe::Group
see Types.h for cbe::visibility enum
cbe::Visibility::PublicGroup or cbe::Visibility::Private
-
join
public void join(String alias, Visibility memberVisibility, String applicationComment, JoinDelegate delegate) Ask to join a group.
In this first version All members will be Public,
meaning visible for other member inside the group. All groups will also be
open so all join requests should be accepted directly.
Note: This is completely different from the query chain join.
- Parameters:
alias
- namedelegate
- Pointer to a delegate::group::JoinDelegate instance
that is implemented by the user.memberVisibility
- default: publicapplicationComment
- message to the owner regarding
the application to join
-
leave
Leave group.
- Parameters:
delegate
- Pointer to a delegate::LeaveDelegate instance
that is implemented by the user.
-
remove
Remove group.
Note: This is exlusive for Tenant group owners.
- Parameters:
delegate
- Pointer to a delegate::group::RemoveDelegate instance
that is implemented by the user.
-
rename
Rename the Group; group id does not change.
- Parameters:
newName
- the new name for the groupdelegate
- Pointer to a delegate::group::RenameDelegate instance
that is implemented by the user.
-
listMembers
List all members in the group.
The member list is then retrieved via the delegate callback function
cbe::delegate::ListMembersDelegate::onListMembersSuccess()
- Parameters:
delegate
- Pointer to a delegate::ListMembersDelegate instance
that is implemented by the user.
-
listBannedMembers
Lists all banned former members, or users.
- Parameters:
delegate
- Pointer to a delegate::ListMembersDelegate instance
that is implemented by the user.
-
listRoles
Lists all roles in the group.
- Parameters:
delegate
- Pointer to a delegate::ListRolesDelegate instance
that is implemented by the user.
-
createRole
Creates a new role in the group.
- Parameters:
name
- The name of the role.
delegate
- Pointer to a delegate::CreateRoleDelegate instance
that is implemented by the user.
-
removeRole
Removes a role in the group.
- Parameters:
roleId
- The id of the role to remove.
delegate
- Pointer to a delegate::RemoveRoleDelegate instance
that is implemented by the user.
-