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_XBackendEntities_idl__
28#define __com_sun_star_configuration_backend_XBackendEntities_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_lang_IllegalArgumentException_idl__
35#include <com/sun/star/lang/IllegalArgumentException.idl>
36#endif
37#ifndef __com_sun_star_configuration_backend_BackendAccessException_idl__
38#include <com/sun/star/configuration/backend/BackendAccessException.idl>
39#endif
40
41//=============================================================================
42
43module com { module sun { module star { module configuration { module backend {
44
45//=============================================================================
46
47/**
48  Provides functionality relating to common and supported entities
49  for a configuration data backend.
50
51  @see com::sun::star::configuration::backend::XBackend
52  @see com::sun::star::configuration::backend::XMultiLayerStratum
53
54  @since OOo 1.1.2
55*/
56published interface XBackendEntities : ::com::sun::star::uno::XInterface
57{
58	//-------------------------------------------------------------------------
59
60    /**
61        provides the entity id of the owner entity of the backend.
62
63        @returns
64            an entity identifier for the owner entity.
65            <p> The owner entity is the default entity for the backend.
66               For normal configuration data access the owner entity
67               should always be used.
68            </p>
69
70        @see com::sun::star::configuration::backend::XBackend::listOwnLayers()
71        @see com::sun::star::configuration::backend::XBackend::getOwnUpdateHandler()
72	*/
73    string getOwnerEntity() ;
74
75	//-------------------------------------------------------------------------
76
77    /**
78        provides the entity id of an entity for general administrative access.
79
80        <p> The admin entity is an entity that should be used to
81           read and manage configuration data that applies to all entities
82           within the backend.
83        </p>
84
85        @returns
86            an entity identifier for the admin entity or
87            an empty string, if there is no entity that can be used for
88            general administrative access.
89
90	*/
91    string getAdminEntity() ;
92
93	//-------------------------------------------------------------------------
94
95    /**
96        determines, if a given entity id exists in this backend.
97
98        @param aEntity
99            The name of an entity.
100
101        @throws   com::sun::star::configuration::backend::BackendAccessException
102                if an error occurs while accessing the backend.
103
104        @returns
105            <TRUE/>, if aEntity is a valid, existing entity for this backend,
106            <FALSE/> otherwise.
107	*/
108    boolean supportsEntity([in] string aEntity)
109        raises( BackendAccessException );
110
111	//-------------------------------------------------------------------------
112
113    /**
114        determines, if two given entity ids denote the same entity.
115
116        @param aEntity
117            The name of an entity.
118
119        @param aOtherEntity
120            The name of another entity.
121
122        @returns
123            <TRUE/>, if aEntity and aOtherEntity denote the same entity
124            within this backend, <FALSE/> otherwise.
125
126        @throws   com::sun::star::configuration::backend::BackendAccessException
127                if an error occurs while accessing the backend.
128
129        @throws   com::sun::star::lang::IllegalArgumentException
130            if either entity does not exist.
131	*/
132    boolean isEqualEntity([in] string aEntity, [in] string aOtherEntity)
133        raises( BackendAccessException, com::sun::star::lang::IllegalArgumentException) ;
134
135	//-------------------------------------------------------------------------
136} ;
137
138//=============================================================================
139
140} ; } ; } ; } ; } ;
141
142#endif
143