All Classes Files Functions Variables Pages
UserGroups.idl
Go to the documentation of this file.
1 /**
2  * @file UserGroups.idl
3  * @brief API for Kerio Control User groups
4  * @version 1
5  */
6 
7 #import <kerio/web/idl/SharedStructures.idl>
8 #import <Users.idl>
9 
10 module webadmin {
11 
12 struct UserGroup {
13  kerio::web::KId id;
14  string name;
15  string description;
16  UserRights rights;
17 
18  UserReferenceList members;
19 };
20 
21 typedef sequence<UserGroup> UserGroupList;
22 
23 interface UserGroups {
24  /**
25  * Obtain list of groups in given domain
26  *
27  * @param list - list of groups and it's details
28  * @param totalItems - count of all groups on server (before the start/limit applied)
29  * @param query - conditions and limits
30  * @param domainId - id of domain - only groups from this domain will be listed
31  * @throws kerio::web::ApiException \n
32  * -32001 Session expired. - "The user is not logged in." \n
33  * 1000 Operation failed. - "Directory service error: %1." \n
34  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
35  */
36  void get(out UserGroupList list, out long totalItems, in kerio::web::SearchQuery query, in kerio::web::KId domainId);
37 
38  /**
39  * Add new group
40  *
41  * @param errors - list of errors \n
42  * 1000 Operation failed. - "Unable to add item." \n
43  * 1001 Already exists. - "Group %1 already exists." \n
44  * 8001 Invalid params. - "Unable to add/modify group %1, wrong parameters." \n
45  * 8002 Database error. - "Unable to add/modify group %1, it may already exist." \n
46  * @param result - list of IDs assigned to each item
47  * @param groups - details for new groups. field id is assigned by the manager to temporary value until apply() or reset().
48  * @param domainId - id of domain - specifies domain, where groups will be created (only local is supported)
49  * @throws kerio::web::ApiException \n
50  * -32001 Session expired. - "The user is not logged in." \n
51  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
52  */
53  void create(out kerio::web::ErrorList errors, out kerio::web::CreateResultList result, in UserGroupList groups, in kerio::web::KId domainId);
54 
55  /**
56  * Update groups' details
57  *
58  * @param errors - list of errors \n
59  * 1001 Already exists. - "Group %1 already exists." \n
60  * 8001 Invalid params. - "Unable to add/modify group %1, wrong parameters." \n
61  * 8002 Database error. - "Unable to add/modify group %1, it may already exist." \n
62  * @param groupIds - ids of groups to be updated.
63  * @param details - details for update. Field "kerio::web::KId" is ignored. All other values have to be present
64  * @param domainId - id of domain - groups from this domain will be updated
65  * @throws kerio::web::ApiException \n
66  * -32001 Session expired. - "The user is not logged in." \n
67  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
68  */
69  void set(out kerio::web::ErrorList errors, in kerio::web::StringList groupIds, in UserGroup details, in kerio::web::KId domainId);
70 
71  /**
72  * Delete groups
73  *
74  * @param errors - list of errors \n
75  * 1000 Operation failed. - "Unable to remove item." \n
76  * 8002 Database error. - "Unable to delete the group."
77  * @param groupIds - ids of groups that should be removed
78  * @param domainId - id of domain - specifies domain, where groups will be removed (only local is supported)
79  * @throws kerio::web::ApiException \n
80  * -32001 Session expired. - "The user is not logged in." \n
81  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
82  */
83  void remove(out kerio::web::ErrorList errors, in kerio::web::StringList groupIds, in kerio::web::KId domainId);
84 };
85 
86 }; //webadmin
Definition: SharedStructures.idl:139
API for Kerio Control Users.
Definition: Users.idl:36
Definition: UserGroups.idl:12
Definition: Accounting.idl:11
Definition: UserGroups.idl:23