1*408a4873SAndrew Rist/************************************************************** 2cdf0e10cSrcweir * 3*408a4873SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*408a4873SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*408a4873SAndrew Rist * distributed with this work for additional information 6*408a4873SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*408a4873SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*408a4873SAndrew Rist * "License"); you may not use this file except in compliance 9*408a4873SAndrew Rist * with the License. You may obtain a copy of the License at 10*408a4873SAndrew Rist * 11*408a4873SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*408a4873SAndrew Rist * 13*408a4873SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*408a4873SAndrew Rist * software distributed under the License is distributed on an 15*408a4873SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*408a4873SAndrew Rist * KIND, either express or implied. See the License for the 17*408a4873SAndrew Rist * specific language governing permissions and limitations 18*408a4873SAndrew Rist * under the License. 19*408a4873SAndrew Rist * 20*408a4873SAndrew Rist *************************************************************/ 21*408a4873SAndrew Rist 22*408a4873SAndrew Rist 23cdf0e10cSrcweir#ifndef __com_sun_star_beans_XPropertySet_idl__ 24cdf0e10cSrcweir#define __com_sun_star_beans_XPropertySet_idl__ 25cdf0e10cSrcweir 26cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__ 27cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl> 28cdf0e10cSrcweir#endif 29cdf0e10cSrcweir 30cdf0e10cSrcweir#ifndef __com_sun_star_beans_XPropertySetInfo_idl__ 31cdf0e10cSrcweir#include <com/sun/star/beans/XPropertySetInfo.idl> 32cdf0e10cSrcweir#endif 33cdf0e10cSrcweir 34cdf0e10cSrcweir#ifndef __com_sun_star_beans_UnknownPropertyException_idl__ 35cdf0e10cSrcweir#include <com/sun/star/beans/UnknownPropertyException.idl> 36cdf0e10cSrcweir#endif 37cdf0e10cSrcweir 38cdf0e10cSrcweir#ifndef __com_sun_star_beans_PropertyVetoException_idl__ 39cdf0e10cSrcweir#include <com/sun/star/beans/PropertyVetoException.idl> 40cdf0e10cSrcweir#endif 41cdf0e10cSrcweir 42cdf0e10cSrcweir#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 43cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl> 44cdf0e10cSrcweir#endif 45cdf0e10cSrcweir 46cdf0e10cSrcweir#ifndef __com_sun_star_lang_WrappedTargetException_idl__ 47cdf0e10cSrcweir#include <com/sun/star/lang/WrappedTargetException.idl> 48cdf0e10cSrcweir#endif 49cdf0e10cSrcweir 50cdf0e10cSrcweir#ifndef __com_sun_star_beans_XPropertyChangeListener_idl__ 51cdf0e10cSrcweir#include <com/sun/star/beans/XPropertyChangeListener.idl> 52cdf0e10cSrcweir#endif 53cdf0e10cSrcweir 54cdf0e10cSrcweir#ifndef __com_sun_star_beans_XVetoableChangeListener_idl__ 55cdf0e10cSrcweir#include <com/sun/star/beans/XVetoableChangeListener.idl> 56cdf0e10cSrcweir#endif 57cdf0e10cSrcweir 58cdf0e10cSrcweir 59cdf0e10cSrcweir//============================================================================= 60cdf0e10cSrcweir 61cdf0e10cSrcweirmodule com { module sun { module star { module beans { 62cdf0e10cSrcweir 63cdf0e10cSrcweir//============================================================================= 64cdf0e10cSrcweir 65cdf0e10cSrcweir/** provides information about and access to the 66cdf0e10cSrcweir properties from an implementation. 67cdf0e10cSrcweir 68cdf0e10cSrcweir <p>There are three types of properties: </p> 69cdf0e10cSrcweir 70cdf0e10cSrcweir <ul> 71cdf0e10cSrcweir <li>bound properties </li> 72cdf0e10cSrcweir <li>constrained properties </li> 73cdf0e10cSrcweir <li>free properties </li> 74cdf0e10cSrcweir </ul> 75cdf0e10cSrcweir 76cdf0e10cSrcweir <p>You can listen to changes of bound properties with the 77cdf0e10cSrcweir <type>XPropertyChangeListener</type> and you can veto changes 78cdf0e10cSrcweir of constrained properties with the <type>XVetoableChangeListener</type>. </p> 79cdf0e10cSrcweir 80cdf0e10cSrcweir <p>To implement inaccurate name access, you must support the 81cdf0e10cSrcweir interface <type>XExactName</type>. </p> 82cdf0e10cSrcweir 83cdf0e10cSrcweir @see com::sun::star::beans::XExactName 84cdf0e10cSrcweir */ 85cdf0e10cSrcweirpublished interface XPropertySet: com::sun::star::uno::XInterface 86cdf0e10cSrcweir{ 87cdf0e10cSrcweir //------------------------------------------------------------------------- 88cdf0e10cSrcweir 89cdf0e10cSrcweir /** @returns 90cdf0e10cSrcweir the <type>XPropertySetInfo</type> interface, which 91cdf0e10cSrcweir describes all properties of the object which supplies this 92cdf0e10cSrcweir interface. 93cdf0e10cSrcweir 94cdf0e10cSrcweir @returns 95cdf0e10cSrcweir <const>NULL</const> if the implementation cannot or will 96cdf0e10cSrcweir not provide information about the properties; otherwise the 97cdf0e10cSrcweir interface <type>XPropertySetInfo</type> is returned. 98cdf0e10cSrcweir */ 99cdf0e10cSrcweir com::sun::star::beans::XPropertySetInfo getPropertySetInfo(); 100cdf0e10cSrcweir 101cdf0e10cSrcweir //------------------------------------------------------------------------- 102cdf0e10cSrcweir 103cdf0e10cSrcweir /** sets the value of the property with the specified name. 104cdf0e10cSrcweir 105cdf0e10cSrcweir <p>If it is a bound property the value will be changed before 106cdf0e10cSrcweir the change event is fired. If it is a constrained property 107cdf0e10cSrcweir a vetoable event is fired before the property value can be 108cdf0e10cSrcweir changed. </p> 109cdf0e10cSrcweir 110cdf0e10cSrcweir @throws com::sun::star::beans::PropertyVetoException 111cdf0e10cSrcweir if the property is read-only or vetoable 112cdf0e10cSrcweir and one of the listeners throws this exception 113cdf0e10cSrcweir because of an unaccepted new value. 114cdf0e10cSrcweir */ 115cdf0e10cSrcweir void setPropertyValue( [in] string aPropertyName, 116cdf0e10cSrcweir [in] any aValue ) 117cdf0e10cSrcweir raises( com::sun::star::beans::UnknownPropertyException, 118cdf0e10cSrcweir com::sun::star::beans::PropertyVetoException, 119cdf0e10cSrcweir com::sun::star::lang::IllegalArgumentException, 120cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException ); 121cdf0e10cSrcweir 122cdf0e10cSrcweir //------------------------------------------------------------------------- 123cdf0e10cSrcweir 124cdf0e10cSrcweir /** @returns 125cdf0e10cSrcweir the value of the property with the specified name. 126cdf0e10cSrcweir 127cdf0e10cSrcweir @param PropertyName 128cdf0e10cSrcweir This parameter specifies the name of the property. 129cdf0e10cSrcweir 130cdf0e10cSrcweir @throws UnknownPropertyException 131cdf0e10cSrcweir if the property does not exist. 132cdf0e10cSrcweir 133cdf0e10cSrcweir @throws com::sun::star::lang::WrappedTargetException 134cdf0e10cSrcweir if the implementation has an internal reason for the exception. 135cdf0e10cSrcweir In this case the original exception is wrapped into that 136cdf0e10cSrcweir <type scope="com::sun::star::lang">WrappedTargetException</type>. 137cdf0e10cSrcweir */ 138cdf0e10cSrcweir any getPropertyValue( [in] string PropertyName ) 139cdf0e10cSrcweir raises( com::sun::star::beans::UnknownPropertyException, 140cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException ); 141cdf0e10cSrcweir 142cdf0e10cSrcweir //------------------------------------------------------------------------- 143cdf0e10cSrcweir 144cdf0e10cSrcweir /** adds an <type>XPropertyChangeListener</type> to the specified property. 145cdf0e10cSrcweir 146cdf0e10cSrcweir <p>An empty name ("") registers the listener to all bound 147cdf0e10cSrcweir properties. If the property is not bound, the behavior is 148cdf0e10cSrcweir not specified. </p> 149cdf0e10cSrcweir 150cdf0e10cSrcweir <p>It is suggested to allow multiple registration of the same listener, 151cdf0e10cSrcweir thus for each time a listener is added, it has to be removed. 152cdf0e10cSrcweir 153cdf0e10cSrcweir @see removePropertyChangeListener 154cdf0e10cSrcweir */ 155cdf0e10cSrcweir void addPropertyChangeListener( [in] string aPropertyName, 156cdf0e10cSrcweir [in] com::sun::star::beans::XPropertyChangeListener xListener ) 157cdf0e10cSrcweir raises( com::sun::star::beans::UnknownPropertyException, 158cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException ); 159cdf0e10cSrcweir 160cdf0e10cSrcweir //------------------------------------------------------------------------- 161cdf0e10cSrcweir 162cdf0e10cSrcweir /** removes an <type>XPropertyChangeListener</type> from 163cdf0e10cSrcweir the listener list. 164cdf0e10cSrcweir 165cdf0e10cSrcweir <p>It is a "noop" if the listener is not registered. </p> 166cdf0e10cSrcweir 167cdf0e10cSrcweir <p>It is suggested to allow multiple registration of the same listener, 168cdf0e10cSrcweir thus for each time a listener is added, it has to be removed. 169cdf0e10cSrcweir 170cdf0e10cSrcweir @see addPropertyChangeListener 171cdf0e10cSrcweir */ 172cdf0e10cSrcweir void removePropertyChangeListener( [in] string aPropertyName, 173cdf0e10cSrcweir [in] com::sun::star::beans::XPropertyChangeListener aListener ) 174cdf0e10cSrcweir raises( com::sun::star::beans::UnknownPropertyException, 175cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException ); 176cdf0e10cSrcweir 177cdf0e10cSrcweir //------------------------------------------------------------------------- 178cdf0e10cSrcweir 179cdf0e10cSrcweir /** adds an <type>XVetoableChangeListener</type> to the specified 180cdf0e10cSrcweir property with the name PropertyName. 181cdf0e10cSrcweir 182cdf0e10cSrcweir <p>An empty name ("") registers the listener to all 183cdf0e10cSrcweir constrained properties. If the property is not constrained, 184cdf0e10cSrcweir the behavior is not specified. </p> 185cdf0e10cSrcweir 186cdf0e10cSrcweir @see removeVetoableChangeListener 187cdf0e10cSrcweir */ 188cdf0e10cSrcweir void addVetoableChangeListener( [in] string PropertyName, 189cdf0e10cSrcweir [in] com::sun::star::beans::XVetoableChangeListener aListener ) 190cdf0e10cSrcweir raises( com::sun::star::beans::UnknownPropertyException, 191cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException ); 192cdf0e10cSrcweir 193cdf0e10cSrcweir //------------------------------------------------------------------------- 194cdf0e10cSrcweir 195cdf0e10cSrcweir /** removes an <type>XVetoableChangeListener</type> from the 196cdf0e10cSrcweir listener list. 197cdf0e10cSrcweir 198cdf0e10cSrcweir <p>It is a "noop" if the listener is not registered. </p> 199cdf0e10cSrcweir 200cdf0e10cSrcweir @see addVetoableChangeListener 201cdf0e10cSrcweir */ 202cdf0e10cSrcweir void removeVetoableChangeListener( [in] string PropertyName, 203cdf0e10cSrcweir [in] com::sun::star::beans::XVetoableChangeListener aListener ) 204cdf0e10cSrcweir raises( com::sun::star::beans::UnknownPropertyException, 205cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException ); 206cdf0e10cSrcweir 207cdf0e10cSrcweir}; 208cdf0e10cSrcweir 209cdf0e10cSrcweir//============================================================================= 210cdf0e10cSrcweir 211cdf0e10cSrcweir}; }; }; }; 212cdf0e10cSrcweir 213cdf0e10cSrcweir#endif 214