1*cdf0e10cSrcweir/*************************************************************************
2*cdf0e10cSrcweir *
3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir *
5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir *
7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir *
9*cdf0e10cSrcweir * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir *
11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir *
15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir *
21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir *
26*cdf0e10cSrcweir ************************************************************************/
27*cdf0e10cSrcweir#ifndef __com_sun_star_configuration_backend_XMultiLayerStratum_idl__
28*cdf0e10cSrcweir#define __com_sun_star_configuration_backend_XMultiLayerStratum_idl__
29*cdf0e10cSrcweir
30*cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__
31*cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl>
32*cdf0e10cSrcweir#endif
33*cdf0e10cSrcweir
34*cdf0e10cSrcweir#ifndef __com_sun_star_configuration_backend_XLayer_idl__
35*cdf0e10cSrcweir#include <com/sun/star/configuration/backend/XLayer.idl>
36*cdf0e10cSrcweir#endif
37*cdf0e10cSrcweir
38*cdf0e10cSrcweir#ifndef __com_sun_star_configuration_backend_XUpdatableLayer_idl__
39*cdf0e10cSrcweir#include <com/sun/star/configuration/backend/XUpdatableLayer.idl>
40*cdf0e10cSrcweir#endif
41*cdf0e10cSrcweir
42*cdf0e10cSrcweir#ifndef __com_sun_star_configuration_backend_BackendAccessException_idl__
43*cdf0e10cSrcweir#include <com/sun/star/configuration/backend/BackendAccessException.idl>
44*cdf0e10cSrcweir#endif
45*cdf0e10cSrcweir
46*cdf0e10cSrcweir#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
47*cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl>
48*cdf0e10cSrcweir#endif
49*cdf0e10cSrcweir
50*cdf0e10cSrcweir#ifndef __com_sun_star_lang_NoSupportException_idl__
51*cdf0e10cSrcweir#include <com/sun/star/lang/NoSupportException.idl>
52*cdf0e10cSrcweir#endif
53*cdf0e10cSrcweir
54*cdf0e10cSrcweir//=============================================================================
55*cdf0e10cSrcweir
56*cdf0e10cSrcweirmodule com { module sun { module star { module configuration { module backend {
57*cdf0e10cSrcweir
58*cdf0e10cSrcweir//=============================================================================
59*cdf0e10cSrcweir
60*cdf0e10cSrcweir/**
61*cdf0e10cSrcweir  Handles access to a stratum consisting of multiple layers
62*cdf0e10cSrcweir  in a single configuration data repository
63*cdf0e10cSrcweir
64*cdf0e10cSrcweir  <p> The interface provides access to data for multiple entities and
65*cdf0e10cSrcweir     timestamp-checking capabilities for efficient caching.
66*cdf0e10cSrcweir  </p>
67*cdf0e10cSrcweir
68*cdf0e10cSrcweir  @see com::sun::star::configuration::backend::XBackendEntities
69*cdf0e10cSrcweir  @see com::sun::star::util::XTimeStamped
70*cdf0e10cSrcweir  @see com::sun::star::configuration::backend::XSchemaSupplier
71*cdf0e10cSrcweir  @see com::sun::star::configuration::backend::XSingleLayerStratum
72*cdf0e10cSrcweir
73*cdf0e10cSrcweir  @since OOo 1.1.2
74*cdf0e10cSrcweir*/
75*cdf0e10cSrcweirpublished interface XMultiLayerStratum : ::com::sun::star::uno::XInterface
76*cdf0e10cSrcweir{
77*cdf0e10cSrcweir	//-------------------------------------------------------------------------
78*cdf0e10cSrcweir
79*cdf0e10cSrcweir    /**
80*cdf0e10cSrcweir      identifies the layers within this stratum which should be read and
81*cdf0e10cSrcweir      merged to determine data of a component for an entity
82*cdf0e10cSrcweir
83*cdf0e10cSrcweir
84*cdf0e10cSrcweir      @param aComponent
85*cdf0e10cSrcweir                The name of the component to access.
86*cdf0e10cSrcweir
87*cdf0e10cSrcweir      @param aEntity
88*cdf0e10cSrcweir                The name of an entity on behalf of which data will be accessed.
89*cdf0e10cSrcweir
90*cdf0e10cSrcweir      @return
91*cdf0e10cSrcweir                a list of layer identifiers that can be used to
92*cdf0e10cSrcweir                retrieve <type>Layer</type> objects.
93*cdf0e10cSrcweir                <p> The list ist ordered by priority. Typically
94*cdf0e10cSrcweir                   the most general layers (global defaults,
95*cdf0e10cSrcweir                   entire organization) are first, more specific layers
96*cdf0e10cSrcweir                   (associated to specific groups or roles) are next
97*cdf0e10cSrcweir                   and the entity's own data is last.
98*cdf0e10cSrcweir                </p>
99*cdf0e10cSrcweir
100*cdf0e10cSrcweir      @throws   com::sun::star::lang::IllegalArgumentException
101*cdf0e10cSrcweir                if the component identifier is invalid or
102*cdf0e10cSrcweir                if the entity doesn't exist.
103*cdf0e10cSrcweir
104*cdf0e10cSrcweir      @throws   com::sun::star::configuration::backend::BackendAccessException
105*cdf0e10cSrcweir                if an error occurs while accessing the data.
106*cdf0e10cSrcweir
107*cdf0e10cSrcweir      @see com::sun::star::configuration::backend::XMultiLayerStratum::getLayer()
108*cdf0e10cSrcweir      @see com::sun::star::configuration::backend::XMultiLayerStratum::getLayers()
109*cdf0e10cSrcweir      @see com::sun::star::configuration::backend::XMultiLayerStratum::getMultipleLayers()
110*cdf0e10cSrcweir      @see com::sun::star::configuration::backend::XBackendEntities
111*cdf0e10cSrcweir	*/
112*cdf0e10cSrcweir    sequence<string> listLayerIds([in] string aComponent,
113*cdf0e10cSrcweir                                  [in] string aEntity)
114*cdf0e10cSrcweir        raises (BackendAccessException,
115*cdf0e10cSrcweir                com::sun::star::lang::IllegalArgumentException) ;
116*cdf0e10cSrcweir
117*cdf0e10cSrcweir	//-------------------------------------------------------------------------
118*cdf0e10cSrcweir
119*cdf0e10cSrcweir    /**
120*cdf0e10cSrcweir      identifies the layer which should be modified
121*cdf0e10cSrcweir      to update data of a component on behalf of an entity.
122*cdf0e10cSrcweir
123*cdf0e10cSrcweir      <p> The layer id returned is one of the layer ids obtained from
124*cdf0e10cSrcweir         <member>XMultiLayerStratum::listLayerIds()</member> for the same
125*cdf0e10cSrcweir         component and entity.
126*cdf0e10cSrcweir      </p>
127*cdf0e10cSrcweir
128*cdf0e10cSrcweir      @param aComponent
129*cdf0e10cSrcweir                The name of the component to access.
130*cdf0e10cSrcweir
131*cdf0e10cSrcweir      @param aEntity
132*cdf0e10cSrcweir                The name of an entity on behalf of which data will be accessed.
133*cdf0e10cSrcweir
134*cdf0e10cSrcweir      @returns
135*cdf0e10cSrcweir                a layer identifier that can be used to obtain
136*cdf0e10cSrcweir                an <type>UpdatableLayer</type> object.
137*cdf0e10cSrcweir
138*cdf0e10cSrcweir      @throws   com::sun::star::lang::IllegalArgumentException
139*cdf0e10cSrcweir                if the component identifier is invalid or
140*cdf0e10cSrcweir                if the entity doesn't exist.
141*cdf0e10cSrcweir
142*cdf0e10cSrcweir      @throws   com::sun::star::lang::NoSupportException
143*cdf0e10cSrcweir                if the implementation does not support updates.
144*cdf0e10cSrcweir
145*cdf0e10cSrcweir      @throws   com::sun::star::configuration::backend::BackendAccessException
146*cdf0e10cSrcweir                if an error occurs while accessing the data.
147*cdf0e10cSrcweir
148*cdf0e10cSrcweir      @see com::sun::star::configuration::backend::XMultiLayerStratum::getUpdatableLayer()
149*cdf0e10cSrcweir      @see com::sun::star::configuration::backend::XBackendEntities
150*cdf0e10cSrcweir	*/
151*cdf0e10cSrcweir    string getUpdateLayerId([in] string aComponent,
152*cdf0e10cSrcweir                            [in] string aEntity)
153*cdf0e10cSrcweir        raises (BackendAccessException,
154*cdf0e10cSrcweir                com::sun::star::lang::NoSupportException,
155*cdf0e10cSrcweir                com::sun::star::lang::IllegalArgumentException) ;
156*cdf0e10cSrcweir
157*cdf0e10cSrcweir	//-------------------------------------------------------------------------
158*cdf0e10cSrcweir
159*cdf0e10cSrcweir    /**
160*cdf0e10cSrcweir      retrieves a layer associated to a layer id, if newer than indicated.
161*cdf0e10cSrcweir
162*cdf0e10cSrcweir      <p> A timestamp can be provided, which is used to indicate
163*cdf0e10cSrcweir         a point in time. The layer should be returned only if is modified
164*cdf0e10cSrcweir         since that time.
165*cdf0e10cSrcweir      </p>
166*cdf0e10cSrcweir
167*cdf0e10cSrcweir      @param aLayerId
168*cdf0e10cSrcweir                identifier of the layers to be accessed.
169*cdf0e10cSrcweir                <p>Layer ids can be obtained from
170*cdf0e10cSrcweir                <member>XMultiLayerStratum::listLayerIds()</member> or
171*cdf0e10cSrcweir                <member>XMultiLayerStratum::getUpdateLayerId()</member>.
172*cdf0e10cSrcweir                </p>
173*cdf0e10cSrcweir
174*cdf0e10cSrcweir      @param aTimestamp
175*cdf0e10cSrcweir                a timestamp for the layer.
176*cdf0e10cSrcweir
177*cdf0e10cSrcweir                <p> An empty timestamp indicates, that the layer should be
178*cdf0e10cSrcweir                   retrieved irrespective of its modification time.
179*cdf0e10cSrcweir                </p>
180*cdf0e10cSrcweir                <p> The format and meaning of a timestamp depends on
181*cdf0e10cSrcweir                    the implementation. Timestamps can be obtained using
182*cdf0e10cSrcweir                    <member scope="com::sun::star::util">XTimeStamped::getTimestamp()</member>.
183*cdf0e10cSrcweir                </p>
184*cdf0e10cSrcweir
185*cdf0e10cSrcweir      @returns
186*cdf0e10cSrcweir                a <type>Layer</type> object providing access to the layer data,
187*cdf0e10cSrcweir                <NULL/> if the layer is newer than indicated by the timestamp.
188*cdf0e10cSrcweir
189*cdf0e10cSrcweir      @throws   com::sun::star::lang::IllegalArgumentException
190*cdf0e10cSrcweir                if the layer id is invalid or
191*cdf0e10cSrcweir                if the timestamp is invalid
192*cdf0e10cSrcweir
193*cdf0e10cSrcweir      @throws   com::sun::star::configuration::backend::BackendAccessException
194*cdf0e10cSrcweir                if an error occurs while accessing the data.
195*cdf0e10cSrcweir
196*cdf0e10cSrcweir      @see com::sun::star::util::XTimeStamped
197*cdf0e10cSrcweir	*/
198*cdf0e10cSrcweir    XLayer getLayer([in] string aLayerId,
199*cdf0e10cSrcweir                    [in] string aTimestamp)
200*cdf0e10cSrcweir        raises (BackendAccessException,
201*cdf0e10cSrcweir                com::sun::star::lang::IllegalArgumentException) ;
202*cdf0e10cSrcweir
203*cdf0e10cSrcweir	//-------------------------------------------------------------------------
204*cdf0e10cSrcweir
205*cdf0e10cSrcweir    /**
206*cdf0e10cSrcweir      retrieves the layers associated to a series of layer ids,
207*cdf0e10cSrcweir      if newer than indicated.
208*cdf0e10cSrcweir      <p> A timestamp can be provided, which is used to indicate
209*cdf0e10cSrcweir         a point in time. Only layers that are modified since that time
210*cdf0e10cSrcweir         should be returned. The same timestamp is used for all layers.
211*cdf0e10cSrcweir      </p>
212*cdf0e10cSrcweir
213*cdf0e10cSrcweir      @param aLayerIds
214*cdf0e10cSrcweir                identifiers of the layers to be accessed.
215*cdf0e10cSrcweir                <p>Layer ids can be obtained from
216*cdf0e10cSrcweir                <member>XMultiLayerStratum::listLayerIds()</member>.
217*cdf0e10cSrcweir                </p>
218*cdf0e10cSrcweir
219*cdf0e10cSrcweir      @param aTimestamp
220*cdf0e10cSrcweir                a timestamp for all of the layers.
221*cdf0e10cSrcweir                <p> An empty timestamp indicates, that the layers should be
222*cdf0e10cSrcweir                   retrieved irrespective of their modification time.
223*cdf0e10cSrcweir                </p>
224*cdf0e10cSrcweir                <p> The format and meaning of a timestamp depends on
225*cdf0e10cSrcweir                    the implementation. Timestamps can be obtained using
226*cdf0e10cSrcweir                    <member scope="com::sun::star::util">XTimeStamped::getTimestamp()</member>.
227*cdf0e10cSrcweir                </p>
228*cdf0e10cSrcweir
229*cdf0e10cSrcweir      @returns
230*cdf0e10cSrcweir                a list of <type>Layer</type> objects
231*cdf0e10cSrcweir                providing access to the layer data.
232*cdf0e10cSrcweir                <p> The list has the same length as aLayerIds. Each layer
233*cdf0e10cSrcweir                   object is associated to the layer id in the corresponding
234*cdf0e10cSrcweir                   position.
235*cdf0e10cSrcweir                </p>
236*cdf0e10cSrcweir                <p> For layers that are newer than indicated by the
237*cdf0e10cSrcweir                   timestamp, the list contains a <NULL/> element.
238*cdf0e10cSrcweir                </p>
239*cdf0e10cSrcweir
240*cdf0e10cSrcweir      @throws   com::sun::star::lang::IllegalArgumentException
241*cdf0e10cSrcweir                if one of the layer ids is invalid or
242*cdf0e10cSrcweir                if the timestamp is invalid
243*cdf0e10cSrcweir
244*cdf0e10cSrcweir      @throws   com::sun::star::configuration::backend::BackendAccessException
245*cdf0e10cSrcweir                if an error occurs while accessing the data.
246*cdf0e10cSrcweir
247*cdf0e10cSrcweir      @see com::sun::star::util::XTimeStamped
248*cdf0e10cSrcweir	*/
249*cdf0e10cSrcweir    sequence<XLayer> getLayers([in] sequence<string> aLayerIds,
250*cdf0e10cSrcweir                               [in] string aTimestamp)
251*cdf0e10cSrcweir        raises (BackendAccessException,
252*cdf0e10cSrcweir                com::sun::star::lang::IllegalArgumentException) ;
253*cdf0e10cSrcweir
254*cdf0e10cSrcweir	//-------------------------------------------------------------------------
255*cdf0e10cSrcweir
256*cdf0e10cSrcweir    /**
257*cdf0e10cSrcweir      retrieves the layers associated to a series of layer ids,
258*cdf0e10cSrcweir      if newer than indicated for each layer.
259*cdf0e10cSrcweir      <p> For each layer an individual timestamp can be provided,
260*cdf0e10cSrcweir         which is used to indicate the last known version of the layer.
261*cdf0e10cSrcweir         Only layers that are modified since that time should be returned.
262*cdf0e10cSrcweir      </p>
263*cdf0e10cSrcweir
264*cdf0e10cSrcweir      @param aLayerIds
265*cdf0e10cSrcweir                identifiers of the layers to be accessed.
266*cdf0e10cSrcweir                <p>Layer ids can be obtained from
267*cdf0e10cSrcweir                <member>XMultiLayerStratum::listLayerIds()</member>.
268*cdf0e10cSrcweir                </p>
269*cdf0e10cSrcweir
270*cdf0e10cSrcweir      @param aTimestamps
271*cdf0e10cSrcweir                timestamps for each of the layers.
272*cdf0e10cSrcweir
273*cdf0e10cSrcweir                <p> This list must have the same length as aLayerIds.
274*cdf0e10cSrcweir                    Timestamps are matched to layer ids by their position.
275*cdf0e10cSrcweir                </p>
276*cdf0e10cSrcweir                <p> An empty timestamp indicates, that the associated layer
277*cdf0e10cSrcweir                   should be retrieved irrespective of its modification time.
278*cdf0e10cSrcweir                </p>
279*cdf0e10cSrcweir                <p> The format and meaning of a timestamp depends on
280*cdf0e10cSrcweir                    the implementation. Timestamps can be obtained using
281*cdf0e10cSrcweir                    <member scope="com::sun::star::util">XTimeStamped::getTimestamp()</member>.
282*cdf0e10cSrcweir                </p>
283*cdf0e10cSrcweir
284*cdf0e10cSrcweir      @returns
285*cdf0e10cSrcweir                a list of <type>Layer</type> objects
286*cdf0e10cSrcweir                providing access to the layer data.
287*cdf0e10cSrcweir                <p> The list has the same length as aLayerIds. Each layer
288*cdf0e10cSrcweir                   object is associated to the layer id in the corresponding
289*cdf0e10cSrcweir                   position.
290*cdf0e10cSrcweir                </p>
291*cdf0e10cSrcweir                <p> For layers that are newer than indicated by the corresponding
292*cdf0e10cSrcweir                   timestamp, the list contains a <NULL/> element.
293*cdf0e10cSrcweir                </p>
294*cdf0e10cSrcweir
295*cdf0e10cSrcweir      @throws   com::sun::star::lang::IllegalArgumentException
296*cdf0e10cSrcweir                if one of the layer ids is invalid or
297*cdf0e10cSrcweir                if one of the timestamps is invalid or
298*cdf0e10cSrcweir                if the lengths of the arguments don't match.
299*cdf0e10cSrcweir
300*cdf0e10cSrcweir      @throws   com::sun::star::configuration::backend::BackendAccessException
301*cdf0e10cSrcweir                if an error occurs while accessing the data.
302*cdf0e10cSrcweir
303*cdf0e10cSrcweir      @see com::sun::star::util::XTimeStamped
304*cdf0e10cSrcweir      */
305*cdf0e10cSrcweir    sequence<XLayer> getMultipleLayers([in] sequence<string> aLayerIds,
306*cdf0e10cSrcweir                                       [in] sequence<string> aTimestamps)
307*cdf0e10cSrcweir        raises (BackendAccessException,
308*cdf0e10cSrcweir                com::sun::star::lang::IllegalArgumentException) ;
309*cdf0e10cSrcweir
310*cdf0e10cSrcweir	//-------------------------------------------------------------------------
311*cdf0e10cSrcweir
312*cdf0e10cSrcweir    /**
313*cdf0e10cSrcweir      retrieves a writable representation of the layer
314*cdf0e10cSrcweir      associated to a layer id.
315*cdf0e10cSrcweir
316*cdf0e10cSrcweir      @param aLayerId
317*cdf0e10cSrcweir                identifier of the layer to be accessed for writing.
318*cdf0e10cSrcweir                <p>A layer id for writing can be obtained from
319*cdf0e10cSrcweir                <member>XMultiLayerStratum::getUpdateLayerId()</member>.
320*cdf0e10cSrcweir                </p>
321*cdf0e10cSrcweir
322*cdf0e10cSrcweir      @return
323*cdf0e10cSrcweir                an <type>UpdatableLayer</type> object providing
324*cdf0e10cSrcweir                write access to the layer
325*cdf0e10cSrcweir
326*cdf0e10cSrcweir      @throws   com::sun::star::lang::IllegalArgumentException
327*cdf0e10cSrcweir                if the layer id is invalid.
328*cdf0e10cSrcweir
329*cdf0e10cSrcweir      @throws   com::sun::star::lang::NoSupportException
330*cdf0e10cSrcweir                if the implementation does not support updates.
331*cdf0e10cSrcweir
332*cdf0e10cSrcweir      @throws   com::sun::star::configuration::backend::BackendAccessException
333*cdf0e10cSrcweir                if an error occurs while accessing the data.
334*cdf0e10cSrcweir     */
335*cdf0e10cSrcweir    XUpdatableLayer getUpdatableLayer([in] string aLayerId)
336*cdf0e10cSrcweir        raises (BackendAccessException,
337*cdf0e10cSrcweir                com::sun::star::lang::NoSupportException,
338*cdf0e10cSrcweir                com::sun::star::lang::IllegalArgumentException) ;
339*cdf0e10cSrcweir
340*cdf0e10cSrcweir	//-------------------------------------------------------------------------
341*cdf0e10cSrcweir} ;
342*cdf0e10cSrcweir
343*cdf0e10cSrcweir//=============================================================================
344*cdf0e10cSrcweir
345*cdf0e10cSrcweir} ; } ; } ; } ; } ;
346*cdf0e10cSrcweir
347*cdf0e10cSrcweir#endif
348