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_XPropertyContainer_idl__
24#define __com_sun_star_beans_XPropertyContainer_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_reflection_XIdlClass_idl__
31#include <com/sun/star/reflection/XIdlClass.idl>
32#endif
33
34#ifndef __com_sun_star_beans_PropertyExistException_idl__
35#include <com/sun/star/beans/PropertyExistException.idl>
36#endif
37
38#ifndef __com_sun_star_beans_IllegalTypeException_idl__
39#include <com/sun/star/beans/IllegalTypeException.idl>
40#endif
41
42#ifndef __com_sun_star_beans_UnknownPropertyException_idl__
43#include <com/sun/star/beans/UnknownPropertyException.idl>
44#endif
45
46#ifndef __com_sun_star_beans_NotRemoveableException_idl__
47#include <com/sun/star/beans/NotRemoveableException.idl>
48#endif
49
50#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
51#include <com/sun/star/lang/IllegalArgumentException.idl>
52#endif
53
54//=============================================================================
55
56module com {  module sun {  module star {  module beans {
57
58//=============================================================================
59
60/** makes it possible to add and remove properties to or from an object.
61
62	<p>Some scripting engines cannot access properties directly when the
63	property set is changed.  Please use <member>XPropertySet::getPropertyValue</member>
64	etc. in this case. </p>
65 */
66published interface XPropertyContainer: com::sun::star::uno::XInterface
67{
68	//-------------------------------------------------------------------------
69
70	/** adds a property to the object.
71
72		@param aName
73			specifies the name of the new property.
74
75		@param Attributes
76			specifies the property attributes, see <type>PropertyAttribute</type>.
77
78		@param DefaultValue
79			specifies the type of the new property and a potential default value.
80
81		@throws PropertyExistException
82			if a property with the same name already exists.
83
84		@throws IllegalTypeException
85			if the specified type is not allowed.
86
87	 */
88	void addProperty( [in] string Name,
89			 		  [in] short Attributes,
90					  [in] any DefaultValue )
91			raises( com::sun::star::beans::PropertyExistException,
92					com::sun::star::beans::IllegalTypeException,
93					com::sun::star::lang::IllegalArgumentException );
94
95	//-------------------------------------------------------------------------
96
97	/** removes a property from the object.
98
99		@param aName
100			specified the name of the property.
101
102		@throws UnknownPropertyException
103			if the property does not exist.
104	 */
105	void removeProperty( [in] string Name )
106			raises( com::sun::star::beans::UnknownPropertyException,
107			        com::sun::star::beans::NotRemoveableException );
108};
109
110//=============================================================================
111
112}; }; }; };
113
114#endif
115