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