1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 module com
{ module sun
{ module star
{ module lang
{
24 /** Provides a collection of implementations for services. This is a singleton
25 you commonly find in your component context under key
26 <code>/singletons/com.sun.star.lang.theServiceManager</code>.
29 The factories are accessed with a service name. It is possible to
30 access the factories with their implementation names, but you should
34 <p>Service factories added via com::sun::star::container::XSet
35 should support the following interfaces: </p>
39 <dd>supported interfaces/ implementation name</dd>
41 <dt>XSingleComponentFactory(optional)</dt>
42 <dd>is used to create instances of the implementation.</dd>
44 <dt>XComponent (optional)</dt>
45 <dd>The service manager calls the method
46 com::sun::star::lang::XComponent::dispose()
47 on the factory when going down (i.e. it is commonly disposed by the component context).</dd>
50 <p>Since LibreOffice 3.6, in addition to instances of
51 XServiceInfo et al, the
52 com::sun::star::container::XSet of at least the default
53 C++ service manager implementation now also supports sequences of
54 com::sun::star::beans::NamedValue in <code>insert</code>
55 and <code>remove</code>. The sequence elements must each have a
56 <code>Name</code> of <code>uri</code> and a string <code>Value</code> that
57 is the URI of a service rdb. It is legal for there to be no such
58 <code>uri</code> elements. For <code>insert</code>, there can additionally
59 be an optional element with a <code>Name</code> of
60 <code>component-context</code> and a value that is a non-null reference of
61 type com::sun::star::uno::XComponentContext that shall
62 be used instead of this service manager's default component context when
63 loading the corresponding implementations.
65 @see com::sun::star::uno::XComponentContext
67 published service ServiceManager
69 /** This is a derived MultiServiceFactory service.
71 service com
::sun
::star
::lang
::MultiServiceFactory
;
73 /** Disposing of service manager.
75 The component context disposes its service manager singleton when going down
76 (i.e. when the component context is disposed).
79 interface com
::sun
::star
::lang
::XComponent
;
81 /** Management of service factories.
83 interface com
::sun
::star
::container
::XSet
;
85 /** Enumeration of all service factories.
87 It is possible to enumerate all implementations that support the
88 service specified with the argument of the
89 com::sun::star::container::XContentEnumerationAccess::createContentEnumeration() method.
90 The enumerator commonly returns XSingleComponentFactory
94 interface com
::sun
::star
::container
::XContentEnumerationAccess
;
98 [optional] interface com
::sun
::star
::beans
::XPropertySet
;
99 /** specifies the default component context to be used, if instantiating services
100 via XMultiServiceFactory
102 [optional, property
] com
::sun
::star
::uno
::XComponentContext DefaultContext
;
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */