4 #ifndef INCLUDE_CBE_GROUP_H_
5 #define INCLUDE_CBE_GROUP_H_
8 #include "cbe/util/Context.h"
9 #include "cbe/Member.h"
10 #include "cbe/Types.h"
12 #include "cbe/delegate/Error.h"
13 #include "cbe/delegate/CreateGroupDelegate.h"
14 #include "cbe/delegate/CreateRoleDelegate.h"
15 #include "cbe/delegate/LeaveDelegate.h"
16 #include "cbe/delegate/ListMembersDelegate.h"
17 #include "cbe/delegate/ListRolesDelegate.h"
18 #include "cbe/delegate/RemoveRoleDelegate.h"
20 #include "cbe/delegate/group/JoinDelegate.h"
21 #include "cbe/delegate/group/RemoveDelegate.h"
22 #include "cbe/delegate/group/RenameDelegate.h"
24 #include "cbe/delegate/Error.h"
25 #include "cbe/util/ErrorInfo.h"
26 #include "cbe/util/Exception.h"
27 #include "cbe/util/Optional.h"
31 using GroupPtr = std::shared_ptr<CBI::Group>;
32 class GroupEventProtocol;
33 using GroupDelegatePtr = std::shared_ptr<GroupEventProtocol>;
81 using Requests = std::vector<cbe::Request>;
106 std::string memberAlias,
114 using CreateGroupException = delegate::CreateGroupDelegate::Exception;
132 std::string memberAlias,
163 std::string memberAlias,
165 CreateGroupError& error);
191 std::string applicationComment,
198 using JoinException = delegate::group::JoinDelegate::Exception;
215 std::string applicationComment);
247 std::string applicationComment,
269 using LeaveException = delegate::LeaveDelegate::Exception;
337 using RemoveException = delegate::group::RemoveDelegate::Exception;
402 using RenameException = delegate::group::RenameDelegate::Exception;
471 using ListMembersException = delegate::ListMembersDelegate::Exception;
485 delegate::ListMembersDelegate::Members
listMembers();
515 ListMembersError& error);
536 using ListBannedMembersException = delegate::ListMembersDelegate::Exception;
580 ListBannedMembersError& error);
601 using ListRolesException = delegate::ListRolesDelegate::Exception;
615 delegate::ListRolesDelegate::Roles
listRoles();
645 ListRolesError& error);
667 using CreateRoleException = delegate::CreateRoleDelegate::Exception;
711 CreateRoleError& error);
733 using RemoveRoleException = delegate::RemoveRoleDelegate::Exception;
777 RemoveRoleError& error);
804 explicit operator bool()
const;
808 std::shared_ptr<Impl> pImpl{};
811 Group(CBI::GroupPtr cbiPeerPtr);
812 CBI::Group& getCbiPeer()
const;
A collection of Item, can also represent a table or folder.
Definition: Container.h:63
For managing the groups.
Definition: GroupManager.h:30
Resultset of data retrieved in a search for Group.
Definition: GroupQueryResult.h:27
A group of members.
Definition: Group.h:42
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,...
cbe::Container groupContainer() const
void listBannedMembers(ListBannedMembersDelegatePtr delegate)
Lists all banned former members, or users.
void listMembers(ListMembersDelegatePtr delegate)
List all members in the group.
delegate::LeaveDelegatePtr LeaveDelegatePtr
Definition: Group.h:256
void rename(std::string newName, RenameDelegatePtr delegate)
Rename the Group; group id does not change.
delegate::group::JoinDelegatePtr JoinDelegatePtr
Definition: Group.h:173
void remove(RemoveDelegatePtr delegate)
Remove group.
delegate::ListMembersDelegatePtr ListMembersDelegatePtr
Definition: Group.h:455
delegate::CreateRoleDelegatePtr CreateRoleDelegatePtr
Definition: Group.h:653
cbe::Visibility getVisibility() const
void createRole(std::string name, CreateRoleDelegatePtr delegate)
Creates a new role in the group.
delegate::group::RemoveDelegatePtr RemoveDelegatePtr
Definition: Group.h:322
delegate::group::RenameDelegatePtr RenameDelegatePtr
Definition: Group.h:389
void listRoles(ListRolesDelegatePtr delegate)
Lists all roles in the group.
Requests requests() const
Group(cbe::DefaultCtor)
Default constructor.
cbe::GroupId parentId() const
void removeRole(RoleId roleId, RemoveRoleDelegatePtr delegate)
delegate::ListRolesDelegatePtr ListRolesDelegatePtr
Definition: Group.h:588
cbe::Group createGroup(std::string name, std::string memberAlias, cbe::Visibility visibility, CreateGroupDelegatePtr delegate)
Create a new Group.
void leave(LeaveDelegatePtr delegate)
Leave group.
delegate::RemoveRoleDelegatePtr RemoveRoleDelegatePtr
Definition: Group.h:719
delegate::CreateGroupDelegatePtr CreateGroupDelegatePtr
Definition: Group.h:91
delegate::ListMembersDelegatePtr ListBannedMembersDelegatePtr
Definition: Group.h:523
User role information.
Definition: Role.h:34
Definition: LeaveDelegate.h:64
Convenience type that bundles all parameters passed to method cbe::delegate::group::RemoveDelegate::o...
Definition: RemoveDelegate.h:76
Convenience type that bundles all parameters passed to method cbe::delegate::group::RenameDelegate::o...
Definition: RenameSuccess.h:17
Class template Optional manages an optional contained value - i.e., a value that is either present or...
Definition: Optional.h:20
std::shared_ptr< RenameDelegate > RenameDelegatePtr
Definition: RenameDelegate.h:63
std::shared_ptr< RemoveDelegate > RemoveDelegatePtr
Definition: RemoveDelegate.h:69
std::shared_ptr< JoinDelegate > JoinDelegatePtr
Definition: JoinDelegate.h:65
std::shared_ptr< CreateGroupDelegate > CreateGroupDelegatePtr
Definition: CreateGroupDelegate.h:63
std::shared_ptr< CreateRoleDelegate > CreateRoleDelegatePtr
Definition: CreateRoleDelegate.h:60
std::shared_ptr< ListRolesDelegate > ListRolesDelegatePtr
Definition: ListRolesDelegate.h:66
std::shared_ptr< ListMembersDelegate > ListMembersDelegatePtr
Definition: ListMembersDelegate.h:68
std::shared_ptr< RemoveRoleDelegate > RemoveRoleDelegatePtr
Definition: RemoveRoleDelegate.h:60
std::shared_ptr< LeaveDelegate > LeaveDelegatePtr
Definition: LeaveDelegate.h:63
Root namespace for the CloudBackend SDK API.
Definition: Account.h:22
std::uint64_t RoleId
Uniquely identifies the Role.
Definition: Types.h:108
Visibility
Definition: Types.h:375
DefaultCtor
Default constructor marker.
Definition: Types.h:204
std::uint64_t GroupId
Uniquely identifies the Group.
Definition: Types.h:84
Definition: CreateGroupDelegate.h:42
Definition: CreateRoleDelegate.h:39
Definition: LeaveDelegate.h:42
Definition: ListMembersDelegate.h:44
Definition: ListRolesDelegate.h:42
Definition: RemoveRoleDelegate.h:39
Definition: JoinDelegate.h:42
Definition: RemoveDelegate.h:45
Definition: RenameDelegate.h:41