xref: /aoo41x/main/configmgr/source/README (revision e76eebc6)
1*e76eebc6SAndrew Rist#**************************************************************
2*e76eebc6SAndrew Rist#
3*e76eebc6SAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
4*e76eebc6SAndrew Rist#  or more contributor license agreements.  See the NOTICE file
5*e76eebc6SAndrew Rist#  distributed with this work for additional information
6*e76eebc6SAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
7*e76eebc6SAndrew Rist#  to you under the Apache License, Version 2.0 (the
8*e76eebc6SAndrew Rist#  "License"); you may not use this file except in compliance
9*e76eebc6SAndrew Rist#  with the License.  You may obtain a copy of the License at
10*e76eebc6SAndrew Rist#
11*e76eebc6SAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
12*e76eebc6SAndrew Rist#
13*e76eebc6SAndrew Rist#  Unless required by applicable law or agreed to in writing,
14*e76eebc6SAndrew Rist#  software distributed under the License is distributed on an
15*e76eebc6SAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*e76eebc6SAndrew Rist#  KIND, either express or implied.  See the License for the
17*e76eebc6SAndrew Rist#  specific language governing permissions and limitations
18*e76eebc6SAndrew Rist#  under the License.
19*e76eebc6SAndrew Rist#
20*e76eebc6SAndrew Rist#**************************************************************
21cdf0e10cSrcweir
22cdf0e10cSrcweirSource Overview
23cdf0e10cSrcweir===============
24cdf0e10cSrcweir
25cdf0e10cSrcweirconfigurationprovider.cxx
26cdf0e10cSrcweirconfigurationregistry.cxx
27cdf0e10cSrcweirdefaultprovider.cxx
28cdf0e10cSrcweirservices.cxx
29cdf0e10cSrcweir UNO service implementations.
30cdf0e10cSrcweir
31cdf0e10cSrcweiraccess.cxx
32cdf0e10cSrcweirchildaccess.cxx
33cdf0e10cSrcweirrootaccess.cxx
34cdf0e10cSrcweir UNO objects passed to clients.
35cdf0e10cSrcweir
36cdf0e10cSrcweircomponents.cxx
37cdf0e10cSrcweir Central singleton that aggregates all data (reads in the XML files, manages
38cdf0e10cSrcweir modifications and global notifications).
39cdf0e10cSrcweir
40cdf0e10cSrcweirgroupnode.cxx
41cdf0e10cSrcweirlocalizedpropertynode.cxx
42cdf0e10cSrcweirlocalizedvaluenode.cxx
43cdf0e10cSrcweirnode.cxx
44cdf0e10cSrcweirpropertynode.cxx
45cdf0e10cSrcweirsetnode.cxx
46cdf0e10cSrcweir Internal representations of data nodes.
47cdf0e10cSrcweir
48cdf0e10cSrcweirparsemanager.cxx
49cdf0e10cSrcweirparser.hxx
50cdf0e10cSrcweirvalueparser.cxx
51cdf0e10cSrcweirxcdparser.cxx
52cdf0e10cSrcweirxcsparser.cxx
53cdf0e10cSrcweirxcuparser.cxx
54cdf0e10cSrcweirxmldata.cxx
55cdf0e10cSrcweir XML file reading.
56cdf0e10cSrcweir
57cdf0e10cSrcweirmodifications.cxx
58cdf0e10cSrcweirwritemodfile.cxx
59cdf0e10cSrcweir Modification management.
60cdf0e10cSrcweir
61cdf0e10cSrcweirbroadcaster.cxx
62cdf0e10cSrcweir Notification management.
63cdf0e10cSrcweir
64cdf0e10cSrcweiradditions.hxx
65cdf0e10cSrcweirupdate.cxx
66cdf0e10cSrcweir Extension manager interface.
67cdf0e10cSrcweir
68cdf0e10cSrcweirdata.cxx
69cdf0e10cSrcweirlock.cxx
70cdf0e10cSrcweirnodemap.cxx
71cdf0e10cSrcweirpartial.cxx
72cdf0e10cSrcweirpath.hxx
73cdf0e10cSrcweirtype.cxx
74cdf0e10cSrcweir Utilities.
75cdf0e10cSrcweir
76cdf0e10cSrcweir
77cdf0e10cSrcweirMandatory Set Members
78cdf0e10cSrcweir=====================
79cdf0e10cSrcweir
80cdf0e10cSrcweir- A set member can be marked as "mandatory," meaning that a member of that name
81cdf0e10cSrcweirmust always be present in a set.
82cdf0e10cSrcweir
83cdf0e10cSrcweir- The above definition implies that calling replaceByName on a mandatory set
84cdf0e10cSrcweirmember is OK.
85cdf0e10cSrcweir
86cdf0e10cSrcweir- The XCU format can contain oor:mandatory attributes on nodes.  (The XCS format
87cdf0e10cSrcweirdoes not support them.  In the registrymodifications file, oor:mandatory
88cdf0e10cSrcweirattributes should never be needed, as being mandatory cannot be controlled via
89cdf0e10cSrcweirthe UNO API.)  The XCU reading code only evaluates the oor:mandatory attribute
90cdf0e10cSrcweirfor set members, and ignores it everywhere else.
91cdf0e10cSrcweir
92cdf0e10cSrcweir- Only true sets support mandatory members.  A localized property for the "*"
93cdf0e10cSrcweirlocale, though acting much like a set, does not support mandatory members.
94cdf0e10cSrcweir
95cdf0e10cSrcweir- The OpenOffice.org Registry Format document claims that group extension
96cdf0e10cSrcweirproperties are implicitly mandatory, but at least the new configmgr code does
97cdf0e10cSrcweirnot treat them like that (i.e., they can be removed again).
98cdf0e10cSrcweir
99cdf0e10cSrcweir- For simplicity, setMandatory/getMandatory are available as virtual functions
100cdf0e10cSrcweirat the base Node, even though they can only make sense for GroupNodes and
101cdf0e10cSrcweirSetNodes that are set members.  The default getMandatory implementation returns
102cdf0e10cSrcweirNO_LAYER, meaning oor:mandatory is not set to true in any layer.  (Returning
103cdf0e10cSrcweirNO_LAYER simplifies the code, e.g., removeByName does not have to check whether
104cdf0e10cSrcweirgetMandatory is called on a member of a true set to decide whether to forbid
105cdf0e10cSrcweirremoval.)
106cdf0e10cSrcweir
107cdf0e10cSrcweir- When committing changes (made through the UNO API), the "mandatory" status of
108cdf0e10cSrcweirinserted nodes must be updated (in case the insert is due to a replaceByName, or
109cdf0e10cSrcweirthe "mandatory" flag was added by a concurrent modification of a lower layer).
110cdf0e10cSrcweirAlso, for to-be-removed nodes, removal is ignored for (newly; due to concurrent
111cdf0e10cSrcweirmodification of a lower layer) mandatory nodes (but still recorded in
112cdf0e10cSrcweirregistrymodifications, so may take effect once the lower layer addition is
113cdf0e10cSrcweirremoved again---whether or not that is a good idea).
114cdf0e10cSrcweir
115cdf0e10cSrcweir
116cdf0e10cSrcweirXcuParser Modification Recording
117cdf0e10cSrcweir================================
118cdf0e10cSrcweir
119cdf0e10cSrcweir- XcuParser records modifications when reading user layer data
120cdf0e10cSrcweir(valueParser_.getLayer() == Data::NO_LAYER).
121cdf0e10cSrcweir
122cdf0e10cSrcweir- oor:finalized and oor:mandatory attributes cannot be set via the UNO API, so
123cdf0e10cSrcweirit is assumed that user layer data does not contain them (for one, they are not
124cdf0e10cSrcweirwritten by writeModFile; for another, the logic to record modifications expects
125cdf0e10cSrcweira locprop(modify,fuse) to be followed by one or more value(fuse,remove), which
126cdf0e10cSrcweirwould not necessarily be true if the locprop were only present in the user layer
127cdf0e10cSrcweirdata to flag it as finalized).
128cdf0e10cSrcweir
129cdf0e10cSrcweir- The logic to record modifications considers the top of the XML element stack.
130cdf0e10cSrcweirIn the following list of all possible cases, items marked with an asterisk are
131cdf0e10cSrcweirrecorded:
132cdf0e10cSrcweir ... group(modify,fuse) - group(modify,fuse) - ...
133cdf0e10cSrcweir ... group(modify,fuse) - set(modify,fuse) - ...
134cdf0e10cSrcweir ... group(modify,fuse) - *prop(modify,fuse,replace) - value(fuse)
135cdf0e10cSrcweir ... group(modify,fuse) - *prop(remove)
136cdf0e10cSrcweir ... group(modify,fuse) - locprop(modify,fuse) - *value(fuse)
137cdf0e10cSrcweir ... group(modify,fuse) - locprop(modify,fuse) - *value(remove)
138cdf0e10cSrcweir ... group(modify,fuse) - *locprop(replace) ...
139cdf0e10cSrcweir ... set(modify,fuse,replace) - group(modify/fuse) - ...
140cdf0e10cSrcweir ... set(modify,fuse,replace) - *group(replace/fuse) - ...
141cdf0e10cSrcweir ... set(modify,fuse,replace) - *group(remove)
142cdf0e10cSrcweir ... set(modify,fuse,replace) - set(modify/fuse) - ...
143cdf0e10cSrcweir ... set(modify,fuse,replace) - *set(replace/fuse) - ...
144cdf0e10cSrcweir ... set(modify,fuse,replace) - *set(remove)
145cdf0e10cSrcweirLegend: "...": zero or more further items
146cdf0e10cSrcweir        "- ...": one or more further items
147cdf0e10cSrcweir        "modify,fuse" etc.: any of those operations
148cdf0e10cSrcweir        "modify/fuse": a modify or a fuse on an existing member
149cdf0e10cSrcweir        "replace/fuse": a replace or a fuse on a non-existing member
150