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#ifndef __com_sun_star_configuration_backend_XSingleLayerStratum_idl__
24#define __com_sun_star_configuration_backend_XSingleLayerStratum_idl__
25
26#ifndef __com_sun_star_uno_XInterface_idl__
27#include <com/sun/star/uno/XInterface.idl>
28#endif
29
30#ifndef __com_sun_star_configuration_backend_XLayer_idl__
31#include <com/sun/star/configuration/backend/XLayer.idl>
32#endif
33
34#ifndef __com_sun_star_configuration_backend_XUpdatableLayer_idl__
35#include <com/sun/star/configuration/backend/XUpdatableLayer.idl>
36#endif
37
38#ifndef __com_sun_star_configuration_backend_BackendAccessException_idl__
39#include <com/sun/star/configuration/backend/BackendAccessException.idl>
40#endif
41
42#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
43#include <com/sun/star/lang/IllegalArgumentException.idl>
44#endif
45
46#ifndef __com_sun_star_lang_NoSupportException_idl__
47#include <com/sun/star/lang/NoSupportException.idl>
48#endif
49
50//=============================================================================
51
52module com { module sun { module star { module configuration { module backend {
53
54//=============================================================================
55
56/**
57  Handles access to a stratum consisting of a single layer
58  in a configuration data repository
59
60  <p> The interface provides timestamp-checking capabilities
61     for efficient caching.
62  </p>
63
64  @see com::sun::star::util::XTimeStamped
65  @see com::sun::star::configuration::backend::XSchemaSupplier
66  @see com::sun::star::configuration::backend::XMultiLayerStratum
67
68  @since OpenOffice 1.1.2
69*/
70published interface XSingleLayerStratum : ::com::sun::star::uno::XInterface
71{
72	//-------------------------------------------------------------------------
73
74    /**
75        retrieves the layer data for a component, if newer than indicated.
76
77        <p> A timestamp can be provided, which is used to indicate
78            a point in time. The layer should be returned only if is modified
79            since that time.
80        </p>
81
82        @param aComponent
83                The name of the component to access.
84
85        @param aTimestamp
86                a timestamp for the layer.
87
88                <p> An empty timestamp indicates, that the layer should be
89                    retrieved irrespective of its modification time.
90                </p>
91                <p> The format and meaning of a timestamp depends on
92                    the implementation. Timestamps can be obtained using
93                    <member scope="com::sun::star::util">XTimeStamped::getTimestamp()</member>.
94                </p>
95
96      @returns
97                a <type>Layer</type> object providing access to the layer data,
98                <NULL/> if the layer is newer than indicated by the timestamp.
99
100      @throws   com::sun::star::lang::IllegalArgumentException
101                if the component identifier is invalid or
102                if the timestamp is invalid.
103
104      @throws   com::sun::star::configuration::backend::BackendAccessException
105                if an error occurs while accessing the data.
106
107      @see com::sun::star::util::XTimeStamped
108	*/
109    XLayer getLayer([in] string aComponent,
110                    [in] string aTimestamp)
111        raises (BackendAccessException,
112                com::sun::star::lang::IllegalArgumentException) ;
113
114	//-------------------------------------------------------------------------
115
116    /**
117        retrieves a writable representation of the layer for a component.
118
119        @param aComponent
120                The name of the component to access.
121
122        @return
123                an <type>UpdatableLayer</type> object providing
124                write access to the layer
125
126        @throws   com::sun::star::lang::IllegalArgumentException
127                if the component identifier is invalid.
128
129        @throws   com::sun::star::lang::NoSupportException
130                if the implementation does not support updates.
131
132        @throws   com::sun::star::configuration::backend::BackendAccessException
133                if an error occurs while accessing the data.
134     */
135    XUpdatableLayer getUpdatableLayer([in] string aComponent)
136        raises (BackendAccessException,
137                com::sun::star::lang::NoSupportException,
138                com::sun::star::lang::IllegalArgumentException) ;
139
140	//-------------------------------------------------------------------------
141} ;
142
143//=============================================================================
144
145} ; } ; } ; } ; } ;
146
147#endif
148