1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_configuration_HierarchyElement_idl__
28#define __com_sun_star_configuration_HierarchyElement_idl__
29
30#ifndef __com_sun_star_container_XNamed_idl__
31#include <com/sun/star/container/XNamed.idl>
32#endif
33
34#ifndef __com_sun_star_container_XHierarchicalName_idl__
35#include <com/sun/star/container/XHierarchicalName.idl>
36#endif
37
38#ifndef __com_sun_star_beans_XProperty_idl__
39#include <com/sun/star/beans/XProperty.idl>
40#endif
41
42#ifndef __com_sun_star_beans_XPropertyWithState_idl__
43#include <com/sun/star/beans/XPropertyWithState.idl>
44#endif
45
46#ifndef __com_sun_star_container_XChild_idl__
47#include <com/sun/star/container/XChild.idl>
48#endif
49
50//=============================================================================
51
52module com { module sun { module star { module configuration {
53
54//=============================================================================
55/** provides information about an element within a hierarchy.
56
57 <p>The local name and the full hierarchical name can be retrieved.
58 Attributes detailing the role of the element can be queried.
59 The state of the element (regarding defaults) can be accessed.
60 </p>
61
62 <p>Implementations of this service usually also implement
63 service <type>HierarchyAccess</type>, which concerns the complementary role
64 of providing access to subelements of the hierarchy.
65 </p>
66*/
67published service HierarchyElement
68{
69/** provides the complete hierarchical name of this element
70 within the hierarchy tree.
71*/
72	interface com::sun::star::container::XHierarchicalName;
73
74/** provides the local name of this element within its parent.
75
76 <p><em>Renaming an element is generally not supported.</em></p>
77*/
78	interface com::sun::star::container::XNamed;
79
80/** provides a property descriptor for this element.[optional]
81
82 <p>This interface may be missing, if the hierarchy supports no traits that are
83 described by <type scope="com::sun::star::beans">PropertyAttribute</type>
84 values.
85 </p>
86
87 <p>If the parent of this object implements
88 <type scope="com::sun::star::beans">XPropertySetInfo</type>, then this returns
89 the same <type scope="com::sun::star::beans">Property</type> as the
90 <type scope="com::sun::star::beans">XPropertySetInfo</type> of the parent.
91 </p>
92*/
93	[optional] interface com::sun::star::beans::XProperty;
94
95/** provides access to the default state of this element. [optional]
96
97 <p>This interface may be missing, if the hierarchy supports access to
98 a default state and values only for simple values or not at all.
99 </p>
100
101 <p>If the parent of this object implements
102 <type scope="com::sun::star::beans">XPropertyState</type>, then members
103 of this interface have the same effect as corresponding members of the parent.
104 </p>
105
106 <p>If an implementation is part of a <em>read-only</em> view of the hierarchy,
107 attempts to change property states will fail.
108 </p>
109*/
110	[optional] interface com::sun::star::beans::XPropertyWithState;
111
112/** provides access to the parent of this element [optional].
113
114 <p>This interface may be missing if this object is not obtained
115 as a child or descendant of another tree node, for example, directly from a factory or provider.
116 </p>
117
118 <p><member scope="com::sun::star::container">XChild::getParent()</member>
119 returns NULL, if this object is currently not contained in another node.
120 </p>
121
122 <p><em>Setting a different parent is, generally, not supported.</em></p>
123*/
124	[optional] interface com::sun::star::container::XChild;
125
126};
127
128//=============================================================================
129
130}; }; }; };
131
132#endif
133