All Classes Files Functions Variables Pages
Domains.idl
Go to the documentation of this file.
1 /**
2  * @file Domains.idl
3  * @brief API for User Domains
4  * @version 5
5  */
6 
7 
8 #import <kerio/web/idl/SharedStructures.idl>
9 #import <common.idl>
10 #import <Users.idl>
11 
12 module webadmin {
13 
14 /**
15  * Common part, that can be shared between the products
16  */
17 
18 enum DirectoryServiceType {
19  WindowsActiveDirectory, ///< Windows Active Directory
20  AppleDirectoryKerberos, ///< Apple Open Directory with Kerberos authentication
21  AppleDirectoryPassword ///< Apple Open Directory with Password Server authentication
22 };
23 
25  boolean enabled;
26 
27  DirectoryServiceType type;
28  string domainName;
29 
30  string userName;
31  string password;
32 
33  boolean useSpecificServers; ///< valid for type WindowsActiveDirectory
34  string primaryServer;
35  string secondaryServer;
36 };
37 
39  boolean ldapSecure;
40  kerio::web::OptionalString kerberosRealm; ///< valid for type AppleDirectoryKerberos
41  kerio::web::OptionalString ldapSearchSuffix; ///< valid for type AppleDirectory*
42 };
43 
44 /**
45  * Common part for testDomainController
46  */
48  kerio::web::KId id;
49  DirectoryService service;
50  DirectoryServiceAdvanced advanced;
51 };
52 
53 /**
54  * Product dependent part
55  */
56 
57 struct Domain {
58  kerio::web::KId id; /**< id or special value "local" for DomainLocal type */
59  kerio::web::StoreStatus status;
60 
61  /*@{ Shared part */
62  DirectoryService service;
63  DirectoryServiceAdvanced advanced;
64  /*@}*/
65 
66  string description;
67  boolean primary;
68 
69  /*@{ Type WindowsActiveDirectory and primary == true */
70  boolean authenticationOnly;
71  boolean ntAuthMode;
72  boolean adAutoImport;
73  /*@}*/
74 
75  UserData templateData;
76 };
77 
78 typedef sequence<Domain> DomainList;
79 
80 struct TestResult {
81  boolean successful;
82  string errorMessage;
83 };
84 
85 interface Domains {
86  /**
87  * Obtain list of domains
88  * @param list - list of domains and it's details
89  * @param totalItems - count of all domains on server (before the start/limit applied)
90  * @param query - conditions and limits
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 get(out DomainList list, out long totalItems, in kerio::web::SearchQuery query);
96 
97  /**
98  * Add new domain
99  * @param errors - list of errors \n
100  * 1001 Already exists. - "Domain %1 already exists." \n
101  * 8001 Invalid params. - "Unable to add/modify domain %1, wrong parameters."
102  * @param result - list of IDs assigned to each item
103  * @param domains - details for new domains. field id is assigned by the manager to temporary value until apply() or reset().
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 create(out kerio::web::ErrorList errors, out kerio::web::CreateResultList result, in DomainList domains);
109 
110  /**
111  * Update domains' details
112  * @param errors - list of errors \n
113  * 1001 Already exists. - "Domain %1 already exists." \n
114  * 8001 Invalid params. - "Error: multiple primary domains." \n
115  * 8001 Invalid params. - "Unable to add/modify domain %1, wrong parameters."
116  * @param domainIds - ids of domains to be updated.
117  * @param pattern - details for update. Field "kerio::web::KId" is ignored. All other fields except password must be filled and they are written to all domains specified by domainIds.
118  * @throws kerio::web::ApiException \n
119  * -32001 Session expired. - "The user is not logged in." \n
120  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
121  */
122  void set(out kerio::web::ErrorList errors, in kerio::web::KIdList domainIds, in Domain pattern);
123 
124  /**
125  * Delete domains
126  * @param errors - list of errors \n
127  * 8001 Invalid params. - "Unable to remove the local domain." \n
128  * 8002 Database error. - "Unable to delete the domain."
129  * @param domainIds - ids of domains that should be removed
130  * @throws kerio::web::ApiException \n
131  * -32001 Session expired. - "The user is not logged in." \n
132  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
133  */
134  void remove(out kerio::web::ErrorList errors, in kerio::web::KIdList domainIds);
135 
136  /**
137  * Test of domain accessibility
138  * @param errors - Various error messages related to given data, indexed by values in "hostnames" parameter, contains leading '.'
139  * @param hostnames - List of servers, that will be used instead of servers in DirectoryService. Empty string means, that server should be autodetected
140  * @param directory - domain parameters for connection test
141  * @throws kerio::web::ApiException \n
142  * -32001 Session expired. - "The user is not logged in." \n
143  * 1004 Access denied. - "Insufficient rights to perform the requested operation." \n
144  * 8001 Invalid params. - "Unable to read the stored password."
145  * @note: Members useSpecificServers, primaryServer and secondaryServer from DirectoryService are not used in this method
146  */
147  void testDomainController(out kerio::web::ErrorList errors, in kerio::web::StringList hostnames, in DirectoryServiceConfiguration directory);
148 
149  /**
150  * write changes cached in manager to configuration
151  * @param errors - list of errors \n
152  * 8001 Invalid params. - "Unable to add/modify domain %1, wrong parameters." \n
153  * 8002 Database error. - "Unable to add/modify domain %1." \n
154  * 8002 Database error. - "Unable to delete the domain."
155  * @throws kerio::web::ApiException \n
156  * -32001 Session expired. - "The user is not logged in." \n
157  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
158  */
159  void apply(out kerio::web::ErrorList errors);
160 
161  /**
162  * discard changes cached in manager
163  * @throws kerio::web::ApiException \n
164  * -32001 Session expired. - "The user is not logged in." \n
165  * 1004 Access denied. - "Insufficient rights to perform the requested operation."
166  */
167  void reset();
168 };
169 
170 }; //webadmin
Definition: Domains.idl:47
Common Kerio Control structures, enums and types.
Definition: SharedStructures.idl:139
API for Kerio Control Users.
Definition: Domains.idl:24
boolean useSpecificServers
valid for type WindowsActiveDirectory
Definition: Domains.idl:33
Definition: Domains.idl:57
kerio::web::KId id
Definition: Domains.idl:58
kerio::web::OptionalString kerberosRealm
valid for type AppleDirectoryKerberos
Definition: Domains.idl:40
Definition: Accounting.idl:11
Definition: Domains.idl:85
Definition: SharedStructures.idl:289
Definition: Domains.idl:38
Definition: Domains.idl:80
kerio::web::OptionalString ldapSearchSuffix
valid for type AppleDirectory*
Definition: Domains.idl:41
Definition: Users.idl:77