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

For managing the groups. More...

#include <GroupManager.h>

Public Types

using ListGroupsDelegatePtr = delegate::ListGroupsDelegatePtr
 
using ListGroupsException = delegate::ListGroupsDelegate::Exception
 
using ListGroupsError = delegate::ListGroupsDelegate::ErrorInfo
 
using SearchGroupsDelegatePtr = delegate::SearchGroupsDelegatePtr
 
using SearchGroupsException = delegate::SearchGroupsDelegate::Exception
 
using SearchGroupsError = delegate::SearchGroupsDelegate::ErrorInfo
 

Public Member Functions

void listGroups (ListGroupsDelegatePtr delegate)
 
std::vector< cbe::GrouplistGroups ()
 Synchronous [exception] Synchronous version of listGroups(ListGroupsDelegatePtr) , and throws an exception, ListGroupsException, in case of a failed call.
See listGroups(ListGroupsDelegatePtr) More...
 
cbe::util::Optional< std::vector< cbe::Group > > listGroups (ListGroupsError &error)
 Synchronous [non-throwing] Synchronous version of listGroups(ListGroupsDelegatePtr) , 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 listGroups(ListGroupsDelegatePtr) More...
 
void searchGroups (cbe::GroupFilter filter, SearchGroupsDelegatePtr delegate, cbe::GroupId parentGroupId=0)
 
delegate::SearchGroupsDelegate::Success searchGroups (cbe::GroupFilter filter, cbe::GroupId parentGroupId=0)
 Synchronous [exception] Synchronous version of searchGroups(filter, SearchGroupsDelegatePtr, parentGroupId = 0) , and throws an exception, SearchGroupsException, in case of a failed call.
See searchGroups(SearchGroupsDelegatePtr) More...
 
cbe::util::Optional< delegate::SearchGroupsDelegate::SuccesssearchGroups (cbe::GroupFilter filter, cbe::GroupId parentGroupId, SearchGroupsError &error)
 Synchronous [non-throwing] Synchronous version of searchGroups(filter, parentGroupId, SearchGroupsDelegatePtr) , 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 searchGroups(filter, parentGroupId, SearchGroupsDelegatePtr) More...
 
cbe::GroupId getTenantId () const
 
 GroupManager (cbe::DefaultCtor)
 Default constructor. More...
 
 operator bool () const
 Checks if the current instance is real. More...
 

Friends

class CloudBackend
 

Detailed Description

For managing the groups.

Member Typedef Documentation

◆ ListGroupsDelegatePtr

◆ ListGroupsException

See delegate::object::ListGroupsDelegate::Exception

◆ ListGroupsError

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

◆ SearchGroupsDelegatePtr

◆ SearchGroupsException

Pointer to cbe::delegate::SearchGroupsDelegate that is passed into asynchronous version of method searchGroups() See delegate::object::SearchGroupsDelegate::Exception

◆ SearchGroupsError

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

Constructor & Destructor Documentation

◆ GroupManager()

cbe::GroupManager::GroupManager ( cbe::DefaultCtor  )

Default constructor.

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

Member Function Documentation

◆ listGroups() [1/3]

void cbe::GroupManager::listGroups ( ListGroupsDelegatePtr  delegate)

List all current joined groups.

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

◆ listGroups() [2/3]

std::vector<cbe::Group> cbe::GroupManager::listGroups ( )

Synchronous [exception] Synchronous version of listGroups(ListGroupsDelegatePtr) , and throws an exception, ListGroupsException, in case of a failed call.
See listGroups(ListGroupsDelegatePtr)

Returns
Information about the listGroups object — if the call was successful.
See cbe::ListGroupsDelegate::Groups
Exceptions
ListGroupsException

◆ listGroups() [3/3]

cbe::util::Optional<std::vector<cbe::Group> > cbe::GroupManager::listGroups ( ListGroupsError error)

Synchronous [non-throwing] Synchronous version of listGroups(ListGroupsDelegatePtr) , 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 listGroups(ListGroupsDelegatePtr)

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

◆ searchGroups() [1/3]

void cbe::GroupManager::searchGroups ( cbe::GroupFilter  filter,
SearchGroupsDelegatePtr  delegate,
cbe::GroupId  parentGroupId = 0 
)

Search for open public groups.

Parameters
filteris a group filter to set search criteria for open public groups. Look att class GroupFilter for more information.
delegatePointer to a delegate::SearchGroupsDelegate instance that is implemented by the user.
parentGroupIdis the id of the group to be searched within. If this is not set the tenant id will be used.

◆ searchGroups() [2/3]

delegate::SearchGroupsDelegate::Success cbe::GroupManager::searchGroups ( cbe::GroupFilter  filter,
cbe::GroupId  parentGroupId = 0 
)

Synchronous [exception] Synchronous version of searchGroups(filter, SearchGroupsDelegatePtr, parentGroupId = 0) , and throws an exception, SearchGroupsException, in case of a failed call.
See searchGroups(SearchGroupsDelegatePtr)

Returns
Information about the searchGroups object — if the call was successful.
See cbe::delegate::SearchGroupsDelegate::Success
Exceptions
SearchGroupsException

◆ searchGroups() [3/3]

cbe::util::Optional<delegate::SearchGroupsDelegate::Success> cbe::GroupManager::searchGroups ( cbe::GroupFilter  filter,
cbe::GroupId  parentGroupId,
SearchGroupsError error 
)

Synchronous [non-throwing] Synchronous version of searchGroups(filter, parentGroupId, SearchGroupsDelegatePtr) , 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 searchGroups(filter, parentGroupId, SearchGroupsDelegatePtr)

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

◆ getTenantId()

cbe::GroupId cbe::GroupManager::getTenantId ( ) const

Returns the tenant id of the Tenant user group that the user is in.

◆ operator bool()

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

Checks if the current instance is real.

An "unreal" instance implies typically a failed event.

Relies on the Default constructor GroupManager(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: