All Classes Files Functions Variables Pages
ForbiddenWords.idl
Go to the documentation of this file.
1 /**
2  * @file ForbiddenWords.idl
3  * @brief API for forbidden words configuration
4  * @version 1
5  */
6 
7  #import <kerio/web/idl/SharedStructures.idl>
8  #import <common.idl>
9  #import <Users.idl>
10 
11 module webadmin {
12 
13 /**
14  * Forbidden words
15  */
16 
17 struct ForbiddenWord {
18  kerio::web::StoreStatus status;
19  kerio::web::KId id;
20 
21  string groupName; // don't use id here, it's not referenced entry
22  kerio::web::KId groupId;
23 
24  boolean enabled;
25  long weight;
26  string keyword;
27  string description;
28 };
29 
31  string name;
32  kerio::web::KId id;
33 };
34 
35 typedef sequence<ForbiddenWord> ForbiddenWordList;
36 typedef sequence<ForbiddenWordGroup> ForbiddenWordGroupList;
37 
39  long limit;
40  boolean enabled;
41 };
42 
43 
44 interface ForbiddenWords {
45  /**
46  * get the list of forbidden words
47  * @param list - list of words and it's details
48  * @param totalItems - count of all words on server (before the start/limit applied)
49  * @param query - conditions and limits. Included from weblib.
50  * @throws kerio::web::ApiException \n
51  * -32001 Session expired. - "The user is not logged in." \n
52  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
53  */
54  void get(out ForbiddenWordList list, out long totalItems, in kerio::web::SearchQuery query);
55 
56  /**
57  * add new forbidden word
58  * @param errors - list of errors \n
59  * 1001 Already exists. - "The keyword already exists."
60  * @param result - list of IDs assigned to each item
61  * @param items - details for new words. field id is assigned by the manager to temporary value until apply() or reset().
62  * @throws kerio::web::ApiException \n
63  * -32001 Session expired. - "The user is not logged in." \n
64  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
65  */
66  void create(out kerio::web::ErrorList errors, out kerio::web::CreateResultList result, in ForbiddenWordList items);
67 
68  /**
69  * update existing forbidden word
70  * @param errors - list of errors \n
71  * 1001 Already exists. - "The keyword already exists."
72  * @param ids - ids of words to be updated.
73  * @param details - details for update. Field "kerio::web::KId" is ignored. All other fields must be filled and they are written to all words specified by ids.
74  * @throws kerio::web::ApiException \n
75  * -32001 Session expired. - "The user is not logged in." \n
76  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
77  */
78  void set(out kerio::web::ErrorList errors, in kerio::web::StringList ids, in ForbiddenWord details);
79 
80  /**
81  * remove forbidden word
82  * @param errors - list of errors
83  * @param ids - ids of words that should be removed
84  * @throws kerio::web::ApiException \n
85  * -32001 Session expired. - "The user is not logged in." \n
86  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
87  */
88  void remove(out kerio::web::ErrorList errors, in kerio::web::StringList ids);
89 
90  /**
91  * write changes cached in manager to configuration
92  * @param errors - list of errors \n
93  * 8001 Invalid params. - "Unable to add/modify keyword %1, wrong parameters." \n
94  * 8002 Database error. - "Unable to add/modify keyword %1." \n
95  * 8002 Database error. - "Unable to delete the keyword."
96  * @throws kerio::web::ApiException \n
97  * -32001 Session expired. - "The user is not logged in." \n
98  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
99  */
100  void apply(out kerio::web::ErrorList errors);
101 
102  /**
103  * discard changes cached in manager
104  * @throws kerio::web::ApiException \n
105  * -32001 Session expired. - "The user is not logged in." \n
106  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
107  */
108  void reset();
109 
110  /**
111  * Returns the Weight Limit/Enabled
112  * @param config - Complete configuration of Forbidden words module
113  * @throws kerio::web::ApiException \n
114  * -32001 Session expired. - "The user is not logged in." \n
115  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
116  */
117  void getConfig(out ForbiddenWordsConfig config);
118 
119  /**
120  * Stores the Weight Limit/Enabled
121  * @param config - Complete configuration of Forbidden words module
122  * @throws kerio::web::ApiException \n
123  * -32001 Session expired. - "The user is not logged in." \n
124  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
125  */
126  void setConfig(in ForbiddenWordsConfig config);
127 };
128 }; //webadmin
Common Kerio Control structures, enums and types.
Definition: SharedStructures.idl:139
API for Kerio Control Users.
Definition: ForbiddenWords.idl:44
Definition: ForbiddenWords.idl:17
Definition: ForbiddenWords.idl:38
Definition: Accounting.idl:11
Definition: ForbiddenWords.idl:30