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