SDK  2.1.4
CloudBackend Software Development Kit - SDK API for C++
cbe::Group Class Reference

A group of members. More...

#include <Group.h>

Public Types

using Requests = std::vector< cbe::Request >
 
using CreateGroupDelegatePtr = delegate::CreateGroupDelegatePtr
 
using CreateGroupException = delegate::CreateGroupDelegate::Exception
 
using CreateGroupError = delegate::CreateGroupDelegate::ErrorInfo
 
using JoinDelegatePtr = delegate::group::JoinDelegatePtr
 
using JoinException = delegate::group::JoinDelegate::Exception
 
using JoinError = delegate::group::JoinDelegate::ErrorInfo
 
using LeaveDelegatePtr = delegate::LeaveDelegatePtr
 
using LeaveException = delegate::LeaveDelegate::Exception
 
using LeaveError = delegate::LeaveDelegate::ErrorInfo
 
using RemoveDelegatePtr = delegate::group::RemoveDelegatePtr
 
using RemoveException = delegate::group::RemoveDelegate::Exception
 
using RemoveError = delegate::group::RemoveDelegate::ErrorInfo
 
using RenameDelegatePtr = delegate::group::RenameDelegatePtr
 
using RenameException = delegate::group::RenameDelegate::Exception
 
using RenameError = delegate::group::RenameDelegate::ErrorInfo
 
using ListMembersDelegatePtr = delegate::ListMembersDelegatePtr
 
using ListMembersException = delegate::ListMembersDelegate::Exception
 
using ListMembersError = delegate::ListMembersDelegate::ErrorInfo
 
using ListBannedMembersDelegatePtr = delegate::ListMembersDelegatePtr
 
using ListBannedMembersException = delegate::ListMembersDelegate::Exception
 
using ListBannedMembersError = delegate::ListMembersDelegate::ErrorInfo
 
using ListRolesDelegatePtr = delegate::ListRolesDelegatePtr
 
using ListRolesException = delegate::ListRolesDelegate::Exception
 
using ListRolesError = delegate::ListRolesDelegate::ErrorInfo
 
using CreateRoleDelegatePtr = delegate::CreateRoleDelegatePtr
 
using CreateRoleException = delegate::CreateRoleDelegate::Exception
 
using CreateRoleError = delegate::CreateRoleDelegate::ErrorInfo
 
using RemoveRoleDelegatePtr = delegate::RemoveRoleDelegatePtr
 
using RemoveRoleException = delegate::RemoveRoleDelegate::Exception
 
using RemoveRoleError = delegate::RemoveRoleDelegate::ErrorInfo
 

Public Member Functions

std::string name () const
 
cbe::GroupId id () const
 
cbe::GroupId parentId () const
 
cbe::Container groupContainer () const
 
cbe::Visibility getVisibility () const
 
bool joined () const
 
Requests requests () const
 
cbe::Group createGroup (std::string name, std::string memberAlias, cbe::Visibility visibility, CreateGroupDelegatePtr delegate)
 Create a new Group. More...
 
cbe::Group createGroup (std::string name, std::string memberAlias, cbe::Visibility visibility)
 Synchronous [exception] creates a new group Synchronous version of createGroup(name, memberAlias, delegate, visibility = cbe::Visibility::Public, CreateGroupDelegatePtr) , and throws an exception, CreateGroupException, in case of a failed call.
See createGroup(CreateGroupDelegatePtr) More...
 
cbe::util::Optional< cbe::GroupcreateGroup (std::string name, std::string memberAlias, cbe::Visibility visibility, CreateGroupError &error)
 
void join (std::string alias, cbe::Visibility memberVisibility, std::string applicationComment, JoinDelegatePtr delegate)
 Synchronous [exception] 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. More...
 
cbe::Group join (std::string alias, cbe::Visibility memberVisibility, std::string applicationComment)
 Synchronous [exception] Ask to join a group. Synchronous version of join(std::string, cbe::Visibility, std::string) , and throws an exception, JoinException, in case of a failed call.
See join(JoinDelegatePtr) More...
 
cbe::util::Optional< cbe::Groupjoin (std::string alias, cbe::Visibility memberVisibility, std::string applicationComment, JoinError &error)
 Synchronous [non-throwing] Ask to join a group. Synchronous version of join(alias, memberVisibility, applicationComment, JoinError&,JoinDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See join(alias, memberVisibility, applicationComment, JoinError&, JoinDelegatePtr) More...
 
void leave (LeaveDelegatePtr delegate)
 Leave group. More...
 
delegate::LeaveSuccess leave ()
 Synchronous [exception] leaves the specified group. Synchronous version of leave(LeaveDelegatePtr) , and throws an exception, LeaveException, in case of a failed call.
See leave(LeaveDelegatePtr) More...
 
cbe::util::Optional< delegate::LeaveSuccessleave (LeaveError &error)
 Synchronous [non-throwing] leaves the specified group. Synchronous version of leave(LeaveDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See leave(LeaveDelegatePtr) More...
 
void remove (RemoveDelegatePtr delegate)
 Remove group. More...
 
delegate::group::RemoveSuccess remove ()
 Synchronous [exception] removes the specified group. Synchronous version of remove(RemoveDelegatePtr) , and throws an exception, RemoveException, in case of a failed call.
See remove(RemoveDelegatePtr) More...
 
cbe::util::Optional< delegate::group::RemoveSuccessremove (RemoveError &error)
 Synchronous [non-throwing] removes the specified group. Synchronous version of remove(RemoveDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See remove(RemoveDelegatePtr) More...
 
void rename (std::string newName, RenameDelegatePtr delegate)
 Rename the Group; group id does not change. More...
 
delegate::group::RenameSuccess rename (std::string newName)
 Synchronous [exception] renames a group Synchronous version of rename(std::string ,RenameDelegatePtr) , and throws an exception, RenameException, in case of a failed call.
See rename(RenameDelegatePtr) More...
 
cbe::util::Optional< delegate::group::RenameSuccessrename (std::string newName, RenameError &error)
 Synchronous [non-throwing] renames a group Synchronous version of rename(newName,RenameDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See rename(newName, RenameDelegatePtr) More...
 
void listMembers (ListMembersDelegatePtr delegate)
 List all members in the group. More...
 
delegate::ListMembersDelegate::Members listMembers ()
 Synchronous [exception] list members of the specifed group. Synchronous version of listMembers(ListMembersDelegatePtr) , and throws an exception, ListMembersException, in case of a failed call.
See listMembers(ListMembersDelegatePtr) More...
 
cbe::util::Optional< delegate::ListMembersDelegate::Members > listMembers (ListMembersError &error)
 Synchronous [non-throwing] list members of the specifed group. Synchronous version of listMembers(ListMembersDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See listMembers(ListMembersDelegatePtr) More...
 
void listBannedMembers (ListBannedMembersDelegatePtr delegate)
 Lists all banned former members, or users. More...
 
std::vector< cbe::MemberlistBannedMembers ()
 Synchronous [exception] list the banned members of the specified group. Synchronous version of listBannedMembers(ListMembersDelegatePtr) , and throws an exception, ListBannedMembersException, in case of a failed call.
See listBannedMembers(ListMembersDelegatePtr) More...
 
cbe::util::Optional< std::vector< cbe::Member > > listBannedMembers (ListBannedMembersError &error)
 Synchronous [non-throwing] list the banned members of the specified group. Synchronous version of listBannedMembers(ListMembersDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See listBannedMembers(ListMembersDelegatePtr) More...
 
void listRoles (ListRolesDelegatePtr delegate)
 Lists all roles in the group. More...
 
delegate::ListRolesDelegate::Roles listRoles ()
 Synchronous [exception] list roles of a group. Synchronous version of listRoles(ListRolesDelegatePtr) , and throws an exception, ListRolesException, in case of a failed call.
See listRoles(ListRolesDelegatePtr) More...
 
cbe::util::Optional< delegate::ListRolesDelegate::Roles > listRoles (ListRolesError &error)
 Synchronous [non-throwing] list roles of a group. Synchronous version of listRoles(ListRolesDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See listRoles(ListRolesDelegatePtr) More...
 
void createRole (std::string name, CreateRoleDelegatePtr delegate)
 Creates a new role in the group. More...
 
cbe::Role createRole (std::string name)
 Synchronous [exception] creates a new role in the specified group. Synchronous version of createRole(std::string, CreateRoleDelegatePtr) , and throws an exception, CreateRoleException, in case of a failed call.
See createRole(CreateRoleDelegatePtr) More...
 
cbe::util::Optional< cbe::RolecreateRole (std::string name, CreateRoleError &error)
 Synchronous [non-throwing] creates a new role in the specified group. Synchronous version of createRole(name,CreateRoleDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See createRole(name, CreateRoleDelegatePtr) More...
 
void removeRole (RoleId roleId, RemoveRoleDelegatePtr delegate)
 
cbe::RoleId removeRole (RoleId roleId)
 Synchronous [exception] removes a role in the specified group. Synchronous version of removeRole(RoleId roleId, RemoveRoleDelegatePtr) , and throws an exception, RemoveRoleException, in case of a failed call.
See removeRole(RemoveRoleDelegatePtr) More...
 
cbe::util::Optional< cbe::RoleIdremoveRole (RoleId roleId, RemoveRoleError &error)
 Synchronous [non-throwing] removes a role in the specified group. Synchronous version of removeRole(roleId, RemoveRoleDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See removeRole(roleId, RemoveRoleDelegatePtr) More...
 
 Group (cbe::DefaultCtor)
 Default constructor. More...
 
 operator bool () const
 Checks if the current instance is real. More...
 

Friends

class GroupManager
 
class GroupQueryResult
 

Detailed Description

A group of members.

Member Typedef Documentation

◆ CreateGroupDelegatePtr

Pointer to CreateGroupDelegate that is passed into:
Group::createGroup(std::string,std::string,CreateGroupDelegatePtr,cbe::Visibility).

◆ CreateGroupException

See delegate::group::CreateGroupDelegate::Exception

◆ CreateGroupError

Forms the type of the error return parameter for the synchronous version of method createGroup()
See delegate::CreateGroupDelegate::ErrorInfo

◆ JoinDelegatePtr

Pointer to cbe::delegate::group::JoinDelegate that is passed into asynchronous version of method join()

◆ JoinException

◆ JoinError

Forms the type of the error return parameter for the synchronous version of method join()
See delegate::JoinDelegate::ErrorInfo

◆ LeaveDelegatePtr

Pointer to cbe::delegate::LeaveDelegate that is passed into asynchronous version of method leave()

◆ LeaveException

See delegate::group::LeaveDelegate::Exception

◆ LeaveError

Forms the type of the error return parameter for the synchronous version of method leave()
See delegate::LeaveDelegate::ErrorInfo

◆ RemoveDelegatePtr

Pointer to cbe::delegate::RemoveDelegate that is passed into asynchronous version of method remove()

◆ RemoveException

◆ RemoveError

Forms the type of the error return parameter for the synchronous version of method remove()
See delegate::group::RemoveDelegate::ErrorInfo

◆ RenameDelegatePtr

Pointer to cbe::delegate::RenameDelegate that is passed into asynchronous version of method rename()

◆ RenameException

◆ RenameError

Forms the type of the error return parameter for the synchronous version of method rename()
See delegate::group::RenameDelegate::ErrorInfo

◆ ListMembersDelegatePtr

◆ ListMembersException

See delegate::object::ListMembersDelegate::Exception

◆ ListMembersError

Forms the type of the error return parameter for the synchronous version of method listMembers()
See delegate::ListMembersDelegate::ErrorInfo

◆ ListBannedMembersDelegatePtr

◆ ListBannedMembersException

See delegate::object::ListMembersDelegate::Exception

◆ ListBannedMembersError

Forms the type of the error return parameter for the synchronous version of method listBannedMembers()
See delegate::ListMembersDelegate::ErrorInfo

◆ ListRolesDelegatePtr

Pointer to cbe::delegate::ListRolesDelegate that is passed into asynchronous version of method listRoles()

◆ ListRolesException

See delegate::object::ListRolesDelegate::Exception

◆ ListRolesError

Forms the type of the error return parameter for the synchronous version of method listRoles()
See delegate::ListRolesDelegate::ErrorInfo

◆ CreateRoleDelegatePtr

Pointer to cbe::delegate::CreateRoleDelegate that is passed into asynchronous version of method createRole()

◆ CreateRoleException

See delegate::object::CreateRoleDelegate::Exception

◆ CreateRoleError

Forms the type of the error return parameter for the synchronous version of method createRole()
See delegate::CreateRoleDelegate::ErrorInfo

◆ RemoveRoleDelegatePtr

Pointer to cbe::delegate::RemoveRoleDelegate that is passed into asynchronous version of method removeRole()

◆ RemoveRoleException

See delegate::object::RemoveRoleDelegate::Exception

◆ RemoveRoleError

Forms the type of the error return parameter for the synchronous version of method removeRole()
See delegate::RemoveRoleDelegate::ErrorInfo

Constructor & Destructor Documentation

◆ Group()

cbe::Group::Group ( cbe::DefaultCtor  )

Default constructor.

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

Member Function Documentation

◆ name()

std::string cbe::Group::name ( ) const

Returns the name of the group.

◆ id()

cbe::GroupId cbe::Group::id ( ) const

Returns the id number of the group.

◆ parentId()

cbe::GroupId cbe::Group::parentId ( ) const

Group's Parent id number.

◆ groupContainer()

cbe::Container cbe::Group::groupContainer ( ) const

Every group has a drive/container where resources can be shared with the members of the group. Works like a shared container.

◆ getVisibility()

cbe::Visibility cbe::Group::getVisibility ( ) const

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 also
Types.h for cbe::PublishVisibility enum

◆ joined()

bool cbe::Group::joined ( ) const

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()

Requests cbe::Group::requests ( ) const

Requests to join the group. To retrieve the list call listJoinRequests(cbe::GroupDelegatePtr delegate) on the group object.

◆ createGroup() [1/3]

cbe::Group cbe::Group::createGroup ( std::string  name,
std::string  memberAlias,
cbe::Visibility  visibility,
CreateGroupDelegatePtr  delegate 
)

Create a new Group.

Note
Can only be used by Tenant admin/owners to create new groups.
Parameters
nameof the group
memberAliasanother popular name
delegatePointer to a delegate::CreateGroupDelegate instance that is implemented by the user.
visibilitydefault: public
Returns
cbe::Group
See also
Types.h for cbe::visibility enum cbe::Visibility::PublicGroup or cbe::Visibility::Private

◆ createGroup() [2/3]

cbe::Group cbe::Group::createGroup ( std::string  name,
std::string  memberAlias,
cbe::Visibility  visibility 
)

Synchronous [exception] creates a new group Synchronous version of createGroup(name, memberAlias, delegate, visibility = cbe::Visibility::Public, CreateGroupDelegatePtr) , and throws an exception, CreateGroupException, in case of a failed call.
See createGroup(CreateGroupDelegatePtr)

Returns
Information about the createGroup object — if the call was successful.
See cbe::delegate::CreateGroupSuccess
Exceptions
CreateGroupException

◆ createGroup() [3/3]

cbe::util::Optional<cbe::Group> cbe::Group::createGroup ( std::string  name,
std::string  memberAlias,
cbe::Visibility  visibility,
CreateGroupError error 
)

Synchronous version of createGroup(name, memberAlias, delegate, visibility, CreateGroupDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See createGroup(name, memberAlias, delegate, visibility, CreateGroupDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the CreateGroupError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicating a failed call, and the error information is passed out via the error out/return parameter.

◆ join() [1/3]

void cbe::Group::join ( std::string  alias,
cbe::Visibility  memberVisibility,
std::string  applicationComment,
JoinDelegatePtr  delegate 
)

Synchronous [exception] 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
aliasname
delegatePointer to a delegate::group::JoinDelegate instance that is implemented by the user.
memberVisibilitydefault: public
applicationCommentmessage to the owner regarding the application to join

◆ join() [2/3]

cbe::Group cbe::Group::join ( std::string  alias,
cbe::Visibility  memberVisibility,
std::string  applicationComment 
)

Synchronous [exception] Ask to join a group. Synchronous version of join(std::string, cbe::Visibility, std::string) , and throws an exception, JoinException, in case of a failed call.
See join(JoinDelegatePtr)

Returns
Information about the Join — if the call was successful.
See cbe::delegate::JoinSuccess
Exceptions
JoinException

◆ join() [3/3]

cbe::util::Optional<cbe::Group> cbe::Group::join ( std::string  alias,
cbe::Visibility  memberVisibility,
std::string  applicationComment,
JoinError error 
)

Synchronous [non-throwing] Ask to join a group. Synchronous version of join(alias, memberVisibility, applicationComment, JoinError&,JoinDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See join(alias, memberVisibility, applicationComment, JoinError&, JoinDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the JoinError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicating a failed call, and the error information is passed out via the error out/return parameter.

◆ leave() [1/3]

void cbe::Group::leave ( LeaveDelegatePtr  delegate)

Leave group.

Parameters
delegatePointer to a delegate::LeaveDelegate instance that is implemented by the user.

◆ leave() [2/3]

delegate::LeaveSuccess cbe::Group::leave ( )

Synchronous [exception] leaves the specified group. Synchronous version of leave(LeaveDelegatePtr) , and throws an exception, LeaveException, in case of a failed call.
See leave(LeaveDelegatePtr)

Returns
Information about the leave — if the call was successful.
See cbe::delegate::LeaveSuccess
Exceptions
LeaveException

◆ leave() [3/3]

cbe::util::Optional<delegate::LeaveSuccess> cbe::Group::leave ( LeaveError error)

Synchronous [non-throwing] leaves the specified group. Synchronous version of leave(LeaveDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See leave(LeaveDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the LeaveError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicating a failed call, and the error information is passed out via the error out/return parameter.

◆ remove() [1/3]

void cbe::Group::remove ( RemoveDelegatePtr  delegate)

Remove group.

Note
This is exlusive for Tenant group owners.
Parameters
delegatePointer to a delegate::group::RemoveDelegate instance that is implemented by the user.

◆ remove() [2/3]

delegate::group::RemoveSuccess cbe::Group::remove ( )

Synchronous [exception] removes the specified group. Synchronous version of remove(RemoveDelegatePtr) , and throws an exception, RemoveException, in case of a failed call.
See remove(RemoveDelegatePtr)

Returns
Information about the removed group — if the call was successful.
See cbe::delegate::group::RemoveSuccess
Exceptions
RemoveException

◆ remove() [3/3]

Synchronous [non-throwing] removes the specified group. Synchronous version of remove(RemoveDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See remove(RemoveDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the RemoveError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicating a failed call, and the error information is passed out via the error out/return parameter.

◆ rename() [1/3]

void cbe::Group::rename ( std::string  newName,
RenameDelegatePtr  delegate 
)

Rename the Group; group id does not change.

Parameters
newNamethe new name for the group
delegatePointer to a delegate::group::RenameDelegate instance that is implemented by the user.

◆ rename() [2/3]

delegate::group::RenameSuccess cbe::Group::rename ( std::string  newName)

Synchronous [exception] renames a group Synchronous version of rename(std::string ,RenameDelegatePtr) , and throws an exception, RenameException, in case of a failed call.
See rename(RenameDelegatePtr)

Returns
Information about the renamed group — if the call was successful.
See cbe::delegate::RenameSuccess
Exceptions
RenameException

◆ rename() [3/3]

cbe::util::Optional<delegate::group::RenameSuccess> cbe::Group::rename ( std::string  newName,
RenameError error 
)

Synchronous [non-throwing] renames a group Synchronous version of rename(newName,RenameDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See rename(newName, RenameDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the RenameError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicating a failed call, and the error information is passed out via the error out/return parameter.

◆ listMembers() [1/3]

void cbe::Group::listMembers ( ListMembersDelegatePtr  delegate)

List all members in the group.

The member list is then retrieved via the delegate callback function cbe::delegate::ListMembersDelegate::onListMembersSuccess()

Parameters
delegatePointer to a delegate::ListMembersDelegate instance that is implemented by the user.

◆ listMembers() [2/3]

delegate::ListMembersDelegate::Members cbe::Group::listMembers ( )

Synchronous [exception] list members of the specifed group. Synchronous version of listMembers(ListMembersDelegatePtr) , and throws an exception, ListMembersException, in case of a failed call.
See listMembers(ListMembersDelegatePtr)

Returns
Information about the listMembers object — if the call was successful.
See cbe::delegate::ListMembersSuccess
Exceptions
ListMembersException

◆ listMembers() [3/3]

cbe::util::Optional<delegate::ListMembersDelegate::Members> cbe::Group::listMembers ( ListMembersError error)

Synchronous [non-throwing] list members of the specifed group. Synchronous version of listMembers(ListMembersDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See listMembers(ListMembersDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the ListMembersError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicating a failed call, and the error information is passed out via the error out/return parameter.

◆ listBannedMembers() [1/3]

void cbe::Group::listBannedMembers ( ListBannedMembersDelegatePtr  delegate)

Lists all banned former members, or users.

Parameters
delegatePointer to a delegate::ListMembersDelegate instance that is implemented by the user.

◆ listBannedMembers() [2/3]

std::vector<cbe::Member> cbe::Group::listBannedMembers ( )

Synchronous [exception] list the banned members of the specified group. Synchronous version of listBannedMembers(ListMembersDelegatePtr) , and throws an exception, ListBannedMembersException, in case of a failed call.
See listBannedMembers(ListMembersDelegatePtr)

Returns
Information about the listBannedMembers object — if the call was successful.
See cbe::delegate::ListBannedMembersSuccess
Exceptions
ListBannedMembersException

◆ listBannedMembers() [3/3]

cbe::util::Optional<std::vector<cbe::Member> > cbe::Group::listBannedMembers ( ListBannedMembersError error)

Synchronous [non-throwing] list the banned members of the specified group. Synchronous version of listBannedMembers(ListMembersDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See listBannedMembers(ListMembersDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the ListBannedMembersError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicating a failed call, and the error information is passed out via the error out/return parameter.

◆ listRoles() [1/3]

void cbe::Group::listRoles ( ListRolesDelegatePtr  delegate)

Lists all roles in the group.

Parameters
delegatePointer to a delegate::ListRolesDelegate instance that is implemented by the user.

◆ listRoles() [2/3]

delegate::ListRolesDelegate::Roles cbe::Group::listRoles ( )

Synchronous [exception] list roles of a group. Synchronous version of listRoles(ListRolesDelegatePtr) , and throws an exception, ListRolesException, in case of a failed call.
See listRoles(ListRolesDelegatePtr)

Returns
Information about the ListRoles object — if the call was successful.
See cbe::delegate::ListRolesDelegate::Roles
Exceptions
ListRolesException

◆ listRoles() [3/3]

cbe::util::Optional<delegate::ListRolesDelegate::Roles> cbe::Group::listRoles ( ListRolesError error)

Synchronous [non-throwing] list roles of a group. Synchronous version of listRoles(ListRolesDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See listRoles(ListRolesDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the ListRolesError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicating a failed call, and the error information is passed out via the error out/return parameter.

◆ createRole() [1/3]

void cbe::Group::createRole ( std::string  name,
CreateRoleDelegatePtr  delegate 
)

Creates a new role in the group.

Parameters
nameThe name of the role.
delegatePointer to a delegate::CreateRoleDelegate instance that is implemented by the user.

◆ createRole() [2/3]

cbe::Role cbe::Group::createRole ( std::string  name)

Synchronous [exception] creates a new role in the specified group. Synchronous version of createRole(std::string, CreateRoleDelegatePtr) , and throws an exception, CreateRoleException, in case of a failed call.
See createRole(CreateRoleDelegatePtr)

Returns
Information about the createRole object — if the call was successful.
See cbe::delegate::CreateRoleSuccess
Exceptions
CreateRoleException

◆ createRole() [3/3]

cbe::util::Optional<cbe::Role> cbe::Group::createRole ( std::string  name,
CreateRoleError error 
)

Synchronous [non-throwing] creates a new role in the specified group. Synchronous version of createRole(name,CreateRoleDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See createRole(name, CreateRoleDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the CreateRoleError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicating a failed call, and the error information is passed out via the error out/return parameter.

◆ removeRole() [1/3]

void cbe::Group::removeRole ( RoleId  roleId,
RemoveRoleDelegatePtr  delegate 
)
 @brief Removes a role in the group.

 @param roleId The id of the role to remove.

 @param delegate Pointer to a delegate::RemoveRoleDelegate instance

that is implemented by the user.

◆ removeRole() [2/3]

cbe::RoleId cbe::Group::removeRole ( RoleId  roleId)

Synchronous [exception] removes a role in the specified group. Synchronous version of removeRole(RoleId roleId, RemoveRoleDelegatePtr) , and throws an exception, RemoveRoleException, in case of a failed call.
See removeRole(RemoveRoleDelegatePtr)

Returns
Information about the removeRole object — if the call was successful.
See cbe::delegate::RemoveRoleSuccess
Exceptions
RemoveRoleException

◆ removeRole() [3/3]

cbe::util::Optional<cbe::RoleId> cbe::Group::removeRole ( RoleId  roleId,
RemoveRoleError error 
)

Synchronous [non-throwing] removes a role in the specified group. Synchronous version of removeRole(roleId, RemoveRoleDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call.
See removeRole(roleId, RemoveRoleDelegatePtr)

Parameters
[out]errorReturn parameter containing the error information in case of a failed call.
An empty return value will indicate failure, and the RemoveRoleError object passed in will we be populated with the error information.
Returns
Empty — i.e., false — indicating a failed call, and the error information is passed out via the error out/return parameter.

◆ operator bool()

cbe::Group::operator bool ( ) const
explicit

Checks if the current instance is real.

An "unreal" instance implies typically a failed event.

Relies on the Default constructor Group(cbe::DefaultCtor)

Returns
true : is real
false : unreal; got nullptr; if current instance is unbound/undefined. I.e., if it is only default constructed.

The documentation for this class was generated from the following file: