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: XModuleManager.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 ************************************************************************/
31 #ifndef __com_sun_star_frame_XModuleManager_idl__
32 #define __com_sun_star_frame_XModuleManager_idl__
34 #ifndef __com_sun_star_uno_XInterface_idl__
35 #include
<com
/sun
/star
/uno
/XInterface.idl
>
38 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
39 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
42 #ifndef __com_sun_star_frame_UnknownModuleException_idl__
43 #include
<com
/sun
/star
/frame
/UnknownModuleException.idl
>
46 //===============================================
48 module com
{ module sun
{ module star
{ module frame
{
50 //===============================================
51 /** can be used to identify office modules.
55 interface XModuleManager
: com
::sun
::star
::uno
::XInterface
57 //-------------------------------------------
59 @short identifies the given module.
61 @descr This identifier can then be used at the service <type>ModuleManager</type>
62 to get more information about this module.
64 For identification the interface <type scope="com::sun::star::lang">XServiceInfo</type>
65 is requested on the given module. Because all module service registrations must be unique
66 this value can be queried and checked against the configuration.
68 Since OOo 2.3.0 also the optional interface <type>XModule</type> will be used.
69 If its exists it will be preferred.
72 Possible objects for this parameter can be the following one:
75 <b><type scope="com::sun::star::frame">XFrame</type></b><br>
76 A frame contains (against a component window) a controller.
77 Such controller represent the module (in case no model exists).
80 <b><type scope="com::sun::star::frame">XController</type></b><br>
81 A controller can be bound to a model. Then the model represent the module.
82 If no model exists - the controller is used for identification.
85 <b><type scope="com::sun::star::frame">XModel</type></b><br>
86 A model represent a module everytimes and can be used for
87 identification directly.
91 @throws <type scope="com::sun::star::lang">IllegalArgumentException</type>
92 if the parameter Module is:
95 <li>or does not provide one of the needed interface
96 XFrame, XControllerm, XModel</li>
97 <li>or does not provide the needed interface XServiceInfo.</li>
100 @throws <type>UnknownModuleException</type>
101 if the given module could not be identified.
102 Note: If the module represent a XFrame instance with does not contain
103 a document, this exception is thrown too!
105 @return An identifier for the given module.
106 Note: This value is valie everytimes. Error will be transported
107 by thrown exceptions!
109 string identify
( [in] ::com
::sun
::star
::uno
::XInterface
Module )
110 raises
(::com
::sun
::star
::lang
::IllegalArgumentException
,
111 UnknownModuleException
);