1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23#ifndef __com_sun_star_beans_XPropertyState_idl__ 24#define __com_sun_star_beans_XPropertyState_idl__ 25 26#ifndef __com_sun_star_uno_XInterface_idl__ 27#include <com/sun/star/uno/XInterface.idl> 28#endif 29 30#ifndef __com_sun_star_beans_PropertyState_idl__ 31#include <com/sun/star/beans/PropertyState.idl> 32#endif 33 34#ifndef __com_sun_star_beans_UnknownPropertyException_idl__ 35#include <com/sun/star/beans/UnknownPropertyException.idl> 36#endif 37 38#ifndef __com_sun_star_lang_WrappedTargetException_idl__ 39#include <com/sun/star/lang/WrappedTargetException.idl> 40#endif 41 42#ifndef __com_sun_star_beans_XPropertyStateChangeListener_idl__ 43#include <com/sun/star/beans/XPropertyStateChangeListener.idl> 44#endif 45 46 47//============================================================================= 48 49module com { module sun { module star { module beans { 50 51//============================================================================= 52 53/** makes it possible to query information about the state of 54 one or more properties. 55 56 <p>The state contains the information if:</p> 57 <ul> 58 <li>a value is available or void</li> 59 <li>the value is stored in the object itself, or if a default value is to be used</li> 60 <li>and if the value cannot be determined, due to ambiguity 61 (multi selection with multiple values).</li> 62 </ul> 63 */ 64published interface XPropertyState: com::sun::star::uno::XInterface 65{ 66 //------------------------------------------------------------------------- 67 68 /** @returns 69 the state of the property. 70 71 @param aPropertyName 72 specifies the name of the property. 73 74 @throws UnknownPropertyException 75 if the property does not exist. 76 */ 77 com::sun::star::beans::PropertyState getPropertyState( [in] string PropertyName ) 78 raises( com::sun::star::beans::UnknownPropertyException ); 79 80 //------------------------------------------------------------------------- 81 82 /** @returns 83 a sequence of the states of the properties which are specified 84 by their names. 85 86 <p>The order of the states is correlating to the order of the 87 given property names. </p> 88 89 @param aPropertyNames 90 contains the sequence of property names. 91 92 @throws UnknownPropertyException 93 if one property does not exist. 94 */ 95 sequence<com::sun::star::beans::PropertyState> getPropertyStates( 96 [in] sequence<string> aPropertyName ) 97 raises( com::sun::star::beans::UnknownPropertyException ); 98 99 //------------------------------------------------------------------------- 100 101 /** Sets the property to default value. 102 103 <p>The value depends on the implementation of this interface. 104 If it is a bound property, you must change the value before 105 the change events are fired. If it is a constrained property, you 106 must fire the vetoable event before you change the property value. 107 </p> 108 109 @param aPropertyname 110 specifies the name of the property. 111 112 @throws UnknownPropertyException 113 if the property does not exist. 114 */ 115 void setPropertyToDefault( [in] string PropertyName ) 116 raises( com::sun::star::beans::UnknownPropertyException ); 117 118 //------------------------------------------------------------------------- 119 120 /** @returns 121 the default value of the property with the name PropertyName. 122 123 <p>If no default exists, is not known or is void, 124 then the return type is <atom>void</atom>. 125 126 @param aPropertyName 127 specifies the name of the property. 128 129 @throws UnknownPropertyException 130 if the property does not exist. 131 132 @throws com::sun::star::lang::WrappedTargetException 133 if the implementation has an internal reason for the exception. 134 In this case the original exception is wrapped into that 135 <type scope="com::sun::star::lang">WrappedTargetException</type>. 136 */ 137 any getPropertyDefault( [in] string aPropertyName ) 138 raises( com::sun::star::beans::UnknownPropertyException, 139 com::sun::star::lang::WrappedTargetException ); 140}; 141 142//============================================================================= 143 144}; }; }; }; 145 146#endif 147