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: ServiceManager.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 ************************************************************************/
30 #ifndef __com_sun_star_lang_ServiceManager_idl__
31 #define __com_sun_star_lang_ServiceManager_idl__
33 #ifndef __com_sun_star_lang_MultiServiceFactory_idl__
34 #include
<com
/sun
/star
/lang
/MultiServiceFactory.idl
>
37 #ifndef __com_sun_star_lang_XComponent_idl__
38 #include
<com
/sun
/star
/lang
/XComponent.idl
>
41 #ifndef __com_sun_star_container_XSet_idl__
42 #include
<com
/sun
/star
/container
/XSet.idl
>
45 #ifndef __com_sun_star_container_XContentEnumerationAccess_idl__
46 #include
<com
/sun
/star
/container
/XContentEnumerationAccess.idl
>
49 #ifndef __com_sun_star_lang_XMultiServiceFactory_idl__
50 #include
<com
/sun
/star
/lang
/XMultiServiceFactory.idl
>
53 #ifndef __com_sun_star_lang_XMultiComponentFactory_idl__
54 #include
<com
/sun
/star
/lang
/XMultiComponentFactory.idl
>
57 #ifndef __com_sun_star_lang_XServiceInfo_idl__
58 #include
<com
/sun
/star
/lang
/XServiceInfo.idl
>
61 #ifndef __com_sun_star_beans_XPropertySet_idl__
62 #include
<com
/sun
/star
/beans
/XPropertySet.idl
>
65 //=============================================================================
67 module com
{ module sun
{ module star
{ module lang
{
69 //=============================================================================
71 /** Provides a collection of implementations for services. This is a singleton
72 you commonly find in your component context under key
73 <code>/singletons/com.sun.star.lang.theServiceManager</code>.
76 The factories are accessed with a service name. It is possible to
77 access the factories with their implementation names, but you should
81 <p>Service factories added via <type scope="com::sun::star::container">XSet</type>
82 should support the following interfaces: </p>
85 <dt><type>XServiceInfo</type></dt>
86 <dd>supported interfaces/ implementation name</dd>
88 <dt><type>XSingleComponentFactory</type>(optional)</dt>
89 <dd>is used to create instances of the implementation.</dd>
91 <dt><type>XComponent</type> (optional)</dt>
92 <dd>The service manager calls the method
93 <member scope="com::sun::star::lang">XComponent::dispose</member>
94 on the factory when going down (i.e. it is commonly disposed by the component context).</dd>
97 @see com::sun::star::uno::XComponentContext
99 published service ServiceManager
101 /** This is a derived MultiServiceFactory service.
103 service com
::sun
::star
::lang
::MultiServiceFactory
;
105 /** Disposing of service manager.
107 The component context disposes its service manager singleton when going down
108 (i.e. when the component context is disposed).
111 interface com
::sun
::star
::lang
::XComponent
;
113 /** Management of service factories.
115 interface com
::sun
::star
::container
::XSet
;
117 /** Enumeration of all service factories.
119 It is possible to enumerate all implementations that support the
120 service specified with the argument of the
121 <member scope="com::sun::star::container">XContentEnumerationAccess::createContentEnumeration</member> method.
122 The enumerator commonly returns <type>XSingleComponentFactory</type>
126 interface com
::sun
::star
::container
::XContentEnumerationAccess
;
130 [optional] interface com
::sun
::star
::beans
::XPropertySet
;
131 /** specifies the default component context to be used, if instanciating services
132 via <type>XMultiServiceFactory</type>
134 [optional, property
] com
::sun
::star
::uno
::XComponentContext DefaultContext
;
137 //=============================================================================
141 /*=============================================================================
143 =============================================================================*/