merge the formfield patch from ooo-build
[ooovba.git] / offapi / com / sun / star / ucb / UniversalContentBroker.idl
blob9167a3a916bcdc87da5439c0fbe88f2a78ec0f42
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: UniversalContentBroker.idl,v $
10 * $Revision: 1.18 $
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_ucb_UniversalContentBroker_idl__
31 #define __com_sun_star_ucb_UniversalContentBroker_idl__
33 #ifndef __com_sun_star_lang_XComponent_idl__
34 #include <com/sun/star/lang/XComponent.idl>
35 #endif
37 #ifndef __com_sun_star_ucb_XCommandProcessor_idl__
38 #include <com/sun/star/ucb/XCommandProcessor.idl>
39 #endif
41 #ifndef __com_sun_star_ucb_XCommandProcessor2_idl__
42 #include <com/sun/star/ucb/XCommandProcessor2.idl>
43 #endif
45 #ifndef __com_sun_star_ucb_XContentProviderManager_idl__
46 #include <com/sun/star/ucb/XContentProviderManager.idl>
47 #endif
49 #ifndef __com_sun_star_ucb_XContentProvider_idl__
50 #include <com/sun/star/ucb/XContentProvider.idl>
51 #endif
53 #ifndef __com_sun_star_ucb_XContentIdentifierFactory_idl__
54 #include <com/sun/star/ucb/XContentIdentifierFactory.idl>
55 #endif
57 #ifndef __com_sun_star_lang_XInitialization_idl__
58 #include <com/sun/star/lang/XInitialization.idl>
59 #endif
61 //=============================================================================
63 module com { module sun { module star { module ucb {
65 //=============================================================================
66 /** is a one-instance service that provides access to a set of
67 <type>Content</type>s via <type>ContentProvider</type>s.
69 <p>If the instance is created with two arguments of type string,
70 these two strings are used to configure the newly instantiated broker;
71 see the description of the required
72 <type scope="com::sun::star::lang">XInitialization</type> interface for
73 details.
75 <p>If the instance is created without arguments, the newly instatiated
76 broker is not configured.
78 published service UniversalContentBroker
80 //-------------------------------------------------------------------------
81 /** must be implemented to make it possible to resolve cyclic object
82 references.
84 <p>Those references i.e. may occure if content provider implementations
85 hold references to the Broker. The Broker itself always holds its
86 providers. If the Broker shall be released,
87 <member scope="com::sun::star::lang">XComponent::dispose</member>
88 must be called at the Broker. The implementation of this method must
89 call
90 <member scope="com::sun::star::lang">XEventListener::disposing</member>
91 on the registered listeners (the providers holding the Broker must be
92 those listeners) and release the appropriate object references. At
93 the other hand, the implementation of XEventListener::disposing must
94 release its appropriate references.
96 <p>This interface is required.
98 interface com::sun::star::lang::XComponent;
100 //-------------------------------------------------------------------------
101 /** provides access to all kind of contents provided by the registered
102 content providers.
104 <p>This interface is required.
106 interface com::sun::star::ucb::XContentProvider;
108 //-------------------------------------------------------------------------
109 /** provides access to a set of content providers registered with the UCB.
111 <p>This interface is required.
113 interface com::sun::star::ucb::XContentProviderManager;
115 //-------------------------------------------------------------------------
116 /** creates <type>XContentIdentifier</type> implementation objects for
117 all kind of contents provided by the UCB.
119 <p>This interface is required.
121 interface com::sun::star::ucb::XContentIdentifierFactory;
123 //-------------------------------------------------------------------------
124 /** supports the configuration of a newly created broker.
126 <p>The
127 <member scope="com::sun::star::lang">XInitialization::initialize</member>
128 method should be called with two arguments of type string. These strings
129 are used as a pair of keys to retrieve a set of content provider
130 descriptions from the configuration management (stored at
131 <code>org.openoffice.ucb.Configuration.ContentProviders.<var>key<sub>1</sub></var>.SecondaryKeys.<var>key<sub>2</sub></var>.ProviderData</code>
132 within the configuration management's hierarchy). The retrieved
133 descriptions are in turn used to register the corresponding content
134 provider services at the broker.
136 <p>Typical values for the pair of strings would be
137 <code>"Local"</code>/<code>"Office"</code>, to configure a broker that
138 contains all the relevant content providers.
140 <p>This interface is required.
142 interface com::sun::star::lang::XInitialization;
144 //-------------------------------------------------------------------------
145 /** enables the caller to execute commands at the broker.
147 <p>This interface is required.
149 <p><pre>
150 =======================================================================
151 Commands:
152 =======================================================================
154 [return type]
155 [command name]
156 [parameter type and name]
158 -----------------------------------------------------------------------
159 Requiered commands:
160 -----------------------------------------------------------------------
162 // This command obtains an interface which allows to query
163 // information on commands supported by the Content Broker.
165 <type>XCommandInfo</type>
166 getCommandInfo
167 void
169 // This command transfers Contents from one location to another.
170 // Additionally, it can be used to create a link to a Content.
171 // The implementation must be able to handle Contents provided
172 // by any Content Provider. This is different from the command
173 // 'transfer' that can be supported by a Content. That command
174 // typically can only handle <type>Content</type>s provided by one
175 // <type>ContentProvider</type>.
177 void
178 globalTransfer
179 <type>GlobalTransferCommandArgument</type>
180 </pre>
182 interface com::sun::star::ucb::XCommandProcessor;
184 //-------------------------------------------------------------------------
185 /** is an enhanced version of <type>XCommandProcessor</type> that has an
186 additional method for releasing command identifiers obtained via
187 <member>XCommandProcessor::createCommandIdentifier</member> to avoid
188 resource leaks. For a detailed description of the problem refer to
189 <member>XCommandProcessor2::releaseCommandIdentifier</member>.
191 <p>Where many existing <type>UniversalContentBroker</type>
192 implementations do not (yet), every new implementation should support
193 this interface.
195 [optional] interface com::sun::star::ucb::XCommandProcessor2;
199 //=============================================================================
201 }; }; }; };
203 #endif