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