Package com.cbe
Class Group
- java.lang.Object
-
- com.cbe.Group
-
public class Group extends java.lang.Object
Class Group, API requests to server/edge node, for creating/joining and managing groups.
-
-
Constructor Summary
Constructors Constructor Description Group()
Group Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Group
createGroup(java.lang.String name, java.lang.String memberAlias, GroupEventProtocol delegate)
Create Group, can only be used by admin/owners to create new groups.Group
createGroup(java.lang.String name, java.lang.String memberAlias, GroupEventProtocol delegate, int visibility)
Create Group, can only be used by admin/owners to create new groups.int
getVisibility()
Visibility of the Group, Public is searchable and Private is not.Container
groupContainer()
Every group has a drive/container where resources can be shared with the members of the group.long
id()
Returns the id of the group.void
join(java.lang.String alias, GroupEventProtocol delegate)
Request to join a group, in this first version All members will be Public, meaning visable for other member inside the group.void
join(java.lang.String alias, GroupEventProtocol delegate, int memberVisibility)
Request to join a group, in this first version All members will be Public, meaning visable for other member inside the group.void
join(java.lang.String alias, GroupEventProtocol delegate, int memberVisibility, java.lang.String applicationComment)
Request to join a group, in this first version All members will be Public, meaning visable for other member inside the group.boolean
joined()
Searched groups is obtained through the GroupQuery response.void
leave(GroupEventProtocol delegate)
Leave group.void
listBannedMembers(GroupEventProtocol delegate)
Lists all banned former members, or users.void
listMembers(GroupEventProtocol delegate)
List all members in the group.java.lang.String
name()
Returns the name of the group.long
parentId()
Group Parent id.void
remove(GroupEventProtocol delegate)
Remove group (exlusive for group owners).void
rename(java.lang.String newName, GroupEventProtocol delegate)
Rename the Group, group id does not change.Requests_Vec
requests()
Requests to join the group.
-
-
-
Method Detail
-
name
public java.lang.String name()
Returns the name of the group.
-
id
public long id()
Returns the id of the group.
-
parentId
public long parentId()
Group Parent id.
-
groupContainer
public Container groupContainer()
Every group has a drive/container where resources can be shared with the members of the group. Works like a shared container.
-
getVisibility
public int 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)
-
joined
public boolean joined()
Searched groups is obtained through the GroupQuery response. This list of groups have non-joined and joined groups.
Already joined groups can be found on the groupManager->groups() as well and are cached.
The joined bool is used to easily sort out groups in the GroupQuery.
-
requests
public Requests_Vec requests()
Requests to join the group. To retrive the list call listJoinRequests(CBE::GroupDelegatePtr delegate) on the group object.
-
createGroup
public Group createGroup(java.lang.String name, java.lang.String memberAlias, GroupEventProtocol delegate, int visibility)
Create Group, can only be used by admin/owners to create new groups.- Parameters:
name
- , String name of the group.memberAlias
- , String creator member alias.delegate
- , delegate is a callback delegate to the user defined/implementation of the callbacks on GroupEventProtocol.
-
createGroup
public Group createGroup(java.lang.String name, java.lang.String memberAlias, GroupEventProtocol delegate)
Create Group, can only be used by admin/owners to create new groups.- Parameters:
name
- , String group namememberAlias
- , String creator member aliasdelegate
- , delegate is a callback delegate to the user defined/implementation of the callbacks on GroupEventProtocol.
-
join
public void join(java.lang.String alias, GroupEventProtocol delegate, int memberVisibility, java.lang.String applicationComment)
Request to join a group, in this first version All members will be Public, meaning visable for other member inside the group. All groups will also be open so all join requests should be accepted directly.- Parameters:
alias
- , String you request of alias in the group.delegate
- , delegate is a callback delegate to the user defined/implementation of the callbacks on GroupEventProtocol.memberVisibility
- , int (option 1 or 2) can use Visibility enum class as well. 1 is public and 2 is private.applicationComment
- , String an application message to the group owner/s / admin/s.
-
join
public void join(java.lang.String alias, GroupEventProtocol delegate, int memberVisibility)
Request to join a group, in this first version All members will be Public, meaning visable for other member inside the group. All groups will also be open so all join requests should be accepted directly.- Parameters:
alias
- , String you request of alias in the group.delegate
- , delegate is a callback delegate to the user defined/implementation of the callbacks on GroupEventProtocol.memberVisibility
- , int (option 1 or 2) can use Visibility enum class as well. 1 is public and 2 is private.
-
join
public void join(java.lang.String alias, GroupEventProtocol delegate)
Request to join a group, in this first version All members will be Public, meaning visable for other member inside the group. All groups will also be open so all join requests should be accepted directly.- Parameters:
alias
- , String you request of alias in the group.delegate
- , delegate is a callback delegate to the user defined/implementation of the callbacks on GroupEventProtocol.
-
leave
public void leave(GroupEventProtocol delegate)
Leave group.- Parameters:
delegate
- , delegate is a callback delegate to the user defined/implementation of the callbacks on GroupEventProtocol.
-
remove
public void remove(GroupEventProtocol delegate)
Remove group (exlusive for group owners).- Parameters:
delegate
- , delegate is a callback delegate to the user defined/implementation of the callbacks on GroupEventProtocol.
-
rename
public void rename(java.lang.String newName, GroupEventProtocol delegate)
Rename the Group, group id does not change.- Parameters:
newName
- , String new name of the groupdelegate
- , delegate is a callback delegate to the user defined/implementation of the callbacks on GroupEventProtocol.
-
listMembers
public void listMembers(GroupEventProtocol delegate)
List all members in the group. After listing, all members will be available though a call to group->members().- Parameters:
delegate
- , delegate is a callback delegate to the user defined/implementation of the callbacks on GroupEventProtocol.
-
listBannedMembers
public void listBannedMembers(GroupEventProtocol delegate)
Lists all banned former members, or users.- Parameters:
delegate
- , delegate is a callback delegate to the user defined/implementation of the callbacks on GroupEventProtocol.
-
-