Bump for 3.6-28
[LibreOffice.git] / offapi / com / sun / star / configuration / AccessRootElement.idl
blob119ad559cd7ead77e06200233e491ccea9187e71
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef __com_sun_star_configuration_AccessRootElement_idl__
29 #define __com_sun_star_configuration_AccessRootElement_idl__
31 #include <com/sun/star/configuration/HierarchyElement.idl>
32 #include <com/sun/star/lang/XComponent.idl>
33 #include <com/sun/star/lang/XLocalizable.idl>
34 #include <com/sun/star/util/XChangesNotifier.idl>
36 //=============================================================================
38 module com { module sun { module star { module configuration {
40 //=============================================================================
41 /** provides information about the root element of a hierarchy and
42 about the hierarchy as a whole.
44 <p>Provides information about the element and the whole hierarchy.
45 Allows controlling the lifetime of the hierarchy.
46 Allows observing changes in the hierarchy as a whole.
47 </p>
49 <p>When access to a hierarchy is first obtained from a factory or provider,
50 this is the initial object that is created by the factory.
51 It represents the <em>root</em> of the accessible part of the hierarchy.
52 </p>
54 <p><em><strong>NOTE:</strong> In this description "hierarchy" may actually
55 designate a part or fragment of a larger hierarchy. It is that part that is
56 rooted in the element represented by an implementation of this service
57 and that is accessible starting from this element.</em>
58 </p>
60 <p>Generally it is not possible to navigate the parent or siblings, if any,
61 of this element, so <type scope="com::sun::star::container">XChild</type> is
62 not supported.
63 </p>
65 @see com::sun::star::configuration::UpdateRootElement
66 Implementations that support modifying data in the hierarchy
67 implement service UpdateRootElement.
69 @see com::sun::star::configuration::SetElement
70 A complementary service, for children of a dynamic homogeneous container.
72 @see com::sun::star::configuration::GroupElement
73 A complementary service, for children of a static heterogeneous collection.
75 @see com::sun::star::configuration::ConfigurationProvider
76 Objects provided by a <type>ConfigurationProvider</type> implement this service.
78 published service AccessRootElement
80 /** the basic service for accessing information about an element in the
81 hierarchy.
83 service HierarchyElement;
85 /** allows controlling or observing the lifetime of the whole hierarchy.
87 <p>The owner of the hierarchy may dispose of this object
88 using <member scope="com::sun::star::lang">XComponent::dispose()</member>.
89 As this object owns its child elements and, recursively, the whole hierarchy,
90 any descendant elements obtained, directly or indirectly, from this object
91 will also be disposed. Disposing of the object does not affect a persistent
92 representation of the hierarchy.
93 </p>
95 <p>When an implementation is obtained from a factory or provider, ownership
96 of it is usually transferred to the client. See the documentation
97 of the particular provider or factory service for details.
98 </p>
100 <p>The provider of this object may still dispose of this object, when the
101 lifetime of the provider ends or if these objects represent
102 the root of only a fragment of an enclosing hierarchy and
103 this fragment is removed from the complete hierarchy by an outside source.
104 </p>
106 <p>Clients may register an <type scope="com::sun::star::lang">XEventListener</type>
107 to be notified when the object is disposed for either cause.
108 </p>
110 interface com::sun::star::lang::XComponent;
112 /** allows registering listeners that observe the whole hierarchy.
114 <p>A client can register an
115 <type scope="com::sun::star::util">XChangesListener</type>,
116 which will receive notifications for any changes within the
117 hierarchy (fragment) this object represents.
118 </p>
120 <p>An implementation will collect as many changes as possible into a single
121 <type scope="com::sun::star::util">ChangesEvent</type>. For Example:
122 </p>
125 If <member scope="com::sun::star::beans">XMultiPropertySet::setPropertyValues()</member>
126 or <member scope="com::sun::star::beans">XMultiHierarchicalPropertySet::setHierarchicalPropertyValues()</member>
127 is used on an element of the hierarchy to change multiple values within
128 the hierarchy, all changes will be notified with a single event.
129 </p>
131 <p>If an outside source uses
132 <member scope="com::sun::star::util">XChangesBatch::commitChanges()</member>
133 on an overlapping hierarchy access, all relevant changes will be notified
134 with a single event.
135 </p>
137 @ see UpdateRootElement
138 @ see com::sun::star::util::XChangesBatch
140 interface com::sun::star::util::XChangesNotifier;
142 /** provides access to the locale that applies to locale-dependent data
143 in this hierarchy. [optional]
145 <p>This interface may be missing if the implementation does not support
146 locale-dependent data in the hierarchy or if the (partial) hierarchy rooted
147 in this object does not contain any locale-dependent elements.
148 </p>
150 <p><em>Changing the locale is generally not supported.</em> If it is supported,
151 there is no guarantee that values already loaded into the hierarchy, or an
152 application cache, are refreshed to reflect the new locale. Use of
153 <member scope="com::sun::star::lang">XLocalizable::setLocale()</member>
154 is therefore not recommended.
155 </p>
157 [optional] interface com::sun::star::lang::XLocalizable;
161 //=============================================================================
163 }; }; }; };
165 #endif
167 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */