All Classes Files Functions Variables Pages
UrlGroups.idl
Go to the documentation of this file.
1 /**
2  * @file UrlGroups.idl
3  * @brief API for Url groups
4  * @version 2
5  */
6 
7 #import <kerio/web/idl/SharedStructures.idl>
8 
9 module webadmin {
10 
11 enum UrlEntryType {
12  Url,
13  UrlChildGroup
14 };
15 
16 struct UrlGroup {
17  kerio::web::KId id;
18  string name;
19 };
20 
21 struct UrlEntry {
22  kerio::web::KId id;
23  kerio::web::KId groupId;
24  kerio::web::KId sharedId; ///< read-only; filled when the item is shared in MyKerio
25  string groupName;
26  string description;
27 
28  UrlEntryType type;
29  boolean enabled;
30  kerio::web::StoreStatus status;
31 
32  /*@{ url */
33  string url;
34  boolean isRegex;
35  /*@}*/
36 
37  /*@{ group */
38  kerio::web::KId childGroupId;
39  string childGroupName; /**< ignored upon update */
40  /*@}*/
41 };
42 
43 typedef sequence<UrlEntry> UrlEntryList;
44 typedef sequence<UrlGroup> UrlGroupList;
45 
46 interface UrlGroups {
47 
48  /**
49  * get the list of Url groups
50  * @param list - list of groups and it's details
51  * @param totalItems - count of all groups on server (before the start/limit applied)
52  * @param query - conditions and limits. Included from weblib. Kerio Control engine implementation notes: \n
53  * - LIKE matches substring (second argument) in a string (first argument). There are no wildcards. \n
54  * - sort and match are case insensitive. \n
55  * - column alias (first operand): \n
56  * - TODO: "QUICKSEARCH" - requested operator applied as following: (name operator secondOperand ) || (description operator secondOperand)
57  * @throws kerio::web::ApiException \n
58  * -32001 Session expired. - "The user is not logged in." \n
59  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
60  */
61  void get(out UrlEntryList list, out long totalItems, in kerio::web::SearchQuery query);
62 
63  /**
64  * add new groups
65  * @param errors - list of errors \n
66  * 1001 Already exists. - "The URL group already exists."
67  * @param result - list of IDs assigned to each item
68  * @param groups - details for new groups. field id is assigned by the manager to temporary value until apply() or reset().
69  * @throws kerio::web::ApiException \n
70  * -32001 Session expired. - "The user is not logged in." \n
71  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
72  */
73  void create(out kerio::web::ErrorList errors, out kerio::web::CreateResultList result, in UrlEntryList groups);
74 
75  /**
76  * update existing groups
77  * @param errors - list of errors \n
78  * 1001 Already exists. - "The URL group already exists."
79  * @param groupIds - ids of groups to be updated.
80  * @param details - details for update. Field "kerio::web::KId" is ignored. All other fields must be filled and they are written to all groups specified by groupIds.
81  * @throws kerio::web::ApiException \n
82  * -32001 Session expired. - "The user is not logged in." \n
83  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
84  */
85  void set(out kerio::web::ErrorList errors, in kerio::web::StringList groupIds, in UrlEntry details);
86 
87  /**
88  * remove groups
89  * @param errors - list of errors TODO write particular errors
90  * @param groupIds - ids of groups that should be removed
91  * @throws kerio::web::ApiException \n
92  * -32001 Session expired. - "The user is not logged in." \n
93  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
94  */
95  void remove(out kerio::web::ErrorList errors, in kerio::web::StringList groupIds);
96 
97  /**
98  * write changes cached in manager to configuration
99  * @param errors - list of errors \n
100  * 8001 Invalid params. - "Unable to add/modify URL group %1, wrong parameters." \n
101  * 8002 Database error. - "Unable to add/modify URL group %1." \n
102  * 8002 Database error. - "Unable to delete URL group." \n
103  * @throws kerio::web::ApiException \n
104  * -32001 Session expired. - "The user is not logged in." \n
105  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
106  */
107  void apply(out kerio::web::ErrorList errors);
108 
109  /**
110  * discard changes cached in manager
111  * @throws kerio::web::ApiException \n
112  * -32001 Session expired. - "The user is not logged in." \n
113  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
114  */
115  void reset();
116 
117  /**
118  * get the list of groups, sorted in asc order
119  * @throws kerio::web::ApiException \n
120  * -32001 Session expired. - "The user is not logged in." \n
121  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
122  */
123  void getGroupList(out UrlGroupList groups);
124 };
125 
126 }; //webadmin
Definition: UrlGroups.idl:16
Definition: SharedStructures.idl:139
Definition: UrlGroups.idl:21
Definition: UrlGroups.idl:46
Definition: Accounting.idl:11
string childGroupName
Definition: UrlGroups.idl:39
kerio::web::KId sharedId
read-only; filled when the item is shared in MyKerio
Definition: UrlGroups.idl:24