1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XIntrospectionAccess.idl,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_beans_XIntrospectionAccess_idl__
31 #define __com_sun_star_beans_XIntrospectionAccess_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include
<com
/sun
/star
/uno
/XInterface.idl
>
37 #ifndef __com_sun_star_beans_Property_idl__
38 #include
<com
/sun
/star
/beans
/Property.idl
>
41 #ifndef __com_sun_star_container_NoSuchElementException_idl__
42 #include
<com
/sun
/star
/container
/NoSuchElementException.idl
>
45 #ifndef __com_sun_star_reflection_XIdlMethod_idl__
46 #include
<com
/sun
/star
/reflection
/XIdlMethod.idl
>
49 #ifndef __com_sun_star_lang_NoSuchMethodException_idl__
50 #include
<com
/sun
/star
/lang
/NoSuchMethodException.idl
>
53 #ifndef __com_sun_star_reflection_XIdlClass_idl__
54 #include
<com
/sun
/star
/reflection
/XIdlClass.idl
>
57 #ifndef __com_sun_star_beans_IllegalTypeException_idl__
58 #include
<com
/sun
/star
/beans
/IllegalTypeException.idl
>
61 //=============================================================================
63 module com
{ module sun
{ module star
{ module beans
{
65 //=============================================================================
67 /** represents the result of an introspection operation done by
68 the inspect method of <type scope="com::sun::star::beans">
69 XIntrospection</type>.
71 <p>This interface gives information about an object's
72 properties and methods as detected in the introspection
73 process. It's not possible to access properties or call
74 methods directly using this interface but it provides
75 access to other interfaces to do so.
76 See <member scope="com::sun::star::beans">
77 XIntrospectionAccess::queryAdapter()</member></p>
79 <p>The <type>XExactName</type> interface has to be supported
80 in order to implement inaccurate name access for all objects
81 which implement the <type scope="com::sun::star::container">
82 XNameAccess</type> interface or <type>XPropertySet</type>.</p>
84 <p>The <type>XMaterialHolder</type> interface has to be
85 supported to give access to the inspected object.</p>
88 @see com::sun::star::beans::XExactName
90 published
interface XIntrospectionAccess
: com
::sun
::star
::uno
::XInterface
92 //-------------------------------------------------------------------------
93 /** returns information about which method concepts described in
94 the <type>MethodConcept</type> constants group are supported
95 by this <type>XIntrospectionAccess</type> implementation.
97 <p>The minimum supported concepts should be:</p>
100 <li> <const>MethodConcept::PROPERTY</const>, </li>
101 <li> <const>MethodConcept::LISTENER</const>, </li>
102 <li> <const>MethodConcept::ENUMERATION</const>, </li>
103 <li> <const>MethodConcept::NAMECONTAINER</const></li>
104 <li> <const>MethodConcept::INDEXCONTAINER</const>; </li>
108 zero or more constants of the <type>MethodConcept</type>
109 constants group combined by an arithmetical or-operation.
111 long getSuppliedMethodConcepts
();
113 //-------------------------------------------------------------------------
114 /** returns information about which property concepts described in
115 the <type>PropertyConcept</type> constants group are supported
116 by this <type>XIntrospectionAccess</type> implementation.
118 <p>The minimum supported concepts should be:</p>
121 <li> <const>PropertyConcept::PROPERTYSET</const>, </li>
122 <li> <const>PropertyConcept::ATTRIBUTES</const> and </li>
123 <li> <const>PropertyConcept::METHODS</const>. </li>
127 zero or more constants of the <type>PropertyConcept</type>
128 constants group.combined by an arithmetical or-operation.
130 long getSuppliedPropertyConcepts
();
132 //-------------------------------------------------------------------------
133 /** returns information about a property if a property with
134 the demanded name exists and if it accords to one of the
135 demanded <type>PropertyConcept</type>s. The information
136 is provided as <type>Property</type> struct.
139 A <type>Property</type> struct providing
140 information about the demanded property,
141 if a corresponding property exists.
144 the name of the property.
146 @param nPropertyConcepts
147 zero or more constants of the <type>PropertyConcept
148 </type> constants group combined by an arithmetical
151 @throws NoSuchElementException
152 when a property with the demanded name doesn't exist
153 or if it accords to a wrong <type>PropertyConcept
156 com
::sun
::star
::beans
::Property getProperty
( [in] string aName
,
157 [in] long nPropertyConcepts
)
158 raises
( com
::sun
::star
::container
::NoSuchElementException
);
160 //-------------------------------------------------------------------------
161 /** allows to ask if a property with the demanded name exists
162 and if it accords to one of the demanded <type>
163 PropertyConcept</type>s.
166 <TRUE/> if the property exists and accords to one of
167 the demanded <type>PropertyConcept</type>s, otherwise
168 <FALSE/> is returned.
171 the name of the property.
173 @param nPropertyConcepts
174 zero or more constants of the <type>PropertyConcept
175 </type> constants group combined by an arithmetical
178 boolean hasProperty
( [in] string aName
,
179 [in] long nPropertyConcepts
);
181 //-------------------------------------------------------------------------
182 /** returns a sequence of properties of the introspected object
185 all properties of the introspected object which accord
186 to the demanded <type>PropertyConcept</type>s.
188 @param nPropertyConcepts
189 zero or more constants of the <type>PropertyConcept
190 </type> constants group combined by an arithmetical
193 sequence
<com
::sun
::star
::beans
::Property
> getProperties
(
194 [in] long nPropertyConcepts
);
196 //-------------------------------------------------------------------------
197 /** returns information about a method if a method with
198 the demanded name exists and if it accords to one of
199 the demanded MethodConcepts. The information is
200 provided as <type scope="com::sun::star::reflection">
204 A <type scope="com::sun::star::reflection">
205 XIdlMethod</type> providing information about and
206 access to the demanded method if a corresponding
210 the name of the method.
212 @param nMethodConcepts
213 zero or more constants of the <type>MethodConcept
214 </type> constants group combined by an arithmetical
217 @throws NoSuchElementException
218 when a method with the demanded name doesn't exist
219 or if it accords to a wrong <type>MethodConcept</type>.
221 com
::sun
::star
::reflection
::XIdlMethod getMethod
( [in] string aName
,
222 [in] long nMethodConcepts
)
223 raises
( com
::sun
::star
::lang
::NoSuchMethodException
);
225 //-------------------------------------------------------------------------
226 /** allows to ask if a method with the demanded name exists
227 and if it accords to one of the demanded <type>MethodConcept
231 <TRUE/> if the method exists and accords to one of
232 the demanded <type>MethodConcept</type>s, otherwise
233 <FALSE/> is returned.
236 the name of the method.
238 @param nMethodConcepts
239 zero or more constants of the <type>MethodConcept
240 </type> constants group combined by an arithmetical
243 boolean hasMethod
( [in] string aName
,
244 [in] long nMethodConcepts
);
246 //-------------------------------------------------------------------------
247 /** returns a sequence of methods of the introspected object.
250 all methods of the introspected object which accord
251 to the demanded <type>MethodConcept</type>s.
253 @param nMethodConcepts
254 zero or more constants of the <type>MethodConcept
255 </type> constants group combined by an arithmetical
258 sequence
<com
::sun
::star
::reflection
::XIdlMethod
> getMethods
(
259 [in] long nMethodConcepts
);
261 //-------------------------------------------------------------------------
262 /** returns the listener types supported by the introspected
265 <p>If the introspected object has the methods
266 <code>addFooListener( XFooListener xFoo )</code> and
267 <code>removeFooListener( XFooListener xFoo )</code>
268 the type of XFooListener will be one of the elements
269 in the returned sequence.
272 a sequence of the types of listener interfaces
273 which are supported by the introspected object.
275 sequence
<type
> getSupportedListeners
();
277 //-------------------------------------------------------------------------
278 /** creates an adapter that implements an interface with the
281 <p>To access properties, query for the <type>XPropertySet
282 </type> interface. If the <type>XPropertySet</type> can
283 be queried, the <type>XFastPropertySet</type> interface
284 must be supported too. </p>
286 <p>If the introspected object implements a name container,
287 the introspection should return the <type scope=
288 "com::sun::star::container">XNameAccess</type> and <type
289 scope="com::sun::star::container">XNameContainer</type>
292 <p>If the introspected object implements an index container,
293 the introspection should return the <type scope=
294 "com::sun::star::container">XIndexAccess</type> and <type
295 scope="com::sun::star::container">XIndexContainer</type>
298 <p>If the introspected object implements an enumeration
299 container, the introspection should return the <type scope=
300 "com::sun::star::container">XEnumerationAccess</type>
303 <p>If the introspected object implements the <type scope=
304 "com::sun::star::reflection">XIdlArray</type> interface,
305 the introspection should return this.</p>
307 <p>To implement inaccurate name access, at all objects,
308 which implement the <type scope="com::sun::star::container">
309 XNameAccess</type> or <type>XPropertySet</type> interface,
310 the <type>XExactName</type> interface has to be supported.
313 @see com::sun::star::beans::XExactName
315 com
::sun
::star
::uno
::XInterface queryAdapter
( [in] type aInterfaceType
)
316 raises
( com
::sun
::star
::beans
::IllegalTypeException
);
320 //=============================================================================