xref: /aoo4110/main/configmgr/source/README (revision b1cdbd2c)
1*b1cdbd2cSJim Jagielski#**************************************************************
2*b1cdbd2cSJim Jagielski#
3*b1cdbd2cSJim Jagielski#  Licensed to the Apache Software Foundation (ASF) under one
4*b1cdbd2cSJim Jagielski#  or more contributor license agreements.  See the NOTICE file
5*b1cdbd2cSJim Jagielski#  distributed with this work for additional information
6*b1cdbd2cSJim Jagielski#  regarding copyright ownership.  The ASF licenses this file
7*b1cdbd2cSJim Jagielski#  to you under the Apache License, Version 2.0 (the
8*b1cdbd2cSJim Jagielski#  "License"); you may not use this file except in compliance
9*b1cdbd2cSJim Jagielski#  with the License.  You may obtain a copy of the License at
10*b1cdbd2cSJim Jagielski#
11*b1cdbd2cSJim Jagielski#    http://www.apache.org/licenses/LICENSE-2.0
12*b1cdbd2cSJim Jagielski#
13*b1cdbd2cSJim Jagielski#  Unless required by applicable law or agreed to in writing,
14*b1cdbd2cSJim Jagielski#  software distributed under the License is distributed on an
15*b1cdbd2cSJim Jagielski#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b1cdbd2cSJim Jagielski#  KIND, either express or implied.  See the License for the
17*b1cdbd2cSJim Jagielski#  specific language governing permissions and limitations
18*b1cdbd2cSJim Jagielski#  under the License.
19*b1cdbd2cSJim Jagielski#
20*b1cdbd2cSJim Jagielski#**************************************************************
21*b1cdbd2cSJim Jagielski
22*b1cdbd2cSJim JagielskiSource Overview
23*b1cdbd2cSJim Jagielski===============
24*b1cdbd2cSJim Jagielski
25*b1cdbd2cSJim Jagielskiconfigurationprovider.cxx
26*b1cdbd2cSJim Jagielskiconfigurationregistry.cxx
27*b1cdbd2cSJim Jagielskidefaultprovider.cxx
28*b1cdbd2cSJim Jagielskiservices.cxx
29*b1cdbd2cSJim Jagielski UNO service implementations.
30*b1cdbd2cSJim Jagielski
31*b1cdbd2cSJim Jagielskiaccess.cxx
32*b1cdbd2cSJim Jagielskichildaccess.cxx
33*b1cdbd2cSJim Jagielskirootaccess.cxx
34*b1cdbd2cSJim Jagielski UNO objects passed to clients.
35*b1cdbd2cSJim Jagielski
36*b1cdbd2cSJim Jagielskicomponents.cxx
37*b1cdbd2cSJim Jagielski Central singleton that aggregates all data (reads in the XML files, manages
38*b1cdbd2cSJim Jagielski modifications and global notifications).
39*b1cdbd2cSJim Jagielski
40*b1cdbd2cSJim Jagielskigroupnode.cxx
41*b1cdbd2cSJim Jagielskilocalizedpropertynode.cxx
42*b1cdbd2cSJim Jagielskilocalizedvaluenode.cxx
43*b1cdbd2cSJim Jagielskinode.cxx
44*b1cdbd2cSJim Jagielskipropertynode.cxx
45*b1cdbd2cSJim Jagielskisetnode.cxx
46*b1cdbd2cSJim Jagielski Internal representations of data nodes.
47*b1cdbd2cSJim Jagielski
48*b1cdbd2cSJim Jagielskiparsemanager.cxx
49*b1cdbd2cSJim Jagielskiparser.hxx
50*b1cdbd2cSJim Jagielskivalueparser.cxx
51*b1cdbd2cSJim Jagielskixcdparser.cxx
52*b1cdbd2cSJim Jagielskixcsparser.cxx
53*b1cdbd2cSJim Jagielskixcuparser.cxx
54*b1cdbd2cSJim Jagielskixmldata.cxx
55*b1cdbd2cSJim Jagielski XML file reading.
56*b1cdbd2cSJim Jagielski
57*b1cdbd2cSJim Jagielskimodifications.cxx
58*b1cdbd2cSJim Jagielskiwritemodfile.cxx
59*b1cdbd2cSJim Jagielski Modification management.
60*b1cdbd2cSJim Jagielski
61*b1cdbd2cSJim Jagielskibroadcaster.cxx
62*b1cdbd2cSJim Jagielski Notification management.
63*b1cdbd2cSJim Jagielski
64*b1cdbd2cSJim Jagielskiadditions.hxx
65*b1cdbd2cSJim Jagielskiupdate.cxx
66*b1cdbd2cSJim Jagielski Extension manager interface.
67*b1cdbd2cSJim Jagielski
68*b1cdbd2cSJim Jagielskidata.cxx
69*b1cdbd2cSJim Jagielskilock.cxx
70*b1cdbd2cSJim Jagielskinodemap.cxx
71*b1cdbd2cSJim Jagielskipartial.cxx
72*b1cdbd2cSJim Jagielskipath.hxx
73*b1cdbd2cSJim Jagielskitype.cxx
74*b1cdbd2cSJim Jagielski Utilities.
75*b1cdbd2cSJim Jagielski
76*b1cdbd2cSJim Jagielski
77*b1cdbd2cSJim JagielskiMandatory Set Members
78*b1cdbd2cSJim Jagielski=====================
79*b1cdbd2cSJim Jagielski
80*b1cdbd2cSJim Jagielski- A set member can be marked as "mandatory," meaning that a member of that name
81*b1cdbd2cSJim Jagielskimust always be present in a set.
82*b1cdbd2cSJim Jagielski
83*b1cdbd2cSJim Jagielski- The above definition implies that calling replaceByName on a mandatory set
84*b1cdbd2cSJim Jagielskimember is OK.
85*b1cdbd2cSJim Jagielski
86*b1cdbd2cSJim Jagielski- The XCU format can contain oor:mandatory attributes on nodes.  (The XCS format
87*b1cdbd2cSJim Jagielskidoes not support them.  In the registrymodifications file, oor:mandatory
88*b1cdbd2cSJim Jagielskiattributes should never be needed, as being mandatory cannot be controlled via
89*b1cdbd2cSJim Jagielskithe UNO API.)  The XCU reading code only evaluates the oor:mandatory attribute
90*b1cdbd2cSJim Jagielskifor set members, and ignores it everywhere else.
91*b1cdbd2cSJim Jagielski
92*b1cdbd2cSJim Jagielski- Only true sets support mandatory members.  A localized property for the "*"
93*b1cdbd2cSJim Jagielskilocale, though acting much like a set, does not support mandatory members.
94*b1cdbd2cSJim Jagielski
95*b1cdbd2cSJim Jagielski- The OpenOffice.org Registry Format document claims that group extension
96*b1cdbd2cSJim Jagielskiproperties are implicitly mandatory, but at least the new configmgr code does
97*b1cdbd2cSJim Jagielskinot treat them like that (i.e., they can be removed again).
98*b1cdbd2cSJim Jagielski
99*b1cdbd2cSJim Jagielski- For simplicity, setMandatory/getMandatory are available as virtual functions
100*b1cdbd2cSJim Jagielskiat the base Node, even though they can only make sense for GroupNodes and
101*b1cdbd2cSJim JagielskiSetNodes that are set members.  The default getMandatory implementation returns
102*b1cdbd2cSJim JagielskiNO_LAYER, meaning oor:mandatory is not set to true in any layer.  (Returning
103*b1cdbd2cSJim JagielskiNO_LAYER simplifies the code, e.g., removeByName does not have to check whether
104*b1cdbd2cSJim JagielskigetMandatory is called on a member of a true set to decide whether to forbid
105*b1cdbd2cSJim Jagielskiremoval.)
106*b1cdbd2cSJim Jagielski
107*b1cdbd2cSJim Jagielski- When committing changes (made through the UNO API), the "mandatory" status of
108*b1cdbd2cSJim Jagielskiinserted nodes must be updated (in case the insert is due to a replaceByName, or
109*b1cdbd2cSJim Jagielskithe "mandatory" flag was added by a concurrent modification of a lower layer).
110*b1cdbd2cSJim JagielskiAlso, for to-be-removed nodes, removal is ignored for (newly; due to concurrent
111*b1cdbd2cSJim Jagielskimodification of a lower layer) mandatory nodes (but still recorded in
112*b1cdbd2cSJim Jagielskiregistrymodifications, so may take effect once the lower layer addition is
113*b1cdbd2cSJim Jagielskiremoved again---whether or not that is a good idea).
114*b1cdbd2cSJim Jagielski
115*b1cdbd2cSJim Jagielski
116*b1cdbd2cSJim JagielskiXcuParser Modification Recording
117*b1cdbd2cSJim Jagielski================================
118*b1cdbd2cSJim Jagielski
119*b1cdbd2cSJim Jagielski- XcuParser records modifications when reading user layer data
120*b1cdbd2cSJim Jagielski(valueParser_.getLayer() == Data::NO_LAYER).
121*b1cdbd2cSJim Jagielski
122*b1cdbd2cSJim Jagielski- oor:finalized and oor:mandatory attributes cannot be set via the UNO API, so
123*b1cdbd2cSJim Jagielskiit is assumed that user layer data does not contain them (for one, they are not
124*b1cdbd2cSJim Jagielskiwritten by writeModFile; for another, the logic to record modifications expects
125*b1cdbd2cSJim Jagielskia locprop(modify,fuse) to be followed by one or more value(fuse,remove), which
126*b1cdbd2cSJim Jagielskiwould not necessarily be true if the locprop were only present in the user layer
127*b1cdbd2cSJim Jagielskidata to flag it as finalized).
128*b1cdbd2cSJim Jagielski
129*b1cdbd2cSJim Jagielski- The logic to record modifications considers the top of the XML element stack.
130*b1cdbd2cSJim JagielskiIn the following list of all possible cases, items marked with an asterisk are
131*b1cdbd2cSJim Jagielskirecorded:
132*b1cdbd2cSJim Jagielski ... group(modify,fuse) - group(modify,fuse) - ...
133*b1cdbd2cSJim Jagielski ... group(modify,fuse) - set(modify,fuse) - ...
134*b1cdbd2cSJim Jagielski ... group(modify,fuse) - *prop(modify,fuse,replace) - value(fuse)
135*b1cdbd2cSJim Jagielski ... group(modify,fuse) - *prop(remove)
136*b1cdbd2cSJim Jagielski ... group(modify,fuse) - locprop(modify,fuse) - *value(fuse)
137*b1cdbd2cSJim Jagielski ... group(modify,fuse) - locprop(modify,fuse) - *value(remove)
138*b1cdbd2cSJim Jagielski ... group(modify,fuse) - *locprop(replace) ...
139*b1cdbd2cSJim Jagielski ... set(modify,fuse,replace) - group(modify/fuse) - ...
140*b1cdbd2cSJim Jagielski ... set(modify,fuse,replace) - *group(replace/fuse) - ...
141*b1cdbd2cSJim Jagielski ... set(modify,fuse,replace) - *group(remove)
142*b1cdbd2cSJim Jagielski ... set(modify,fuse,replace) - set(modify/fuse) - ...
143*b1cdbd2cSJim Jagielski ... set(modify,fuse,replace) - *set(replace/fuse) - ...
144*b1cdbd2cSJim Jagielski ... set(modify,fuse,replace) - *set(remove)
145*b1cdbd2cSJim JagielskiLegend: "...": zero or more further items
146*b1cdbd2cSJim Jagielski        "- ...": one or more further items
147*b1cdbd2cSJim Jagielski        "modify,fuse" etc.: any of those operations
148*b1cdbd2cSJim Jagielski        "modify/fuse": a modify or a fuse on an existing member
149*b1cdbd2cSJim Jagielski        "replace/fuse": a replace or a fuse on a non-existing member
150