xref: /AOO42X/main/udkapi/com/sun/star/beans/XPropertyState.idl (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
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_XPropertyState_idl__
28#define __com_sun_star_beans_XPropertyState_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_PropertyState_idl__
35#include <com/sun/star/beans/PropertyState.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_lang_WrappedTargetException_idl__
43#include <com/sun/star/lang/WrappedTargetException.idl>
44#endif
45
46#ifndef __com_sun_star_beans_XPropertyStateChangeListener_idl__
47#include <com/sun/star/beans/XPropertyStateChangeListener.idl>
48#endif
49
50
51//=============================================================================
52
53module com {  module sun {  module star {  module beans {
54
55//=============================================================================
56
57/** makes it possible to query information about the state of
58    one or more properties.
59
60    <p>The state contains the information if:</p>
61    <ul>
62        <li>a value is available or void</li>
63        <li>the value is stored in the object itself, or if a default value is to be used</li>
64        <li>and if the value cannot be determined, due to ambiguity
65            (multi selection with multiple values).</li>
66    </ul>
67 */
68published interface XPropertyState: com::sun::star::uno::XInterface
69{
70    //-------------------------------------------------------------------------
71
72    /** @returns
73                the state of the property.
74
75        @param  aPropertyName
76            specifies the name of the property.
77
78        @throws UnknownPropertyException
79            if the property does not exist.
80     */
81    com::sun::star::beans::PropertyState getPropertyState( [in] string PropertyName )
82            raises( com::sun::star::beans::UnknownPropertyException );
83
84    //-------------------------------------------------------------------------
85
86    /** @returns
87            a sequence of the states of the properties which are specified
88                by their names.
89
90        <p>The order of the states is correlating to the order of the
91        given property names. </p>
92
93        @param aPropertyNames
94            contains the sequence of property names.
95
96        @throws UnknownPropertyException
97            if one property does not exist.
98     */
99    sequence<com::sun::star::beans::PropertyState> getPropertyStates(
100            [in] sequence<string> aPropertyName )
101        raises( com::sun::star::beans::UnknownPropertyException );
102
103    //-------------------------------------------------------------------------
104
105    /** Sets the property to default value.
106
107        <p>The value depends on the implementation of this interface.
108        If it is a bound property, you must change the value before
109        the change events are fired.  If it is a constrained property, you
110        must fire the vetoable event before you change the property value.
111        </p>
112
113        @param aPropertyname
114            specifies the name of the property.
115
116        @throws UnknownPropertyException
117            if the property does not exist.
118     */
119    void setPropertyToDefault( [in] string PropertyName )
120            raises( com::sun::star::beans::UnknownPropertyException );
121
122    //-------------------------------------------------------------------------
123
124    /** @returns
125            the default value of the property with the name PropertyName.
126
127        <p>If no default exists, is not known or is void,
128        then the return type is <atom>void</atom>.
129
130        @param aPropertyName
131            specifies the name of the property.
132
133        @throws UnknownPropertyException
134            if the property does not exist.
135
136        @throws  com::sun::star::lang::WrappedTargetException
137            if the implementation has an internal reason for the exception.
138            In this case the original exception is wrapped into that
139            <type scope="com::sun::star::lang">WrappedTargetException</type>.
140     */
141    any getPropertyDefault( [in] string aPropertyName )
142            raises( com::sun::star::beans::UnknownPropertyException,
143                    com::sun::star::lang::WrappedTargetException );
144};
145
146//=============================================================================
147
148}; }; }; };
149
150#endif
151