All Classes Files Functions Variables Enumerations Enumerator Groups Pages
Groups.idl
Go to the documentation of this file.
1 /**
2  * @file Groups.idl
3  * @brief Work with user account groups.
4  *
5  * @author Dusan Juhas
6  *
7  * @copyright Copyright © 2017 Kerio Technologies s.r.o.
8  */
9 
10 #import <kerio/web/idl/SharedStructures.idl>
11 #import <Users.idl> //UserRoleType
12 
13 module kerio {
14 module jsonapi {
15 module admin {
16 
17 /**
18  * Group details
19  */
20 struct Group {
21  kerio::web::KId id; ///< global identification of group
22  kerio::web::KId domainId; ///< identification in which domain group exists
23  string name; ///< group name
24  kerio::web::StringList emailAddresses; ///< group email addresses
25  UserRoleType role; ///< access rights list
26  boolean hasDomainRestriction; ///< user can send/receive from/to his domain only
27  string description; ///< description
28  DataSource itemSource; ///< internal database or mapped from LDAP?
29  boolean publishInGal; ///< publish user in global address list? - default is true
30 };
31 
32 /**
33  * List of groups
34  */
35 typedef sequence<Group> GroupList;
36 
38  kerio::web::KId groupId; ///< ID of group to be removed
39  DirectoryServiceDeleteMode mode; ///< delete mode
40 };
41 
42 typedef sequence<GroupRemovalRequest> GroupRemovalRequestList;
43 
44 /**
45  * Group management
46  */
47 interface Groups {
48 
49  /**
50  * Activate groups from a directory service
51  *
52  * @param errors - list of error messages for appropriate groups
53  * @param userIdList - list of global groups identifiers
54  */
55  void activate(out kerio::web::ErrorList errors, in kerio::web::KIdList groupIdList);
56 
57  /**
58  * Add new member(s) to a group.
59  *
60  * @param errors - error message list
61  * @param groupId - global group identifier
62  * @param userList - list of global identifiers of users to be added to a group
63  */
64  void addMemberList(out kerio::web::ErrorList errors, in kerio::web::KId groupId, in kerio::web::KIdList userList);
65 
66  /**
67  * Create new groups.
68  *
69  * @param errors - error message list
70  * @param result - list of IDs of created groups
71  * @param groups - new group entities
72  */
73  void create(out kerio::web::ErrorList errors, out kerio::web::CreateResultList result, in GroupList groups);
74 
75  /**
76  * Create new groups in directory service.
77  *
78  * @param errors - error message list
79  * @param result - list of IDs of created groups
80  * @param groups - new group entities
81  */
82  void createLdap(out kerio::web::ErrorList errors, out kerio::web::CreateResultList result, in GroupList groups);
83 
84  /**
85  * Obtain a list of groups.
86  *
87  * @param list - groups
88  * @param totalItems - amount of groups for given search condition, useful when limit is defined in searchquery
89  * @param query - query conditions and limits
90  * @param domainName - domain identification
91  */
92  void get(out GroupList list, out long totalItems, in kerio::web::SearchQuery query, in kerio::web::KId domainId);
93 
94  /**
95  * Remove groups.
96  *
97  * Note: it is not necessary to remove members before deleting a group
98  * @param errors - error message list
99  * @param groupIds - list of global identifiers of group(s) to be deleted
100  */
101  void remove(out kerio::web::ErrorList errors, in GroupRemovalRequestList requests);
102 
103  /**
104  * Remove member(s) from a group.
105  *
106  * @param errors - error message list
107  * @param groupId - global group identifier
108  * @param userIds - list of global identifiers of users to be add to a group
109  */
110  void removeMemberList(out kerio::web::ErrorList errors, in kerio::web::KId groupId, in kerio::web::KIdList userIds);
111 
112  /**
113  * Create a new group.
114  *
115  * @param errors - error message list
116  * @param groupIds - a list group global identifier(s)
117  * @param pattern - pattern to use for new values
118  */
119  void set(out kerio::web::ErrorList errors, in kerio::web::KIdList groupIds, in Group pattern);
120 };
121 
122 }; }; };//end of namespace