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_beans_XHierarchicalPropertySet_idl__
28#define __com_sun_star_beans_XHierarchicalPropertySet_idl__
29
30#ifndef __com_sun_star_uno_XInterface_idl__
31#include <com/sun/star/uno/XInterface.idl>
32#endif
33
34#ifndef __com_sun_star_beans_XHierarchicalPropertySetInfo_idl__
35#include <com/sun/star/beans/XHierarchicalPropertySetInfo.idl>
36#endif
37
38#ifndef __com_sun_star_beans_UnknownPropertyException_idl__
39#include <com/sun/star/beans/UnknownPropertyException.idl>
40#endif
41
42#ifndef __com_sun_star_beans_PropertyVetoException_idl__
43#include <com/sun/star/beans/PropertyVetoException.idl>
44#endif
45
46#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
47#include <com/sun/star/lang/IllegalArgumentException.idl>
48#endif
49
50#ifndef __com_sun_star_lang_WrappedTargetException_idl__
51#include <com/sun/star/lang/WrappedTargetException.idl>
52#endif
53
54
55//=============================================================================
56
57module com {  module sun {  module star {  module beans {
58
59//=============================================================================
60
61/** provides information about and access to the
62	a hierarchy of properties from an implementation.
63
64	<p> Usually an object that implements this interface
65		also implements <type>XPropertySet</type> and at
66		least some of the properties have subproperties.  </p>
67
68	<p> This interface allows direct access to subsubproperties, ...
69		up to an arbitrary nesting depth. Often the intermediate
70		elements of the hierarchy implement <type>XProperty</type>.  </p>
71
72	<p> Each implementation specifies how the
73		hierarchical property names, that are
74		used to access the elements of the hierarchy,
75		are formed.  </p>
76
77	<p> Commonly a notation similar to filesystem pathes
78		(separated by '/' slashes) or nested module names
79		(separated by dots '.' or '::') is used.  </p>
80
81 */
82published interface XHierarchicalPropertySet: com::sun::star::uno::XInterface
83{
84	//-------------------------------------------------------------------------
85
86	/** retrieve information about the hierarchy of properties
87
88		@returns
89				the <type>XHierarchicalPropertySetInfo</type> interface,
90				which describes the property hierarchy of the object which
91				supplies this interface.
92
93		@returns
94				<NULL/> if the implementation cannot or will
95				not provide information about the properties; otherwise the
96				interface <type>XHierarchicalPropertySetInfo</type> is returned.
97	 */
98	com::sun::star::beans::XHierarchicalPropertySetInfo
99				getHierarchicalPropertySetInfo();
100
101	//-------------------------------------------------------------------------
102
103	/** sets the value of the property with the specified nested name.
104
105		@param	aHierarchicalPropertyName
106				This parameter specifies the name of the property.
107
108		@param	aValue
109				This parameter specifies the new value for the property.
110
111		@throws UnknownPropertyException
112				if the property does not exist.
113
114		@throws PropertyVetoException
115				if the property is constrained and the change is vetoed by a
116				<type>XVetoableChangeListener</type>.
117
118		@throws com::sun::star::uno::lang::IllegalArgumentException
119				if <var>aValue</var> is not a legal value for this property or
120				if <var>aHierarchicalPropertyName</var> is not a well-formed
121				nested name for this hierarchy.
122				An implementation is not required to detect the latter condition.
123
124		@throws com::sun::star::lang::WrappedTargetException
125				if the implementation has an internal reason for the exception.
126				In this case the original exception is wrapped into that
127				<type scope="com::sun::star::lang">WrappedTargetException</type>.
128
129		@see XPropertySet::setPropertyValue
130	 */
131	void setHierarchicalPropertyValue( [in] string aHierarchicalPropertyName,
132			 [in] any aValue )
133			raises( com::sun::star::beans::UnknownPropertyException,
134					com::sun::star::beans::PropertyVetoException,
135					com::sun::star::lang::IllegalArgumentException,
136					com::sun::star::lang::WrappedTargetException );
137
138	//-------------------------------------------------------------------------
139
140	/** @returns
141				the value of the property with the specified nested name.
142
143		@param	aHierarchicalPropertyName
144				This parameter specifies the name of the property.
145
146		@throws UnknownPropertyException
147				if the property does not exist.
148
149		@throws com::sun::star::uno::lang::IllegalArgumentException
150				if <var>aHierarchicalPropertyName</var> is not a well-formed
151				nested name for this hierarchy.
152			   	An implementation is not required to detect this
153				condition.
154
155		@throws com::sun::star::lang::WrappedTargetException
156				if the implementation has an internal reason for the exception.
157				In this case the original exception is wrapped into that
158				<type scope="com::sun::star::lang">WrappedTargetException</type>.
159
160		@see XPropertySet::getPropertyValue
161	 */
162	any getHierarchicalPropertyValue( [in] string aHierarchicalPropertyName )
163			raises( com::sun::star::beans::UnknownPropertyException,
164					com::sun::star::lang::IllegalArgumentException,
165					com::sun::star::lang::WrappedTargetException );
166
167	//-------------------------------------------------------------------------
168
169};
170
171//=============================================================================
172
173}; }; }; };
174
175#endif
176