tdf#130857 qt weld: Implement QtInstanceWidget::get_text_height
[LibreOffice.git] / offapi / com / sun / star / configuration / AdministrationProvider.idl
blob69cad55206735645a74b3ae4bf9c54aad45792f1
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 configuration {
23 /** manages one, or more, complete sets of configuration data for
24 administrative purposes and serves as a factory for objects that
25 provide access to subsets of these shared configurations.
27 <p>Shared sets of configuration data usually serve to provide defaults,
28 which are used if no individual settings are present. Depending on the data
29 store multiple layers of defaults may be combined with a user-specific layer
30 to make up the final configuration.
31 </p>
32 <p>Many aspects of the supported behavior depend strongly on the underlying
33 data store and on the administrative structures it defines. With some data
34 stores this service also enables access to individual user's configuration
35 data by an administrator.
36 </p>
37 <p>On the other hand, in the simplest model there is only a single layer of
38 default data which is accessible through this service.
39 </p>
40 <p>An implementation is usually obtained from a
41 com::sun::star::lang::ServiceManager. The arguments passed to
42 com::sun::star::lang::XMultiComponentFactory::createInstanceWithArgumentsAndContext()
43 select the configuration data source. They may also define the scope of
44 administrable data or contain credentials to be used to authorize the
45 administrative access. Missing parameters may be filled in
46 from the context or the environment.
47 </p>
49 @see com::sun::star::configuration::ConfigurationProvider
50 Offers the same services and creates the same accessor objects as this
51 service, but accesses the personal configuration.
53 <p>A ConfigurationProvider provides access to the personal
54 layer of configuration data of the current user context. It should in
55 most cases be used when <em>using</em> the configuration data, although
56 for most contexts an AdministrationProvider can be used as
57 a drop-in replacement.
58 </p>
60 published service AdministrationProvider
62 /** allows creating access objects for specific views such as subsets and fragments
63 of the configuration.
65 <p>The parameter <var>aServiceSpecifier</var> passed to
66 com::sun::star::lang::XMultiServiceFactory::createInstanceWithArguments()
67 supports at least the service specifiers
68 <code>"com.sun.star.configuration.ConfigurationAccess"</code> and
69 <code>"com.sun.star.configuration.ConfigurationUpdateAccess"</code>.
70 </p>
72 <p>Using the first of these service specifiers requests a read-only view of
73 the configuration.
74 The object that is created implements service ConfigurationAccess.
75 To reflect its <em>element role</em> as root of the view, it implements
76 service AccessRootElement.
77 </p>
79 <p>Using the second form requests an updatable view of the configuration.
80 The object that is created should implement service
81 ConfigurationUpdateAccess. To reflect its <em>element role</em>
82 which includes controlling updates for the whole view, it implements
83 service UpdateRootElement.
84 <BR />If the root element of the view is marked read-only (as indicated
85 by com::sun::star::beans::PropertyAttributes::READONLY),
86 the implementation may either raise an exception or return a (read-only)
87 ConfigurationAccess/AccessRootElement instead.
88 </p>
90 <p>The arguments passed to
91 com::sun::star::lang::XMultiServiceFactory::createInstanceWithArguments()
92 in parameter <var>aArguments</var> specify the administrative entity for which
93 data should be administered. In other words they determine the layer to which
94 changes will apply. They also specify the view of that configuration that
95 should be created. That is, they determine the subset of elements that can be
96 accessed starting from the returned object. Each element of the argument
97 sequence should be a com::sun::star::beans::PropertyValue
98 or a com::sun::star::beans::NamedValue,
99 so that the parameters can be identified by name rather than by position.
100 </p>
102 <p>What combinations of arguments are supported depends on the service name
103 and on the data store being administered.
104 </p>
106 <p>With both of the standard service-specifiers above, an implementation must
107 accept a single argument named <code>nodepath</code> of type `string`.
108 This argument must contain the absolute path to an element of the
109 configuration. The view that is selected consists of the named element and
110 all its descendants. The administrative entity is the default for the
111 AdministrationProvider. Usually this is the largest entity
112 encompassing all entities accessible from this instance. In other words this
113 can be used to influence as global a scope as possible.
114 </p>
116 <p>Other arguments can be used to select a more specific entity and to control
117 the behavior of the view. These are different for different implementations
118 and data stores. Whether and how they are used may also depend on properties
119 that were selected when the provider was created.
120 </p>
122 <p>An implementation may ignore unknown arguments.</p>
124 <p>Some parameters that are commonly supported are described for service
125 ConfigurationProvider.
126 </p>
127 <p>One notable difference exists for parameter <code>"Locale"</code>. For a
128 ConfigurationProvider the default behavior usually is to select
129 the locale set up for the user. But this service by default gets data for all
130 locales for which data is present. Locale-dependent values in this case are
131 replaced by a SetAccess using the language names as accessors.
132 This also allows targeted setting of values for selected locales.
133 This behavior can be requested explicitly by specifying a special argument
134 value <code>locale = "*"</code>.
135 </p>
137 <p>com::sun::star::lang::XMultiServiceFactory::createInstance()
138 may be unusable. Only an implementation that supports service names that can be
139 used with no further arguments support this method. It should return the
140 same result as if
141 com::sun::star::lang::XMultiServiceFactory::createInstanceWithArguments()
142 had been called using an empty sequence of arguments.
143 </p>
145 interface com::sun::star::lang::XMultiServiceFactory;
148 /** allows controlling or observing the lifetime of the configuration.
150 <p>The owner of the provider may dispose of this object
151 using com::sun::star::lang::XComponent::dispose().
152 </p>
154 <p>Views created by the provider generally refer to data that is managed by
155 the provider. Therefore, disposing of the provider will cause all objects
156 belonging to these views to be disposed of as well. This does not apply to
157 <em>snapshot</em> views that have their own copy of the data, if available.
158 </p>
161 interface com::sun::star::lang::XComponent;
166 }; }; }; };
169 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */