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 28#ifndef __com_sun_star_frame_XModuleManager_idl__ 29#define __com_sun_star_frame_XModuleManager_idl__ 30 31#ifndef __com_sun_star_uno_XInterface_idl__ 32#include <com/sun/star/uno/XInterface.idl> 33#endif 34 35#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 36#include <com/sun/star/lang/IllegalArgumentException.idl> 37#endif 38 39#ifndef __com_sun_star_frame_UnknownModuleException_idl__ 40#include <com/sun/star/frame/UnknownModuleException.idl> 41#endif 42 43//=============================================== 44 45module com { module sun { module star { module frame { 46 47//=============================================== 48/** can be used to identify office modules. 49 50 @since OOo 2.0 51 */ 52published interface XModuleManager : com::sun::star::uno::XInterface 53{ 54 //------------------------------------------- 55 /** 56 @short identifies the given module. 57 58 @descr This identifier can then be used at the service <type>ModuleManager</type> 59 to get more information about this module. 60 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. 64 65 Since OOo 2.3.0 also the optional interface <type>XModule</type> will be used. 66 If its exists it will be preferred. 67 68 @param Module 69 Possible objects for this parameter can be the following one: 70 <ul> 71 <li> 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). 75 </li> 76 <li> 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. 80 </li> 81 <li> 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. 85 </li> 86 </ul> 87 88 @throws <type scope="com::sun::star::lang">IllegalArgumentException</type> 89 if the parameter Module is: 90 <ul> 91 <li>an empty one</li> 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> 95 </ul> 96 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! 101 102 @return An identifier for the given module. 103 Note: This value is valie everytimes. Error will be transported 104 by thrown exceptions! 105 */ 106 string identify( [in] ::com::sun::star::uno::XInterface Module ) 107 raises(::com::sun::star::lang::IllegalArgumentException, 108 UnknownModuleException ); 109 110 111}; 112 113}; }; }; }; 114 115#endif 116