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: Content.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 ************************************************************************/
31 #ifndef __com_sun_star_ucb_Content_idl__
32 #define __com_sun_star_ucb_Content_idl__
34 #ifndef __com_sun_star_ucb_XContent_idl__
35 #include
<com
/sun
/star
/ucb
/XContent.idl
>
38 #ifndef __com_sun_star_ucb_XContent_idl__
39 #include
<com
/sun
/star
/ucb
/XContent.idl
>
42 #ifndef __com_sun_star_lang_XComponent_idl__
43 #include
<com
/sun
/star
/lang
/XComponent.idl
>
46 #ifndef __com_sun_star_ucb_XCommandProcessor_idl__
47 #include
<com
/sun
/star
/ucb
/XCommandProcessor.idl
>
50 #ifndef __com_sun_star_ucb_XCommandProcessor2_idl__
51 #include
<com
/sun
/star
/ucb
/XCommandProcessor2.idl
>
54 #ifndef __com_sun_star_ucb_XCommandInfoChangeNotifier_idl__
55 #include
<com
/sun
/star
/ucb
/XCommandInfoChangeNotifier.idl
>
58 #ifndef __com_sun_star_beans_XPropertyContainer_idl__
59 #include
<com
/sun
/star
/beans
/XPropertyContainer.idl
>
62 #ifndef __com_sun_star_beans_XPropertySetInfoChangeNotifier_idl__
63 #include
<com
/sun
/star
/beans
/XPropertySetInfoChangeNotifier.idl
>
66 #ifndef __com_sun_star_beans_XPropertiesChangeNotifier_idl__
67 #include
<com
/sun
/star
/beans
/XPropertiesChangeNotifier.idl
>
70 #ifndef __com_sun_star_ucb_XContentCreator_idl__
71 #include
<com
/sun
/star
/ucb
/XContentCreator.idl
>
74 #ifndef __com_sun_star_container_XChild_idl__
75 #include
<com
/sun
/star
/container
/XChild.idl
>
78 //=============================================================================
80 module com
{ module sun
{ module star
{ module ucb
{
82 //=============================================================================
83 /** A <type>Content</type> is a service that provides access to data of a
84 content provided by an implementation of the service
85 <type>ContentProvider</type>.
87 published service Content
89 //-------------------------------------------------------------------------
90 /** provides access to the identitity and the type of the content and
91 allows the registration of listeners for <type>ContentEvent</type>s.
93 <p>This interface is required.
95 interface com
::sun
::star
::ucb
::XContent
;
97 //-------------------------------------------------------------------------
98 /** must be implemented to make it possible to resolve cyclic object
101 <p>Those references i.e. may occure if there are listeners
102 registered at the content ( the content holds the listeners ) and
103 the implementation of the listener interface holds a reference on
104 the content. If the content shall be released,
105 <member scope="com::sun::star::lang">XComponent::dispose</member> must
106 be called at the content. The implementation of this method must call
107 <member scope="com::sun::star::lang">XEventListener::disposing</member>
108 on the registered listeners and release the appropriate object
109 references. At the other hand, the implementation of
110 XEventListener::disposing must release its appropriate references.
112 <p>This interface is required.
114 interface com
::sun
::star
::lang
::XComponent
;
116 //-------------------------------------------------------------------------
117 /** enables the caller to let the content execute commands.
119 <p>It is strongly recommended that any implementation supports the
120 improved <type>XCommandProcessor2</type> interface.</p>
122 <p>Typical commands are "open", "delete", "getPropertyValues" and
123 "setPropertyValues". Each content must support a set of standard
124 commands and properties. Also there is a set of predefined optionally
125 commands and properties. A content may define additional commands and
128 <p>This interface is required. </p>
131 =======================================================================
133 =======================================================================
137 [parameter type and name]
139 -----------------------------------------------------------------------
141 -----------------------------------------------------------------------
143 // This command obtains an interface which allows to query
144 // information on commands supported by a content.
145 <type>XCommandInfo</type>
149 // This command obtains an interface which allows to query
150 // information on properties supported by a content.
151 <type scope="com::sun::star::beans">XPropertySetInfo</type>
155 // This command obtains property values from the content.
156 // Note: The execution will not be aborted, if there are properties
157 // requested, that are unknown to the content! The returned
158 // row object must contain a NULL value in the corresponding
160 <type scope="com::sun::star::sdbc">XRow</type>
162 sequence< <type scope="com::sun::star::beans">Property</type> > aProps
164 // This command sets property values of the content.
165 // Note that setPropertyValues does not throw an exception in the case
166 // that one or more of the requested property values cannot be set! The
167 // implementation should set as much property values as possible. This
168 // command returns a sequence< any > which has exactly the same number
169 // of elements like the number of properties to set. Every sequence
170 // element contains the status for a property. The first sequence
171 // elements corresponds to the first element in the sequence of
172 // <type scope="com::sun::star::beans">PropertyValue</type> passed as
173 // command argument and so on. The exceptions will never be passed to
174 // an Interaction Handler.
176 // An any containing:
178 // - No value indicates, that the property value was set successfully.
179 // - <type scope="com::sun::star::beans">UnknownPropertyException</type>
180 // indicates, that the property is not known to the content
182 // - <type scope="com::sun::star::beans">IllegalTypeException</type>
183 // indicates, that the data type of the property value is not
185 // - <type scope="com::sun::star::lang">IllegalAccessException</type>
186 // indicates, that the property is constant
187 // (<member scope="com::sun::star::beans">PropertyAttribute::READONLY</member>
189 // - <type scope="com::sun::star::lang">IllegalArgumentException</type>
190 // indicates, that the property value is not acceptable. For instance,
191 // setting an empty title may be illegal.
192 // - Any other execption derived from <type scope="com::sun::star::uno">Exception</type>
193 // indicates, that the value was not set successfully. For example,
194 // this can be a <type>InteractiveAugmentedIOException</type>
195 // transporting the error code <member>IOErrorCode::ACCESS_DENIED</member>.
197 // If the value to set is equal to the current value, no exception must
198 // be added to the returned sequence
199 sequence< any >
201 sequence< <type scope="com::sun::star::beans">PropertyValue</type> > aValues
203 -----------------------------------------------------------------------
205 -----------------------------------------------------------------------
207 // For folder objects, this command will return an implementation
208 // of service <type>DynamicResultSet</type>.
210 // The <type>OpenCommandArgument2</type> members must be filled as follows:
212 // Mode : ALL or FOLDERS or DOCUMENTS. The implementation
213 // of the open command MUST support all these modes!
214 // Priority : can be set, but implementation may ignore the value
215 // Sink : empty( ignored )
216 // Properties : The properties for that the result set shall
217 // contain the property values. The order of the
218 // sequence is the same as the order of result set
219 // columns. First element of sequence will be row
220 // number one, second will be row number two, ...
221 // SortingInfo : contains sort criteria, if result set shall
222 // be sorted, otherwise it can be left empty.
224 // The exceution must be aborted by the implementation of this command
225 // (by throwing a <type>CommandAbortedException</type>), if an
226 // unsupported mode is requested.
227 <type>XDynamicResultSet</type>
229 <type>OpenCommandArgument2</type> aOpenCommandArg
231 // For non-folder objects, the <type>OpenCommandArgument2</type> struct
232 // will be prefilled with a data sink object, which will be filled
233 // with the content data.
235 // The <type>OpenCommandArgument2</type> members must be filled as follows:
237 // Mode : DOCUMENT or DOCUMENT_SHARE_DENY_NONE or
238 // DOCUMENT_SHARE_DENY_WRITE. Support for DOCUMENT
239 // is mandatory, all others are optional.
240 // Priority : can be set, but implementation may ignore the value
241 // Sink : a sink, where the implementation can put the
242 // document data into.
243 // Properties : empty ( ignored )
244 // SortingInfo : empty ( ignored )
246 // The exceution must be aborted by the implementation of this command
247 // (by throwing a <type>CommandAbortedException</type>), if an
248 // unsupported mode is requested.
251 <type>OpenCommandArgument2</type> aOpenCommandArg
253 // This command triggers an update operation on a content. For example,
254 // when "updating" a POP3-Inbox, the content for that box will get
255 // and store all new objects on the appropriate server. The inserted
256 // contents will be notified by calling
257 // <member>XContentEventListener::contentEvent</member>.
260 <type>OpenCommandArgument2</type> aOpenCommandArg
262 // This command triggers a synchronization operation between locally
263 // cached data and remote server's data. For example, when
264 // "synchronizing" a POP3-Inbox the content for that box will get and
265 // store all new objects and destroy all cached data for objects no
266 // longer existing on the server. The inserted/deleted contents will
267 // be notified by calling
268 // <member>XContent::contentEvent</member>.
271 <type>OpenCommandArgument2</type> aOpenCommandArg
273 // This command closes an object.
278 // This command deletes an object. If <TRUE/> is passed as parameter,
279 // the object will be destroyed physically. Otherwise it will be put
280 // into trash can, if such a service is available and the object to
281 // be deleted supports the command "undelete".
282 // On successful completion of this command, the deleted content
283 // must propagate its deletion by notifying a <type>ContentEvent</type>
284 // - <member>ContentAction::DELETED</member>. Additionally, the contents
285 // parent must notify a <type>ContentEvent</type>
286 // - <member>ContentAction::REMOVED</member>
289 boolean bDeletePhysically
291 // This command restores an object previously deleted into trash. It
292 // must be supported by objects which claim to be undeletable, but
293 // should never be called directly.
298 // (1) This command inserts a new content. It commits the process of
299 // creating a new content via calling another content's method
300 // <member>XContentCreator::createNewContent</member>
301 // The command is not called on the content which created the new
302 // content, because the new object already knows where it is to be
303 // inserted (i.e. Calling createNewContent with the content type for a
304 // message on a News Group creates a content which internally belongs
305 // to the Outbox. Calling "insert" on that message will result in
306 // posting the article to the appropriate News Group). Not calling
307 // "insert" for the new content, i.e. because the user cancels writing
308 // a new message, simply discards the new object. No extra call to
309 // "delete" is necessary.
310 // On successful completion of this command, the parent of the inserted
311 // content must propagate the change by notifying a
312 // <type>ContentEvent</type> - <member>ContentAction::INSERTED</member>.
314 // (2) Additionally this command can be called at any time to overwrite
315 // the data of an existing content.
318 <type>InsertCommandArgument</type> aInsertCommandArg
320 // This command searches for subcontents of a content matching the
321 // given search criteria. The command will return an implemenation
322 // of service <type>DynamicResultSet</type>.
323 <type>XDynamicResultSet</type>
325 <type>SearchCommandArgument</type> aSearchCommandArg
327 // <b>Important note:</b> A client that wants to transfer data should
328 // not execute this command, but it should execute the command
329 // "globalTransfer" at the <type>UniversalContentBroker</type>.
330 // This command is able to transfer all kind of content
331 // supported by that UCB.
333 // This command transfers (copies/moves) an object from one location
334 // to another. It must be executed at the folder content representing
335 // the destination of the transfer operation. Note that the
336 // implementation need not(!) be able to handle any type of contents.
337 // Generally, there are good chances that a transfer of a content will
338 // succeed, if source and target folder have the same URL scheme.
339 // But there is no guaranty for that. For instance, moving a message
340 // from a folder on IMAP server A to a folder on IMAP server B may
341 // fail, because the transfer command can't be implemented efficiently
342 // for this scenario, because it is not directly supported by the IMAP
343 // protocol. On the other hand, moving a message from one folder to
344 // another folder on the same IMAP server should work, because it can
345 // be implemeted efficiently. If an implementation is not able to
346 // handle a given source URL, it should indicate this by issuing a
347 // <type>InteractiveBadTransferURLException</type> interaction request.
348 // Source and target folder may be the same when doing a move operation.
350 // Transfers without the transfer command can be done as follows:
352 // 1) Create a new content at the target folder
353 // --> targetContent = target.XContentCreator::createNewContent(...)
354 // 2) Transfer data from source to target content
355 // --> props = sourceContent.execute( "getPropertyValues", ... )
356 // --> dataStream = sourceContent.execute( "open", ... )
357 // --> targetContent.execute( "setPropertyValues", props )
358 // 3) Insert ( commit ) the new content
359 // --> targetContent.execute( "insert", dataStream )
360 // 4) For move operations only: destroy the source content
361 // sourceContent.execute( "delete", ... )
363 // This mechanism should work for all transfer operations, but generally
364 // it's less efficient than the transfer command.
367 <type>TransferInfo</type> aTransferInfo
369 =======================================================================
371 =======================================================================
373 -----------------------------------------------------------------------
374 Requiered properties:
375 -----------------------------------------------------------------------
377 // contains a unique(!) type string for the content ( i.e.
378 // "application/vnd.sun.star.hierarchy-link" ). This property is always
379 // read-only. It does not contain the media type ( MIME types ) of the
380 // content. Media types may be provided through the optional property
382 // The value of this property should match the information on creatable
383 // contents given by UCB contents that implement the interface
384 // <type>XContentCreator</type>.
387 // indicates, whether a content can contain other contents.
390 // indicates, whether a content is a document. This means, the
391 // content can dump itself into a data sink.
394 // contains the title of an object (e.g. the subject of a message).
397 -----------------------------------------------------------------------
399 -----------------------------------------------------------------------
401 // contains the interval for automatic updates of an object.
402 // It is specified in seconds.
403 long AutoUpdateInterval
405 // contains the maximum number of network connections
406 // allowed for one (internet) protocol at a time. (e.g. The HTTP
407 // cache can be configured to use a maximum for the number of
408 // connections used for browsing.)
409 short ConnectionLimit
411 // contains the current connection mode for the object.
412 // (see <type>ConnectionMode</type>)
415 // contains the date and time the object was created.
416 <type scope"com::sun::star::util">DateTime</type> DateCreated
418 // contains the date and time the object was last modified.
419 <type scope"com::sun::star::util">DateTime</type> DateModified
421 // contains the count of documents of a folder.
424 // contains the count of marked documents within a folder.
425 long DocumentCountMarked
427 // contains a sequence of documemt header fields (i.e. header
428 // fields of a MIME-message, or the document info of an
429 // office document ). For some standard header fields there
430 // are predefined separate properties, like "MessageTo".
431 sequence< <type>DocumentHeaderField</type> > DocumentHeader
433 // contains information about the way a folder stores the
434 // contents of (remote) documents.
435 <type>DocumentStoreMode</type> DocumentStoreMode
437 // contains the count of subfolders of a folder.
440 // contains the free space left on a storage device. It is
444 // indicates whether a content has subcontents, which are documents.
447 // indicates whether a content has subcontents, which are folders.
450 // indicates whether a content is "marked".
453 // indicates whether a content has been "read".
456 // indicates whether a content is read-only.
459 // indicates whether a content is subscribed.
462 // indicates whether the feature to store contents depending on
463 // their age is active.
464 boolean IsTimeLimitedStore;
466 // indicates whether (sub)contents shall be automatically updated
467 // everytime a (folder) content is opened. This property may be
468 // used to control whether a folder content should read data only
469 // from local cache when it is opened, or whether it should connect
470 // to a server to obtain latest data.
473 // contains the keywords of a document (e.g. the value
474 // of the "keywords" header field of a news article).
477 // contains the media type ( MIME type ) of a content. It is highly
478 // recommended to support this property if the content's implementation
479 // can obtain the media type natively from its data source ( i.e.
480 // HTTP servers provide media types for all their documents ).
483 // contains the BCC (blind carbon copy) receiver(s) of a message.
486 // contains the CC (carbon copy) receiver(s) of a message.
489 // contains (the address of) the sender of a message.
492 // contains the ID of a message.
495 // contains the "In-Reply-To" field of a message.
496 string MessageInReplyTo
498 // contains the "Reply-To" field of a message.
499 string MessageReplyTo
501 // contains the recipient(s) of a message.
504 // contains the name(s) of the newsgroup(s) into which a message
508 // contains a password (e.g. needed to access a POP3-Server).
511 // contains a priority (i.e. of a message).
512 <type>Priority</type> Priority
514 // contains the "References" field of a news article.
517 // contains the rules set for a content.
518 <type>RuleSet</type> Rules
520 // contains the count of seen/read subcontents of a folder content.
523 // contains the base directory to use on a server. (e.g. Setting
524 // the server base of an FTP-Account to "/pub/incoming"
525 // will result in showing contents from that directory and not from
526 // server's root directory)
529 // contains a server name (e.g. The name of the server to use for
533 // contains a numeric server port.
536 // contains the size (usually in bytes) of an object.
539 // contains a size limit for an object. (e.g. One may specify the
540 // maximum size of the HTTP-Cache)
543 // contains the count of subscribed contents of a folder.
546 // contains the policy to use when synchronizing two objects.
547 <type>SynchronizePolicy</type> SynchronizePolicy
549 // contains information about the target frame to use when displaying
552 <p>The value is a string containing three tokens, separated by ";"
556 </dt><dd>Behavior on "select" ( single click )
558 </dt><dd>Behavior on "open" ( double click )
560 </dt><dd>Behavior on "open in new task" ( double click + CTRL key )
563 <p> Each token may contain the following values:<br/>
565 <dt>"_beamer"
566 </dt><dd>Show in "Beamer"
567 </dd><dt>"_top"
568 </dt><dd>Show in current frame (replaces old)
569 </dd><dt>"_blank"
570 </dt><dd>Show in new task
576 // for contents that are links to other contents, contains the URL of
577 // the target content
580 // contains the value to use if the property "IsTimeLimitedStore" is set.
581 short TimeLimitStore;
583 // contains a user name. (e.g. the user name needed to access a
587 // describes a verification policy.
588 <type>VerificationMode</type> VerificationMode
591 interface com
::sun
::star
::ucb
::XCommandProcessor
;
593 //-------------------------------------------------------------------------
594 /** is an enhanced version of <type>XCommandProcessor</type> that has an
595 additional method for releasing command identifiers obtained via
596 <member>XCommandProcessor::createCommandIdentifier</member> to avoid
597 resource leaks. For a detailed description of the problem refer to
598 <member>XCommandProcessor2::releaseCommandIdentifier</member>.
600 <p>Where many existing <type>Content</type> implementations do not
601 (yet), every new implementation should support this interface.
603 [optional] interface com
::sun
::star
::ucb
::XCommandProcessor2
;
605 //-------------------------------------------------------------------------
606 /** notifies changes of property values to listeners registered for
609 <p>This interface is required.
611 interface com
::sun
::star
::beans
::XPropertiesChangeNotifier
;
613 //-------------------------------------------------------------------------
614 /** can be used to add new properties to the content and to remove
615 properties from the content dynamically.
617 <p>Note that the dynamic properties must be kept persistent. The
618 service <type>Store</type> (UCB persistence service) may be used to
621 <p><b>Important:</b> The implementation of
622 <method scope="com::sun::star::beans">XPropertyContainer::addProperty</method>
623 must at least support adding properties of the following basic data
639 <p>If a property with an unsupported type shall be added a
640 <type scope="com::sun::star::beans">IllegalTypeException</type> must
643 interface com
::sun
::star
::beans
::XPropertyContainer
;
645 //-------------------------------------------------------------------------
646 /** can be used to notify properties removed from or added to the
647 content's property set.
649 <p>This interface must be implemented, if the implementation can
650 dynamically change it's property set ( e.g. because it implements
652 <type scope="com::sun::star::beans">XPropertyContainer</type>. )
654 [optional] interface com
::sun
::star
::beans
::XPropertySetInfoChangeNotifier
;
656 //-------------------------------------------------------------------------
657 /** can be used to notify commands removed from or added to the
658 content's command set.
660 <p>This interface must be implemented, if the implementation can
661 dynamically change it's command set ( e.g. because the set of
662 available commands depends on the value of a property of the
665 <p>This interface is optional.
667 [optional] interface com
::sun
::star
::ucb
::XCommandInfoChangeNotifier
;
669 //-------------------------------------------------------------------------
670 /** creates new contents (i.e. creates a new folder in another folder
671 somewhere in the local file system).
673 <p>A content is "new", if it does not physically exist before creating
674 it using this interface.
676 <p>This interface is optional. It should be implemented by contents
677 which shall be able to create new objects.
679 [optional] interface com
::sun
::star
::ucb
::XContentCreator
;
681 //-------------------------------------------------------------------------
682 /** provides access to the parent content of this content.
684 <p>The object returned by the implementation of the method
685 <member scope="com::sun::star::container">XChild::getParent()</member>
686 must implement the service <type>Content</type>. If the content is a
687 root object, an empty interface may be returned.
689 <p>This interface must be implemented by a content which is a (logical)
692 [optional] interface com
::sun
::star
::container
::XChild
;
695 //=============================================================================