1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#ifndef __com_sun_star_configuration_backend_UpdatableLayer_idl__
25#define __com_sun_star_configuration_backend_UpdatableLayer_idl__
26
27#ifndef __com_sun_star_configuration_backend_Layer_idl__
28#include <com/sun/star/configuration/backend/Layer.idl>
29#endif
30
31#ifndef __com_sun_star_configuration_backend_XUpdatableLayer_idl__
32#include <com/sun/star/configuration/backend/XUpdatableLayer.idl>
33#endif
34
35//==============================================================================
36
37module com { module sun { module star { module configuration { module backend {
38
39//==============================================================================
40
41/**
42  provides read/write access to a configuration data layer.
43
44  <p>A layer contains the configuration setting changes to be performed
45  on a default layer (or schema) to obtain the values of those settings
46  for a given entity and component.
47  </p>
48  <p>An updatable layer can be read or replaced with another layer.
49  </p>
50
51  @since OOo 1.1.2
52  */
53published service UpdatableLayer
54{
55    //--------------------------------------------------------------------------
56
57    /**
58        handles read access to the contents of the layer.
59
60        <p> If the implementation supports
61         <type scope="com::sun::star::util">XTimeStamped</type>,
62         then after executing <member>XUpdatableLayer::replaceWith()</member>
63         the timestamp will be the one for the replaced contents and
64         if reading after updates is supported the next read will reproduce the
65         replaced data.
66        </p>
67      */
68    service Layer ;
69
70    //--------------------------------------------------------------------------
71
72    /**
73      provides write access to the contents of the layer.
74
75       <p> Depending of the actual type (simple, i.e pure <type>XLayer</type> or
76       composite, i.e <type>XCompositeLayer</type>) of the current layer and
77       the provided replacement layer, the operation performed
78       by <member>XUpdatableLayer::replaceWith()</member>, will vary.
79       </p>
80       <p> For the different current/replacement layer combinations, we have:
81       <dl>
82           <dt>Simple/Simple<dt>
83           <dd>the provided layer's contents replace the current one's.</dd>
84
85           <dt>Composite/Composite<dt>
86           <dd>all layers (main and sub) present in the
87               provided layer are used to replace the corresponding current
88               layer contents. Sublayers present in the current layer but
89               not in the provided one are left untouched. Sublayers present
90               in the provided layer but not in the current one are added to
91               the current layer.
92            </dd>
93
94           <dt>Simple/Composite<dt>
95           <dd>the main layer and sublayers of the provided layer
96               are merged into one whose contents replace the current layer.
97           </dd>
98
99           <dt>Composite/Simple<dt>
100           <dd>the provided layer is split into a composite one whose contents
101               are then used to replace the current layer as described above.
102           </dd>
103
104       </dl>
105       <em> Not all implementations of <type>XUpdatableLayer</type>
106            support conversions of the replacement layer.
107            In such a case the sublayers of the provided layer may be ignored
108            or all simple data be merged into the main layer.
109       </em>
110       </p>
111      */
112    interface XUpdatableLayer ;
113
114    //--------------------------------------------------------------------------
115
116} ;
117
118//==============================================================================
119
120} ; } ; } ; } ; } ;
121
122#endif
123
124