Package com.cbe

Class Group

java.lang.Object
com.cbe.Group

public class Group extends Object
A group of members.
  • Field Details

    • swigCMemOwn

      protected transient boolean swigCMemOwn
  • Constructor Details

    • Group

      public Group(long cPtr, boolean cMemoryOwn)
    • Group

      public Group(DefaultCtor arg0)
      Default constructor.

      Construct a new object with
      the DefaultCtor to enable the
      operator bool()
      test
  • Method Details

    • getCPtr

      public static long getCPtr(Group obj)
    • finalize

      public void finalize()
      Overrides:
      finalize in class Object
    • delete

      public void delete()
    • name

      public String 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

      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 Visibility 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 the groupManager.groups() and they are also 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 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 group
      memberAlias - another popular name
      delegate - 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 - name
      delegate - Pointer to a delegate::group::JoinDelegate instance
      that is implemented by the user.
      memberVisibility - default: public
      applicationComment - message to the owner regarding
      the application to join
    • leave

      public void leave(LeaveDelegate delegate)
      Leave group.

      Parameters:
      delegate - Pointer to a delegate::LeaveDelegate instance
      that is implemented by the user.
    • remove

      public void remove(RemoveDelegate delegate)
      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

      public void rename(String newName, RenameDelegate delegate)
      Rename the Group; group id does not change.

      Parameters:
      newName - the new name for the group
      delegate - Pointer to a delegate::group::RenameDelegate instance
      that is implemented by the user.
    • listMembers

      public void listMembers(ListMembersDelegate delegate)
      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

      public void listBannedMembers(ListMembersDelegate delegate)
      Lists all banned former members, or users.

      Parameters:
      delegate - Pointer to a delegate::ListMembersDelegate instance
      that is implemented by the user.
    • listRoles

      public void listRoles(ListRolesDelegate delegate)
      Lists all roles in the group.

      Parameters:
      delegate - Pointer to a delegate::ListRolesDelegate instance
      that is implemented by the user.
    • createRole

      public void createRole(String name, CreateRoleDelegate delegate)
      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

      public void removeRole(long roleId, RemoveRoleDelegate delegate)
      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.