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#ifndef __com_sun_star_lang_ServiceManager_idl__ 28#define __com_sun_star_lang_ServiceManager_idl__ 29 30#ifndef __com_sun_star_lang_MultiServiceFactory_idl__ 31#include <com/sun/star/lang/MultiServiceFactory.idl> 32#endif 33 34#ifndef __com_sun_star_lang_XComponent_idl__ 35#include <com/sun/star/lang/XComponent.idl> 36#endif 37 38#ifndef __com_sun_star_container_XSet_idl__ 39#include <com/sun/star/container/XSet.idl> 40#endif 41 42#ifndef __com_sun_star_container_XContentEnumerationAccess_idl__ 43#include <com/sun/star/container/XContentEnumerationAccess.idl> 44#endif 45 46#ifndef __com_sun_star_lang_XMultiServiceFactory_idl__ 47#include <com/sun/star/lang/XMultiServiceFactory.idl> 48#endif 49 50#ifndef __com_sun_star_lang_XMultiComponentFactory_idl__ 51#include <com/sun/star/lang/XMultiComponentFactory.idl> 52#endif 53 54#ifndef __com_sun_star_lang_XServiceInfo_idl__ 55#include <com/sun/star/lang/XServiceInfo.idl> 56#endif 57 58#ifndef __com_sun_star_beans_XPropertySet_idl__ 59#include <com/sun/star/beans/XPropertySet.idl> 60#endif 61 62//============================================================================= 63 64module com { module sun { module star { module lang { 65 66//============================================================================= 67 68/** Provides a collection of implementations for services. This is a singleton 69 you commonly find in your component context under key 70 <code>/singletons/com.sun.star.lang.theServiceManager</code>. 71 72 <p> 73 The factories are accessed with a service name. It is possible to 74 access the factories with their implementation names, but you should 75 avoid this. 76 </p> 77 78 <p>Service factories added via <type scope="com::sun::star::container">XSet</type> 79 should support the following interfaces: </p> 80 81 <dl> 82 <dt><type>XServiceInfo</type></dt> 83 <dd>supported interfaces/ implementation name</dd> 84 85 <dt><type>XSingleComponentFactory</type>(optional)</dt> 86 <dd>is used to create instances of the implementation.</dd> 87 88 <dt><type>XComponent</type> (optional)</dt> 89 <dd>The service manager calls the method 90 <member scope="com::sun::star::lang">XComponent::dispose</member> 91 on the factory when going down (i.e. it is commonly disposed by the component context).</dd> 92 </dl> 93 94 @see com::sun::star::uno::XComponentContext 95*/ 96published service ServiceManager 97{ 98 /** This is a derived MultiServiceFactory service. 99 */ 100 service com::sun::star::lang::MultiServiceFactory; 101 102 /** Disposing of service manager. 103 <p> 104 The component context disposes its service manager singleton when going down 105 (i.e. when the component context is disposed). 106 </p> 107 */ 108 interface com::sun::star::lang::XComponent; 109 110 /** Management of service factories. 111 */ 112 interface com::sun::star::container::XSet; 113 114 /** Enumeration of all service factories. 115 <p> 116 It is possible to enumerate all implementations that support the 117 service specified with the argument of the 118 <member scope="com::sun::star::container">XContentEnumerationAccess::createContentEnumeration</member> method. 119 The enumerator commonly returns <type>XSingleComponentFactory</type> 120 interfaces. 121 </p> 122 */ 123 interface com::sun::star::container::XContentEnumerationAccess; 124 125 /** Property access. 126 */ 127 [optional] interface com::sun::star::beans::XPropertySet; 128 /** specifies the default component context to be used, if instanciating services 129 via <type>XMultiServiceFactory</type> 130 */ 131 [optional, property] com::sun::star::uno::XComponentContext DefaultContext; 132}; 133 134//============================================================================= 135 136}; }; }; }; 137 138/*============================================================================= 139 140=============================================================================*/ 141#endif 142