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
>
34 #ifndef __com_sun_star_lang_XComponent_idl__
35 #include
<com
/sun
/star
/lang
/XComponent.idl
>
38 #ifndef __com_sun_star_container_XSet_idl__
39 #include
<com
/sun
/star
/container
/XSet.idl
>
42 #ifndef __com_sun_star_container_XContentEnumerationAccess_idl__
43 #include
<com
/sun
/star
/container
/XContentEnumerationAccess.idl
>
46 #ifndef __com_sun_star_lang_XMultiServiceFactory_idl__
47 #include
<com
/sun
/star
/lang
/XMultiServiceFactory.idl
>
50 #ifndef __com_sun_star_lang_XMultiComponentFactory_idl__
51 #include
<com
/sun
/star
/lang
/XMultiComponentFactory.idl
>
54 #ifndef __com_sun_star_lang_XServiceInfo_idl__
55 #include
<com
/sun
/star
/lang
/XServiceInfo.idl
>
58 #ifndef __com_sun_star_beans_XPropertySet_idl__
59 #include
<com
/sun
/star
/beans
/XPropertySet.idl
>
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>.
73 The factories are accessed with a service name. It is possible to
74 access the factories with their implementation names, but you should
78 <p>Service factories added via <type scope="com::sun::star::container">XSet</type>
79 should support the following interfaces: </p>
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>
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).
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>
123 interface com
::sun
::star
::container
::XContentEnumerationAccess
;
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 //=============================================================================
138 /*=============================================================================
140 =============================================================================*/