summaryrefslogtreecommitdiff
path: root/offapi
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-09-14 18:08:57 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-14 18:24:49 +0200
commit9ac86f484b0c278aafbce685ed19d3ea005ee8f8 (patch)
treecf2fe16d76992bcbd1bd89a8693c5f4996cd55f2 /offapi
parent2e284203da7f9882842111265f5f68ea0a145065 (diff)
Improvement on previous commit, UCB clean up
* As UCB is only ever initialized with "Local"/"Office", remove this configuration vector completely. The "create" ctor creates an instance internally initialized with those "Local"/"Office" keys. Special (test) code can still instantiate an uninitialized one via plain createInstance. And for backwards compatilibity process startup still ensures to create an initialized instance early, in case there is still code out there (in extensions) that later calls plain createInstance and expects to get the already-initialized (single) instance. * XInitialization is an "implementation detail" of the UniversalContentBroker service, do not expose in XUniversalContentBroker. * ucbhelper/configurationkeys.hxx is no longer needed and is removed. * ucbhelper/contentbroker.hxx is an empty wrapper and is removed; however, that requires ucbhelper::Content constructors to take explicit XComponentContext arguments now. * The only remaining code in ucbhelper/source/client/contentbroker.cxx is Android-only InitUCBHelper. Is that relevant still? Change-Id: I3f7bddd0456bffbcd13590c66d9011915c760f28
Diffstat (limited to 'offapi')
-rw-r--r--offapi/com/sun/star/ucb/UniversalContentBroker.idl39
-rw-r--r--offapi/com/sun/star/ucb/XUniversalContentBroker.idl22
2 files changed, 29 insertions, 32 deletions
diff --git a/offapi/com/sun/star/ucb/UniversalContentBroker.idl b/offapi/com/sun/star/ucb/UniversalContentBroker.idl
index 6d764341a275..04afce250300 100644
--- a/offapi/com/sun/star/ucb/UniversalContentBroker.idl
+++ b/offapi/com/sun/star/ucb/UniversalContentBroker.idl
@@ -36,20 +36,39 @@ module com { module sun { module star { module ucb {
/** is a one-instance service that provides access to a set of
<type>Content</type>s via <type>ContentProvider</type>s.
- <p>If the instance is created with two arguments of type string,
- these two strings are used to configure the newly instantiated broker;
- see the description of the required
- <type scope="com::sun::star::lang">XInitialization</type> interface for
- details.
-
- <p>If the instance is created without arguments, the newly instantiated
- broker is not configured.
+ <p>Traditionally, this service implements
+ <type scope="com::sun::star::lang">XInitialization</type> and needed to be
+ instantiated once with two arguments via
+ <method scope="com::sun::star::lang">XMultiComponentFactory::createInstanceWithArgumentsAndContext</method>
+ for configuration before it could be obtained via plain
+ <method scope="com::sun::star::lang">XMultiComponentFactory::createInstanceWithContext</method>.
+
+ <p>However, the only pair of initialization arguments used in practice is
+ <code>"Local"</code>/<code>"Office"</code>, so this service is simplified
+ now to automatically configure itself with that argument pair upon first
+ instantiation.
+
+ <p>(For backwards compatibility, the service implementation still supports
+ <type scope="com::sun::star::lang">XInitialization</type> and can still
+ explicitly be initialized via
+ <method scope="com::sun::star::lang">XMultiComponentFactory::createInstanceWithArgumentsAndContext</method>
+ with two arguments of type string. These strings are used as a pair of keys
+ to retrieve a set of content provider descriptions from the configuration
+ management (stored at
+ <code>org.openoffice.ucb.Configuration.ContentProviders.<var>key<sub>1</sub></var>.SecondaryKeys.<var>key<sub>2</sub></var>.ProviderData</code>
+ within the configuration management's hierarchy). The retrieved
+ descriptions are in turn used to register the corresponding content provider
+ services at the broker.)
*/
published service UniversalContentBroker : XUniversalContentBroker
{
- createDefault();
+ /** The (default) constructor.
- createWithKeys([in] string primaryConfigKey, [in] string secondaryConfigKey);
+ <p>(This default constructor is only mentioned explicitly for technical
+ reasons, so that its implementation calls the service implementation's
+ <method scope="com::sun::star::lang">XInitialization::initialize</method>.)
+ */
+ create();
};
diff --git a/offapi/com/sun/star/ucb/XUniversalContentBroker.idl b/offapi/com/sun/star/ucb/XUniversalContentBroker.idl
index ff0313e2fc89..7058999082df 100644
--- a/offapi/com/sun/star/ucb/XUniversalContentBroker.idl
+++ b/offapi/com/sun/star/ucb/XUniversalContentBroker.idl
@@ -25,8 +25,6 @@
#include <com/sun/star/ucb/XContentProviderManager.idl>
#include <com/sun/star/ucb/XContentProvider.idl>
#include <com/sun/star/ucb/XContentIdentifierFactory.idl>
-#include <com/sun/star/lang/XInitialization.idl>
-
module com { module sun { module star { module ucb {
@@ -75,26 +73,6 @@ published interface XUniversalContentBroker
*/
interface com::sun::star::ucb::XContentIdentifierFactory;
- /** supports the configuration of a newly created broker.
-
- <p>The
- <member scope="com::sun::star::lang">XInitialization::initialize</member>
- method should be called with two arguments of type string. These strings
- are used as a pair of keys to retrieve a set of content provider
- descriptions from the configuration management (stored at
- <code>org.openoffice.ucb.Configuration.ContentProviders.<var>key<sub>1</sub></var>.SecondaryKeys.<var>key<sub>2</sub></var>.ProviderData</code>
- within the configuration management's hierarchy). The retrieved
- descriptions are in turn used to register the corresponding content
- provider services at the broker.
-
- <p>Typical values for the pair of strings would be
- <code>"Local"</code>/<code>"Office"</code>, to configure a broker that
- contains all the relevant content providers.
-
- <p>This interface is required.
- */
- interface com::sun::star::lang::XInitialization;
-
/** Enables the caller to execute commands at the broker.
Is an enhanced version of <type>XCommandProcessor</type> that has an