1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: AccessRootElement.idl,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_configuration_AccessRootElement_idl__
31 #define __com_sun_star_configuration_AccessRootElement_idl__
33 #ifndef __com_sun_star_configuration_HierarchyElement_idl__
34 #include
<com
/sun
/star
/configuration
/HierarchyElement.idl
>
37 #ifndef __com_sun_star_lang_XComponent_idl__
38 #include
<com
/sun
/star
/lang
/XComponent.idl
>
41 #ifndef __com_sun_star_lang_XLocalizable_idl__
42 #include
<com
/sun
/star
/lang
/XLocalizable.idl
>
45 #ifndef __com_sun_star_util_XChangesNotifier_idl__
46 #include
<com
/sun
/star
/util
/XChangesNotifier.idl
>
49 //=============================================================================
51 module com
{ module sun
{ module star
{ module configuration
{
53 //=============================================================================
54 /** provides information about the root element of a hierarchy and
55 about the hierarchy as a whole.
57 <p>Provides information about the element and the whole hierarchy.
58 Allows controlling the lifetime of the hierarchy.
59 Allows observing changes in the hierarchy as a whole.
62 <p>When access to a hierarchy is first obtained from a factory or provider,
63 this is the initial object that is created by the factory.
64 It represents the <em>root</em> of the accessible part of the hierarchy.
67 <p><em><strong>NOTE:</strong> In this description 'hierarchy' may actually
68 designate a part or fragment of a larger hierarchy. It is that part that is
69 rooted in the element represented by an implementation of this service
70 and that is accessible starting from this element.</em>
73 <p>Generally it is not possible to navigate the parent or siblings, if any,
74 of this element, so <type scope="com::sun::star::container">XChild</type> is
78 @see com::sun::star::configuration::UpdateRootElement
79 Implementations that support modifying data in the hierarchy
80 implement service UpdateRootElement.
82 @see com::sun::star::configuration::SetElement
83 A complementary service, for children of a dynamic homogeneous container.
85 @see com::sun::star::configuration::GroupElement
86 A complementary service, for children of a static heterogeneous collection.
88 @see com::sun::star::configuration::ConfigurationProvider
89 Objects provided by a <type>ConfigurationProvider</type> implement this service.
91 published service AccessRootElement
93 /** the basic service for accessing information about an element in the
96 service HierarchyElement
;
98 /** allows controlling or observing the lifetime of the whole hierarchy.
100 <p>The owner of the hierarchy may dispose of this object
101 using <member scope="com::sun::star::lang">XComponent::dispose()</member>.
102 As this object owns its child elements and, recursively, the whole hierarchy,
103 any descendant elements obtained, directly or indirectly, from this object
104 will also be disposed. Disposing of the object does not affect a persistent
105 representation of the hierarchy.
108 <p>When an implementation is obtained from a factory or provider, ownership
109 of it is usually transferred to the client. See the documentation
110 of the particular provider or factory service for details.
113 <p>The provider of this object may still dispose of this object, when the
114 lifetime of the provider ends or if these objects represent
115 the root of only a fragment of an enclosing hierarchy and
116 this fragment is removed from the complete hierarchy by an outside source.
119 <p>Clients may register an <type scope="com::sun::star::lang">XEventListener</type>
120 to be notified when the object is disposed for either cause.
123 interface com
::sun
::star
::lang
::XComponent
;
125 /** allows registering listeners that observe the whole hierarchy.
127 <p>A client can register an
128 <type scope="com::sun::star::util">XChangesListener</type>,
129 which will receive notifications for any changes within the
130 hierarchy (fragment) this object represents.
133 <p>An implementation will collect as many changes as possible into a single
134 <type scope="com::sun::star::util">ChangesEvent</type>. For Example:
138 If <member scope="com::sun::star::beans">XMultiPropertySet::setPropertyValues()</member>
139 or <member scope="com::sun::star::beans">XMultiHierarchicalPropertySet::setHierarchicalPropertyValues()</member>
140 is used on an element of the hierarchy to change multiple values within
141 the hierarchy, all changes will be notified with a single event.
144 <p>If an outside source uses
145 <member scope="com::sun::star::util">XChangesBatch::commitChanges()</member>
146 on an overlapping hierarchy access, all relevant changes will be notified
150 @ see UpdateRootElement
151 @ see com::sun::star::util::XChangesBatch
153 interface com
::sun
::star
::util
::XChangesNotifier
;
155 /** provides access to the locale that applies to locale-dependent data
156 in this hierarchy. [optional]
158 <p>This interface may be missing if the implementation does not support
159 locale-dependent data in the hierarchy or if the (partial) hierarchy rooted
160 in this object does not contain any locale-dependent elements.
163 <p><em>Changing the locale is generally not supported.</em> If it is supported,
164 there is no guarantee that values already loaded into the hierarchy, or an
165 application cache, are refreshed to reflect the new locale. Use of
166 <member scope="com::sun::star::lang">XLocalizable::setLocale()</member>
167 is therefore not recommended.
170 [optional] interface com
::sun
::star
::lang
::XLocalizable
;
174 //=============================================================================