All Classes Files Functions Variables Enumerations Enumerator Groups Pages
UserTemplates.idl
Go to the documentation of this file.
1 /**
2  * @file UserTemplates.idl
3  * @brief %User Templates settings
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>
12 #import <Domains.idl>
13 
14 module kerio {
15 module jsonapi {
16 module admin {
17 
18 /**
19  * User Template Scope
20  */
21 enum ValidFor {
22  OneDomain,
23  AllDomains
24 };
25 
26 /**
27  * Details of user template - meaning is the same as in structure User
28  */
29 struct UserTemplate {
30  kerio::web::KId id;
31  string name; ///< [REQUIRED FOR CREATE] [USED BY QUICKSEARCH] name of template (displayed in list of templates)
32  string description; ///< [USED BY QUICKSEARCH] description of template (displayed after its selection)
33  UserAuthType authType; ///< supported values must be retrieved from engine by ServerInfo::getSupportedAuthTypes()
34  boolean isPasswordReversible; ///< typically SHA1
35  boolean hasDefaultSpamRule; ///< should be spam rule enabled?
36  UserRight role; ///< list of user roles (excluding public/archive folder rights)
37  ValidFor scope; ///< scope of template
38  kerio::web::KId domainId; ///< not relevant for templating, only for filter (condition)
39  UserEmailAddressList emailAddresses; ///< filled only if domain is set
40  UserGroupList userGroups; ///< filled only if domain is set
41  EmailForwarding emailForwarding; ///< email forwarding setting
42  ItemCountLimit itemLimit; ///< max. number of items
43  kerio::web::SizeLimit diskSizeLimit; ///< max. disk usage
44  boolean hasDomainRestriction; ///< user can send/receive from/to his domain only
45  kerio::web::SizeLimit outMessageLimit; ///< limit of outgoing message
46  boolean publishInGal; ///< publish user in global address list
47  CleanOut cleanOutItems; ///< Items clean-out settings
48  boolean allowPasswordChange; ///< if it is set to false the password can be changed only by the administrator
49  IdEntity accessPolicy; ///< ID and name of Access Policy applied for user. Only ID is writable.
50  kerio::web::KId companyContactId; ///< ID of company contact associated with this template
51  kerio::web::KId homeServerId; ///< ID of distributed domain home server guid associated with this template
52 };
53 
54 typedef sequence<UserTemplate> UserTemplateList;
55 
56 interface UserTemplates {
57 
58  /**
59  * Create user templates.
60  *
61  * @param errors - error message list
62  * @param result - list of IDs of created templates
63  * @param userTemplates - new user template entities
64  */
65  void create(out kerio::web::ErrorList errors, out kerio::web::CreateResultList result, in UserTemplateList userTemplates);
66 
67  /**
68  * Obtain a list of user templates.
69  *
70  * @param userTemplateList - list of user templates
71  * @param totalItems - number of all returned templates
72  * @param query - query attributes and limits
73  */
74  void get(out UserTemplateList userTemplateList, out long totalItems, in kerio::web::SearchQuery query);
75 
76  /**
77  * Obtain a list of user templates capable to be used for AddUser to specified domain (domainId).
78  * This method is valid only for an account admin.
79  * - DomainId must be their own domain.
80  * - Only templates without administrative rights are listed.
81  *
82  * @param userTemplateList - list of user templates
83  * @param domainId - only templates with this domain and templates without domain are listed
84  */
85  void getAvailable(out UserTemplateList userTemplateList, in kerio::web::KId domainId);
86 
87  /**
88  * Remove list of user template records.
89  *
90  * @param errors - error message list
91  * @param idList - list of identifiers of deleted user templates
92  */
93  void remove(out kerio::web::ErrorList errors, in kerio::web::KIdList idList);
94 
95  /**
96  * Set user templates according a given pattern.
97  *
98  * @param errors - error message list
99  * @param idList - list of domain global identifier(s) of items to be changed
100  * @param pattern - pattern to use for new values
101  */
102  void set(out kerio::web::ErrorList errors, in kerio::web::KIdList idList, in UserTemplate pattern);
103 };
104 
105 }; }; };//end of namespace