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_beans_XPropertySet_idl__
28*cdf0e10cSrcweir#define __com_sun_star_beans_XPropertySet_idl__
29*cdf0e10cSrcweir
30*cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__
31*cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl>
32*cdf0e10cSrcweir#endif
33*cdf0e10cSrcweir
34*cdf0e10cSrcweir#ifndef __com_sun_star_beans_XPropertySetInfo_idl__
35*cdf0e10cSrcweir#include <com/sun/star/beans/XPropertySetInfo.idl>
36*cdf0e10cSrcweir#endif
37*cdf0e10cSrcweir
38*cdf0e10cSrcweir#ifndef __com_sun_star_beans_UnknownPropertyException_idl__
39*cdf0e10cSrcweir#include <com/sun/star/beans/UnknownPropertyException.idl>
40*cdf0e10cSrcweir#endif
41*cdf0e10cSrcweir
42*cdf0e10cSrcweir#ifndef __com_sun_star_beans_PropertyVetoException_idl__
43*cdf0e10cSrcweir#include <com/sun/star/beans/PropertyVetoException.idl>
44*cdf0e10cSrcweir#endif
45*cdf0e10cSrcweir
46*cdf0e10cSrcweir#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
47*cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl>
48*cdf0e10cSrcweir#endif
49*cdf0e10cSrcweir
50*cdf0e10cSrcweir#ifndef __com_sun_star_lang_WrappedTargetException_idl__
51*cdf0e10cSrcweir#include <com/sun/star/lang/WrappedTargetException.idl>
52*cdf0e10cSrcweir#endif
53*cdf0e10cSrcweir
54*cdf0e10cSrcweir#ifndef __com_sun_star_beans_XPropertyChangeListener_idl__
55*cdf0e10cSrcweir#include <com/sun/star/beans/XPropertyChangeListener.idl>
56*cdf0e10cSrcweir#endif
57*cdf0e10cSrcweir
58*cdf0e10cSrcweir#ifndef __com_sun_star_beans_XVetoableChangeListener_idl__
59*cdf0e10cSrcweir#include <com/sun/star/beans/XVetoableChangeListener.idl>
60*cdf0e10cSrcweir#endif
61*cdf0e10cSrcweir
62*cdf0e10cSrcweir
63*cdf0e10cSrcweir//=============================================================================
64*cdf0e10cSrcweir
65*cdf0e10cSrcweirmodule com {  module sun {  module star {  module beans {
66*cdf0e10cSrcweir
67*cdf0e10cSrcweir//=============================================================================
68*cdf0e10cSrcweir
69*cdf0e10cSrcweir/** provides information about and access to the
70*cdf0e10cSrcweir	properties from an implementation.
71*cdf0e10cSrcweir
72*cdf0e10cSrcweir	<p>There are three types of properties: </p>
73*cdf0e10cSrcweir
74*cdf0e10cSrcweir	<ul>
75*cdf0e10cSrcweir		<li>bound properties </li>
76*cdf0e10cSrcweir		<li>constrained properties </li>
77*cdf0e10cSrcweir		<li>free properties </li>
78*cdf0e10cSrcweir	</ul>
79*cdf0e10cSrcweir
80*cdf0e10cSrcweir	<p>You can listen to changes of bound properties with the
81*cdf0e10cSrcweir	<type>XPropertyChangeListener</type> and you can veto changes
82*cdf0e10cSrcweir	of constrained properties with the <type>XVetoableChangeListener</type>.  </p>
83*cdf0e10cSrcweir
84*cdf0e10cSrcweir	<p>To implement inaccurate name access, you must support the
85*cdf0e10cSrcweir	interface <type>XExactName</type>. </p>
86*cdf0e10cSrcweir
87*cdf0e10cSrcweir	@see com::sun::star::beans::XExactName
88*cdf0e10cSrcweir */
89*cdf0e10cSrcweirpublished interface XPropertySet: com::sun::star::uno::XInterface
90*cdf0e10cSrcweir{
91*cdf0e10cSrcweir	//-------------------------------------------------------------------------
92*cdf0e10cSrcweir
93*cdf0e10cSrcweir	/** @returns
94*cdf0e10cSrcweir			the <type>XPropertySetInfo</type> interface, which
95*cdf0e10cSrcweir			describes all properties of the object which supplies this
96*cdf0e10cSrcweir			interface.
97*cdf0e10cSrcweir
98*cdf0e10cSrcweir		@returns
99*cdf0e10cSrcweir			<const>NULL</const> if the implementation cannot or will
100*cdf0e10cSrcweir			not provide information about the properties; otherwise the
101*cdf0e10cSrcweir			interface <type>XPropertySetInfo</type> is returned.
102*cdf0e10cSrcweir	 */
103*cdf0e10cSrcweir	com::sun::star::beans::XPropertySetInfo getPropertySetInfo();
104*cdf0e10cSrcweir
105*cdf0e10cSrcweir	//-------------------------------------------------------------------------
106*cdf0e10cSrcweir
107*cdf0e10cSrcweir	/** sets the value of the property with the specified name.
108*cdf0e10cSrcweir
109*cdf0e10cSrcweir		<p>If it is a bound property the value will be changed before
110*cdf0e10cSrcweir		the change event is fired.  If it is a constrained property
111*cdf0e10cSrcweir		a vetoable event is fired before the property value can be
112*cdf0e10cSrcweir		changed.  </p>
113*cdf0e10cSrcweir
114*cdf0e10cSrcweir		@throws com::sun::star::beans::PropertyVetoException
115*cdf0e10cSrcweir			if the property is read-only or vetoable
116*cdf0e10cSrcweir			and one of the listeners throws this exception
117*cdf0e10cSrcweir			because of an unaccepted new value.
118*cdf0e10cSrcweir	 */
119*cdf0e10cSrcweir	void setPropertyValue( [in] string aPropertyName,
120*cdf0e10cSrcweir			 [in] any aValue )
121*cdf0e10cSrcweir			raises( com::sun::star::beans::UnknownPropertyException,
122*cdf0e10cSrcweir					com::sun::star::beans::PropertyVetoException,
123*cdf0e10cSrcweir					com::sun::star::lang::IllegalArgumentException,
124*cdf0e10cSrcweir					com::sun::star::lang::WrappedTargetException );
125*cdf0e10cSrcweir
126*cdf0e10cSrcweir	//-------------------------------------------------------------------------
127*cdf0e10cSrcweir
128*cdf0e10cSrcweir	/** @returns
129*cdf0e10cSrcweir			the value of the property with the specified name.
130*cdf0e10cSrcweir
131*cdf0e10cSrcweir		@param PropertyName
132*cdf0e10cSrcweir			This parameter specifies the name of the property.
133*cdf0e10cSrcweir
134*cdf0e10cSrcweir		@throws UnknownPropertyException
135*cdf0e10cSrcweir			if the property does not exist.
136*cdf0e10cSrcweir
137*cdf0e10cSrcweir		@throws com::sun::star::lang::WrappedTargetException
138*cdf0e10cSrcweir			if the implementation has an internal reason for the exception.
139*cdf0e10cSrcweir			In this case the original exception is wrapped into that
140*cdf0e10cSrcweir			<type scope="com::sun::star::lang">WrappedTargetException</type>.
141*cdf0e10cSrcweir	 */
142*cdf0e10cSrcweir	any getPropertyValue( [in] string PropertyName )
143*cdf0e10cSrcweir			raises( com::sun::star::beans::UnknownPropertyException,
144*cdf0e10cSrcweir					com::sun::star::lang::WrappedTargetException );
145*cdf0e10cSrcweir
146*cdf0e10cSrcweir	//-------------------------------------------------------------------------
147*cdf0e10cSrcweir
148*cdf0e10cSrcweir	/** adds an <type>XPropertyChangeListener</type> to the specified property.
149*cdf0e10cSrcweir
150*cdf0e10cSrcweir		<p>An empty name ("") registers the listener to all bound
151*cdf0e10cSrcweir		properties. If the property is not bound, the behavior is
152*cdf0e10cSrcweir		not specified.  </p>
153*cdf0e10cSrcweir
154*cdf0e10cSrcweir		<p>It is suggested to allow multiple registration of the same listener,
155*cdf0e10cSrcweir		thus for each time a listener is added, it has to be removed.
156*cdf0e10cSrcweir
157*cdf0e10cSrcweir		@see removePropertyChangeListener
158*cdf0e10cSrcweir	 */
159*cdf0e10cSrcweir	void addPropertyChangeListener( [in] string aPropertyName,
160*cdf0e10cSrcweir			 [in] com::sun::star::beans::XPropertyChangeListener xListener )
161*cdf0e10cSrcweir			raises( com::sun::star::beans::UnknownPropertyException,
162*cdf0e10cSrcweir					com::sun::star::lang::WrappedTargetException );
163*cdf0e10cSrcweir
164*cdf0e10cSrcweir	//-------------------------------------------------------------------------
165*cdf0e10cSrcweir
166*cdf0e10cSrcweir	/** removes an <type>XPropertyChangeListener</type> from
167*cdf0e10cSrcweir		the listener list.
168*cdf0e10cSrcweir
169*cdf0e10cSrcweir		<p>It is a "noop" if the listener is not registered.  </p>
170*cdf0e10cSrcweir
171*cdf0e10cSrcweir		<p>It is suggested to allow multiple registration of the same listener,
172*cdf0e10cSrcweir		thus for each time a listener is added, it has to be removed.
173*cdf0e10cSrcweir
174*cdf0e10cSrcweir		@see addPropertyChangeListener
175*cdf0e10cSrcweir	 */
176*cdf0e10cSrcweir	void removePropertyChangeListener( [in] string aPropertyName,
177*cdf0e10cSrcweir			 [in] com::sun::star::beans::XPropertyChangeListener aListener )
178*cdf0e10cSrcweir			raises( com::sun::star::beans::UnknownPropertyException,
179*cdf0e10cSrcweir					com::sun::star::lang::WrappedTargetException );
180*cdf0e10cSrcweir
181*cdf0e10cSrcweir	//-------------------------------------------------------------------------
182*cdf0e10cSrcweir
183*cdf0e10cSrcweir	/** adds an <type>XVetoableChangeListener</type> to the specified
184*cdf0e10cSrcweir		property with the name PropertyName.
185*cdf0e10cSrcweir
186*cdf0e10cSrcweir		<p>An empty name ("") registers the listener to all
187*cdf0e10cSrcweir		constrained properties. If the property is not constrained,
188*cdf0e10cSrcweir		the behavior is not specified.  </p>
189*cdf0e10cSrcweir
190*cdf0e10cSrcweir		@see removeVetoableChangeListener
191*cdf0e10cSrcweir	 */
192*cdf0e10cSrcweir	void addVetoableChangeListener( [in] string PropertyName,
193*cdf0e10cSrcweir			 [in] com::sun::star::beans::XVetoableChangeListener aListener )
194*cdf0e10cSrcweir			raises( com::sun::star::beans::UnknownPropertyException,
195*cdf0e10cSrcweir					com::sun::star::lang::WrappedTargetException );
196*cdf0e10cSrcweir
197*cdf0e10cSrcweir	//-------------------------------------------------------------------------
198*cdf0e10cSrcweir
199*cdf0e10cSrcweir	/** removes an <type>XVetoableChangeListener</type> from the
200*cdf0e10cSrcweir		listener list.
201*cdf0e10cSrcweir
202*cdf0e10cSrcweir		<p>It is a "noop" if the listener is not registered.  </p>
203*cdf0e10cSrcweir
204*cdf0e10cSrcweir		@see addVetoableChangeListener
205*cdf0e10cSrcweir	 */
206*cdf0e10cSrcweir	void removeVetoableChangeListener( [in] string PropertyName,
207*cdf0e10cSrcweir			 [in] com::sun::star::beans::XVetoableChangeListener aListener )
208*cdf0e10cSrcweir			raises( com::sun::star::beans::UnknownPropertyException,
209*cdf0e10cSrcweir					com::sun::star::lang::WrappedTargetException );
210*cdf0e10cSrcweir
211*cdf0e10cSrcweir};
212*cdf0e10cSrcweir
213*cdf0e10cSrcweir//=============================================================================
214*cdf0e10cSrcweir
215*cdf0e10cSrcweir}; }; }; };
216*cdf0e10cSrcweir
217*cdf0e10cSrcweir#endif
218