1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 """
18 Defines the record type identifiers and various dict's to map between those and XML elements.
19 """
20
21 from caldavclientlibrary.admin.xmlaccounts import tags
22
23 recordType_users = "users"
24 recordType_groups = "groups"
25 recordType_locations = "locations"
26 recordType_resources = "resources"
27 recordType_all = "all"
28
29 RECORD_TYPES = (
30 recordType_users,
31 recordType_groups,
32 recordType_locations,
33 recordType_resources,
34 )
35 """Allowed record type identifiers."""
36
37 RECORD_TYPES_TO_TAGS = {
38 recordType_users : tags.ELEMENT_USER,
39 recordType_groups : tags.ELEMENT_GROUP,
40 recordType_locations : tags.ELEMENT_LOCATION,
41 recordType_resources : tags.ELEMENT_RESOURCE,
42 }
43 """Maps between record type identifiers and their corresponding XML element names."""
44
45 TAGS_TO_RECORD_TYPES = {
46 tags.ELEMENT_USER : recordType_users,
47 tags.ELEMENT_GROUP : recordType_groups,
48 tags.ELEMENT_LOCATION : recordType_locations,
49 tags.ELEMENT_RESOURCE : recordType_resources,
50 }
51 """Maps between XML element names and their corresponding record type identifiers."""
52