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_AccessRootElement_idl__
24cdf0e10cSrcweir#define __com_sun_star_configuration_AccessRootElement_idl__
25cdf0e10cSrcweir
26cdf0e10cSrcweir#ifndef __com_sun_star_configuration_HierarchyElement_idl__
27cdf0e10cSrcweir#include <com/sun/star/configuration/HierarchyElement.idl>
28cdf0e10cSrcweir#endif
29cdf0e10cSrcweir
30cdf0e10cSrcweir#ifndef __com_sun_star_lang_XComponent_idl__
31cdf0e10cSrcweir#include <com/sun/star/lang/XComponent.idl>
32cdf0e10cSrcweir#endif
33cdf0e10cSrcweir
34cdf0e10cSrcweir#ifndef __com_sun_star_lang_XLocalizable_idl__
35cdf0e10cSrcweir#include <com/sun/star/lang/XLocalizable.idl>
36cdf0e10cSrcweir#endif
37cdf0e10cSrcweir
38cdf0e10cSrcweir#ifndef __com_sun_star_util_XChangesNotifier_idl__
39cdf0e10cSrcweir#include <com/sun/star/util/XChangesNotifier.idl>
40cdf0e10cSrcweir#endif
41cdf0e10cSrcweir
42cdf0e10cSrcweir//=============================================================================
43cdf0e10cSrcweir
44cdf0e10cSrcweirmodule com { module sun { module star { module configuration {
45cdf0e10cSrcweir
46cdf0e10cSrcweir//=============================================================================
47cdf0e10cSrcweir/** provides information about the root element of a hierarchy and
48cdf0e10cSrcweir	about the hierarchy as a whole.
49cdf0e10cSrcweir
50cdf0e10cSrcweir <p>Provides information about the element and the whole hierarchy.
51cdf0e10cSrcweir Allows controlling the lifetime of the hierarchy.
52cdf0e10cSrcweir Allows observing changes in the hierarchy as a whole.
53cdf0e10cSrcweir </p>
54cdf0e10cSrcweir
55cdf0e10cSrcweir <p>When access to a hierarchy is first obtained from a factory or provider,
56cdf0e10cSrcweir this is the initial object that is created by the factory.
57cdf0e10cSrcweir It represents the <em>root</em> of the accessible part of the hierarchy.
58cdf0e10cSrcweir </p>
59cdf0e10cSrcweir
60cdf0e10cSrcweir <p><em><strong>NOTE:</strong> In this description 'hierarchy' may actually
61cdf0e10cSrcweir designate a part or fragment of a larger hierarchy. It is that part that is
62cdf0e10cSrcweir rooted in the element represented by an implementation of this service
63cdf0e10cSrcweir and that is accessible starting from this element.</em>
64cdf0e10cSrcweir </p>
65cdf0e10cSrcweir
66cdf0e10cSrcweir <p>Generally it is not possible to navigate the parent or siblings, if any,
67cdf0e10cSrcweir of this element, so <type scope="com::sun::star::container">XChild</type> is
68cdf0e10cSrcweir not supported.
69cdf0e10cSrcweir </p>
70cdf0e10cSrcweir
71cdf0e10cSrcweir @see com::sun::star::configuration::UpdateRootElement
72cdf0e10cSrcweir	Implementations that support modifying data in the hierarchy
73cdf0e10cSrcweir	implement service UpdateRootElement.
74cdf0e10cSrcweir
75cdf0e10cSrcweir @see com::sun::star::configuration::SetElement
76cdf0e10cSrcweir	A complementary service, for children of a dynamic homogeneous container.
77cdf0e10cSrcweir
78cdf0e10cSrcweir @see com::sun::star::configuration::GroupElement
79cdf0e10cSrcweir	A complementary service, for children of a static heterogeneous collection.
80cdf0e10cSrcweir
81cdf0e10cSrcweir @see com::sun::star::configuration::ConfigurationProvider
82cdf0e10cSrcweir	Objects provided by a <type>ConfigurationProvider</type> implement this service.
83cdf0e10cSrcweir*/
84cdf0e10cSrcweirpublished service AccessRootElement
85cdf0e10cSrcweir{
86cdf0e10cSrcweir/** the basic service for accessing information about an element in the
87cdf0e10cSrcweir hierarchy.
88cdf0e10cSrcweir*/
89cdf0e10cSrcweir	service HierarchyElement;
90cdf0e10cSrcweir
91cdf0e10cSrcweir/** allows controlling or observing the lifetime of the whole hierarchy.
92cdf0e10cSrcweir
93cdf0e10cSrcweir <p>The owner of the hierarchy may dispose of this object
94cdf0e10cSrcweir using <member scope="com::sun::star::lang">XComponent::dispose()</member>.
95cdf0e10cSrcweir As this object owns its child elements and, recursively, the whole hierarchy,
96cdf0e10cSrcweir any descendant elements obtained, directly or indirectly, from this object
97cdf0e10cSrcweir will also be disposed. Disposing of the object does not affect a persistent
98cdf0e10cSrcweir representation of the hierarchy.
99cdf0e10cSrcweir </p>
100cdf0e10cSrcweir
101cdf0e10cSrcweir <p>When an implementation is obtained from a factory or provider, ownership
102cdf0e10cSrcweir of it is usually transferred to the client. See the documentation
103cdf0e10cSrcweir of the particular provider or factory service for details.
104cdf0e10cSrcweir </p>
105cdf0e10cSrcweir
106cdf0e10cSrcweir <p>The provider of this object may still dispose of this object, when the
107cdf0e10cSrcweir lifetime of the provider ends or if these objects represent
108cdf0e10cSrcweir the root of only a fragment of an enclosing hierarchy and
109cdf0e10cSrcweir this fragment is removed from the complete hierarchy by an outside source.
110cdf0e10cSrcweir </p>
111cdf0e10cSrcweir
112cdf0e10cSrcweir <p>Clients may register an <type scope="com::sun::star::lang">XEventListener</type>
113cdf0e10cSrcweir to be notified when the object is disposed for either cause.
114cdf0e10cSrcweir </p>
115cdf0e10cSrcweir*/
116cdf0e10cSrcweir	interface com::sun::star::lang::XComponent;
117cdf0e10cSrcweir
118cdf0e10cSrcweir/** allows registering listeners that observe the whole hierarchy.
119cdf0e10cSrcweir
120cdf0e10cSrcweir <p>A client can register an
121cdf0e10cSrcweir <type scope="com::sun::star::util">XChangesListener</type>,
122cdf0e10cSrcweir which will receive notifications for any changes within the
123cdf0e10cSrcweir hierarchy (fragment) this object represents.
124cdf0e10cSrcweir </p>
125cdf0e10cSrcweir
126cdf0e10cSrcweir <p>An implementation will collect as many changes as possible into a single
127cdf0e10cSrcweir <type scope="com::sun::star::util">ChangesEvent</type>. For Example:
128cdf0e10cSrcweir </p>
129cdf0e10cSrcweir
130cdf0e10cSrcweir <p>
131cdf0e10cSrcweir If <member scope="com::sun::star::beans">XMultiPropertySet::setPropertyValues()</member>
132cdf0e10cSrcweir or <member scope="com::sun::star::beans">XMultiHierarchicalPropertySet::setHierarchicalPropertyValues()</member>
133cdf0e10cSrcweir is used on an element of the hierarchy to change multiple values within
134cdf0e10cSrcweir the hierarchy, all changes will be notified with a single event.
135cdf0e10cSrcweir </p>
136cdf0e10cSrcweir
137cdf0e10cSrcweir <p>If an outside source uses
138cdf0e10cSrcweir <member scope="com::sun::star::util">XChangesBatch::commitChanges()</member>
139cdf0e10cSrcweir on an overlapping hierarchy access, all relevant changes will be notified
140cdf0e10cSrcweir with a single event.
141cdf0e10cSrcweir </p>
142cdf0e10cSrcweir
143cdf0e10cSrcweir @ see UpdateRootElement
144cdf0e10cSrcweir @ see com::sun::star::util::XChangesBatch
145cdf0e10cSrcweir*/
146cdf0e10cSrcweir	interface com::sun::star::util::XChangesNotifier;
147cdf0e10cSrcweir
148cdf0e10cSrcweir/** provides access to the locale that applies to locale-dependent data
149cdf0e10cSrcweir in this hierarchy. [optional]
150cdf0e10cSrcweir
151cdf0e10cSrcweir <p>This interface may be missing if the implementation does not support
152cdf0e10cSrcweir locale-dependent data in the hierarchy or if the (partial) hierarchy rooted
153cdf0e10cSrcweir in this object does not contain any locale-dependent elements.
154cdf0e10cSrcweir </p>
155cdf0e10cSrcweir
156cdf0e10cSrcweir <p><em>Changing the locale is generally not supported.</em> If it is supported,
157cdf0e10cSrcweir there is no guarantee that values already loaded into the hierarchy, or an
158cdf0e10cSrcweir application cache, are refreshed to reflect the new locale. Use of
159cdf0e10cSrcweir <member scope="com::sun::star::lang">XLocalizable::setLocale()</member>
160cdf0e10cSrcweir is therefore not recommended.
161cdf0e10cSrcweir </p>
162cdf0e10cSrcweir*/
163cdf0e10cSrcweir	[optional] interface com::sun::star::lang::XLocalizable;
164cdf0e10cSrcweir
165cdf0e10cSrcweir};
166cdf0e10cSrcweir
167cdf0e10cSrcweir//=============================================================================
168cdf0e10cSrcweir
169cdf0e10cSrcweir}; }; }; };
170cdf0e10cSrcweir
171cdf0e10cSrcweir#endif
172cdf0e10cSrcweir
173