1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_configuration_backend_XSingleLayerStratum_idl__
28#define __com_sun_star_configuration_backend_XSingleLayerStratum_idl__
29
30#ifndef __com_sun_star_uno_XInterface_idl__
31#include <com/sun/star/uno/XInterface.idl>
32#endif
33
34#ifndef __com_sun_star_configuration_backend_XLayer_idl__
35#include <com/sun/star/configuration/backend/XLayer.idl>
36#endif
37
38#ifndef __com_sun_star_configuration_backend_XUpdatableLayer_idl__
39#include <com/sun/star/configuration/backend/XUpdatableLayer.idl>
40#endif
41
42#ifndef __com_sun_star_configuration_backend_BackendAccessException_idl__
43#include <com/sun/star/configuration/backend/BackendAccessException.idl>
44#endif
45
46#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
47#include <com/sun/star/lang/IllegalArgumentException.idl>
48#endif
49
50#ifndef __com_sun_star_lang_NoSupportException_idl__
51#include <com/sun/star/lang/NoSupportException.idl>
52#endif
53
54//=============================================================================
55
56module com { module sun { module star { module configuration { module backend {
57
58//=============================================================================
59
60/**
61  Handles access to a stratum consisting of a single layer
62  in a configuration data repository
63
64  <p> The interface provides timestamp-checking capabilities
65     for efficient caching.
66  </p>
67
68  @see com::sun::star::util::XTimeStamped
69  @see com::sun::star::configuration::backend::XSchemaSupplier
70  @see com::sun::star::configuration::backend::XMultiLayerStratum
71
72  @since OOo 1.1.2
73*/
74published interface XSingleLayerStratum : ::com::sun::star::uno::XInterface
75{
76	//-------------------------------------------------------------------------
77
78    /**
79        retrieves the layer data for a component, if newer than indicated.
80
81        <p> A timestamp can be provided, which is used to indicate
82            a point in time. The layer should be returned only if is modified
83            since that time.
84        </p>
85
86        @param aComponent
87                The name of the component to access.
88
89        @param aTimestamp
90                a timestamp for the layer.
91
92                <p> An empty timestamp indicates, that the layer should be
93                    retrieved irrespective of its modification time.
94                </p>
95                <p> The format and meaning of a timestamp depends on
96                    the implementation. Timestamps can be obtained using
97                    <member scope="com::sun::star::util">XTimeStamped::getTimestamp()</member>.
98                </p>
99
100      @returns
101                a <type>Layer</type> object providing access to the layer data,
102                <NULL/> if the layer is newer than indicated by the timestamp.
103
104      @throws   com::sun::star::lang::IllegalArgumentException
105                if the component identifier is invalid or
106                if the timestamp is invalid.
107
108      @throws   com::sun::star::configuration::backend::BackendAccessException
109                if an error occurs while accessing the data.
110
111      @see com::sun::star::util::XTimeStamped
112	*/
113    XLayer getLayer([in] string aComponent,
114                    [in] string aTimestamp)
115        raises (BackendAccessException,
116                com::sun::star::lang::IllegalArgumentException) ;
117
118	//-------------------------------------------------------------------------
119
120    /**
121        retrieves a writable representation of the layer for a component.
122
123        @param aComponent
124                The name of the component to access.
125
126        @return
127                an <type>UpdatableLayer</type> object providing
128                write access to the layer
129
130        @throws   com::sun::star::lang::IllegalArgumentException
131                if the component identifier is invalid.
132
133        @throws   com::sun::star::lang::NoSupportException
134                if the implementation does not support updates.
135
136        @throws   com::sun::star::configuration::backend::BackendAccessException
137                if an error occurs while accessing the data.
138     */
139    XUpdatableLayer getUpdatableLayer([in] string aComponent)
140        raises (BackendAccessException,
141                com::sun::star::lang::NoSupportException,
142                com::sun::star::lang::IllegalArgumentException) ;
143
144	//-------------------------------------------------------------------------
145} ;
146
147//=============================================================================
148
149} ; } ; } ; } ; } ;
150
151#endif
152