bump product version to 4.1.6.2
[LibreOffice.git] / offapi / com / sun / star / configuration / AccessRootElement.idl
bloba6ac40cc5d7a70d23e8fb89b8914ec7c66079d7c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /**
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_configuration_AccessRootElement_idl__
20 #define __com_sun_star_configuration_AccessRootElement_idl__
22 #include <com/sun/star/configuration/HierarchyElement.idl>
23 #include <com/sun/star/lang/XComponent.idl>
24 #include <com/sun/star/lang/XLocalizable.idl>
25 #include <com/sun/star/util/XChangesNotifier.idl>
28 module com { module sun { module star { module configuration {
30 /** provides information about the root element of a hierarchy and
31 about the hierarchy as a whole.
33 <p>Provides information about the element and the whole hierarchy.
34 Allows controlling the lifetime of the hierarchy.
35 Allows observing changes in the hierarchy as a whole.
36 </p>
38 <p>When access to a hierarchy is first obtained from a factory or provider,
39 this is the initial object that is created by the factory.
40 It represents the <em>root</em> of the accessible part of the hierarchy.
41 </p>
43 <p><em><strong>NOTE:</strong> In this description "hierarchy" may actually
44 designate a part or fragment of a larger hierarchy. It is that part that is
45 rooted in the element represented by an implementation of this service
46 and that is accessible starting from this element.</em>
47 </p>
49 <p>Generally it is not possible to navigate the parent or siblings, if any,
50 of this element, so <type scope="com::sun::star::container">XChild</type> is
51 not supported.
52 </p>
54 @see com::sun::star::configuration::UpdateRootElement
55 Implementations that support modifying data in the hierarchy
56 implement service UpdateRootElement.
58 @see com::sun::star::configuration::SetElement
59 A complementary service, for children of a dynamic homogeneous container.
61 @see com::sun::star::configuration::GroupElement
62 A complementary service, for children of a static heterogeneous collection.
64 @see com::sun::star::configuration::ConfigurationProvider
65 Objects provided by a <type>ConfigurationProvider</type> implement this service.
67 published service AccessRootElement
69 /** the basic service for accessing information about an element in the
70 hierarchy.
72 service HierarchyElement;
74 /** allows controlling or observing the lifetime of the whole hierarchy.
76 <p>The owner of the hierarchy may dispose of this object
77 using <member scope="com::sun::star::lang">XComponent::dispose()</member>.
78 As this object owns its child elements and, recursively, the whole hierarchy,
79 any descendant elements obtained, directly or indirectly, from this object
80 will also be disposed. Disposing of the object does not affect a persistent
81 representation of the hierarchy.
82 </p>
84 <p>When an implementation is obtained from a factory or provider, ownership
85 of it is usually transferred to the client. See the documentation
86 of the particular provider or factory service for details.
87 </p>
89 <p>The provider of this object may still dispose of this object, when the
90 lifetime of the provider ends or if these objects represent
91 the root of only a fragment of an enclosing hierarchy and
92 this fragment is removed from the complete hierarchy by an outside source.
93 </p>
95 <p>Clients may register an <type scope="com::sun::star::lang">XEventListener</type>
96 to be notified when the object is disposed for either cause.
97 </p>
99 interface com::sun::star::lang::XComponent;
101 /** allows registering listeners that observe the whole hierarchy.
103 <p>A client can register an
104 <type scope="com::sun::star::util">XChangesListener</type>,
105 which will receive notifications for any changes within the
106 hierarchy (fragment) this object represents.
107 </p>
109 <p>An implementation will collect as many changes as possible into a single
110 <type scope="com::sun::star::util">ChangesEvent</type>. For Example:
111 </p>
114 If <member scope="com::sun::star::beans">XMultiPropertySet::setPropertyValues()</member>
115 or <member scope="com::sun::star::beans">XMultiHierarchicalPropertySet::setHierarchicalPropertyValues()</member>
116 is used on an element of the hierarchy to change multiple values within
117 the hierarchy, all changes will be notified with a single event.
118 </p>
120 <p>If an outside source uses
121 <member scope="com::sun::star::util">XChangesBatch::commitChanges()</member>
122 on an overlapping hierarchy access, all relevant changes will be notified
123 with a single event.
124 </p>
126 @ see UpdateRootElement
127 @ see com::sun::star::util::XChangesBatch
129 interface com::sun::star::util::XChangesNotifier;
131 /** provides access to the locale that applies to locale-dependent data
132 in this hierarchy. [optional]
134 <p>This interface may be missing if the implementation does not support
135 locale-dependent data in the hierarchy or if the (partial) hierarchy rooted
136 in this object does not contain any locale-dependent elements.
137 </p>
139 <p><em>Changing the locale is generally not supported.</em> If it is supported,
140 there is no guarantee that values already loaded into the hierarchy, or an
141 application cache, are refreshed to reflect the new locale. Use of
142 <member scope="com::sun::star::lang">XLocalizable::setLocale()</member>
143 is therefore not recommended.
144 </p>
146 [optional] interface com::sun::star::lang::XLocalizable;
151 }; }; }; };
153 #endif
155 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */