1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
28 #ifndef __com_sun_star_frame_XModuleManager_idl__
29 #define __com_sun_star_frame_XModuleManager_idl__
31 #ifndef __com_sun_star_uno_XInterface_idl__
32 #include
<com
/sun
/star
/uno
/XInterface.idl
>
35 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
36 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
39 #ifndef __com_sun_star_frame_UnknownModuleException_idl__
40 #include
<com
/sun
/star
/frame
/UnknownModuleException.idl
>
43 //===============================================
45 module com
{ module sun
{ module star
{ module frame
{
47 //===============================================
48 /** can be used to identify office modules.
52 interface XModuleManager
: com
::sun
::star
::uno
::XInterface
54 //-------------------------------------------
56 @short identifies the given module.
58 @descr This identifier can then be used at the service <type>ModuleManager</type>
59 to get more information about this module.
61 For identification the interface <type scope="com::sun::star::lang">XServiceInfo</type>
62 is requested on the given module. Because all module service registrations must be unique
63 this value can be queried and checked against the configuration.
65 Since OOo 2.3.0 also the optional interface <type>XModule</type> will be used.
66 If its exists it will be preferred.
69 Possible objects for this parameter can be the following one:
72 <b><type scope="com::sun::star::frame">XFrame</type></b><br>
73 A frame contains (against a component window) a controller.
74 Such controller represent the module (in case no model exists).
77 <b><type scope="com::sun::star::frame">XController</type></b><br>
78 A controller can be bound to a model. Then the model represent the module.
79 If no model exists - the controller is used for identification.
82 <b><type scope="com::sun::star::frame">XModel</type></b><br>
83 A model represent a module everytimes and can be used for
84 identification directly.
88 @throws <type scope="com::sun::star::lang">IllegalArgumentException</type>
89 if the parameter Module is:
92 <li>or does not provide one of the needed interface
93 XFrame, XControllerm, XModel</li>
94 <li>or does not provide the needed interface XServiceInfo.</li>
97 @throws <type>UnknownModuleException</type>
98 if the given module could not be identified.
99 Note: If the module represent a XFrame instance with does not contain
100 a document, this exception is thrown too!
102 @return An identifier for the given module.
103 Note: This value is valie everytimes. Error will be transported
104 by thrown exceptions!
106 string identify
( [in] ::com
::sun
::star
::uno
::XInterface
Module )
107 raises
(::com
::sun
::star
::lang
::IllegalArgumentException
,
108 UnknownModuleException
);