merged tag ooo/OOO330_m14
[LibreOffice.git] / udkapi / com / sun / star / lang / ServiceManager.idl
blobe49e21e8a6483ca9d476a54a90b246f36de67048
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 ************************************************************************/
27 #ifndef __com_sun_star_lang_ServiceManager_idl__
28 #define __com_sun_star_lang_ServiceManager_idl__
30 #ifndef __com_sun_star_lang_MultiServiceFactory_idl__
31 #include <com/sun/star/lang/MultiServiceFactory.idl>
32 #endif
34 #ifndef __com_sun_star_lang_XComponent_idl__
35 #include <com/sun/star/lang/XComponent.idl>
36 #endif
38 #ifndef __com_sun_star_container_XSet_idl__
39 #include <com/sun/star/container/XSet.idl>
40 #endif
42 #ifndef __com_sun_star_container_XContentEnumerationAccess_idl__
43 #include <com/sun/star/container/XContentEnumerationAccess.idl>
44 #endif
46 #ifndef __com_sun_star_lang_XMultiServiceFactory_idl__
47 #include <com/sun/star/lang/XMultiServiceFactory.idl>
48 #endif
50 #ifndef __com_sun_star_lang_XMultiComponentFactory_idl__
51 #include <com/sun/star/lang/XMultiComponentFactory.idl>
52 #endif
54 #ifndef __com_sun_star_lang_XServiceInfo_idl__
55 #include <com/sun/star/lang/XServiceInfo.idl>
56 #endif
58 #ifndef __com_sun_star_beans_XPropertySet_idl__
59 #include <com/sun/star/beans/XPropertySet.idl>
60 #endif
62 //=============================================================================
64 module com { module sun { module star { module lang {
66 //=============================================================================
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>.
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>
78 <p>Service factories added via <type scope="com::sun::star::container">XSet</type>
79 should support the following interfaces: </p>
81 <dl>
82 <dt><type>XServiceInfo</type></dt>
83 <dd>supported interfaces/ implementation name</dd>
85 <dt><type>XSingleComponentFactory</type>(optional)</dt>
86 <dd>is used to create instances of the implementation.</dd>
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>
94 @see com::sun::star::uno::XComponentContext
96 published service ServiceManager
98 /** This is a derived MultiServiceFactory service.
100 service com::sun::star::lang::MultiServiceFactory;
102 /** Disposing of service manager.
104 The component context disposes its service manager singleton when going down
105 (i.e. when the component context is disposed).
106 </p>
108 interface com::sun::star::lang::XComponent;
110 /** Management of service factories.
112 interface com::sun::star::container::XSet;
114 /** Enumeration of all service factories.
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>
123 interface com::sun::star::container::XContentEnumerationAccess;
125 /** Property access.
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>
131 [optional, property] com::sun::star::uno::XComponentContext DefaultContext;
134 //=============================================================================
136 }; }; }; };
138 /*=============================================================================
140 =============================================================================*/
141 #endif