1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef __com_sun_star_ucb_Content_idl__
29 #define __com_sun_star_ucb_Content_idl__
31 #ifndef __com_sun_star_ucb_XContent_idl__
32 #include
<com
/sun
/star
/ucb
/XContent.idl
>
35 #ifndef __com_sun_star_ucb_XContent_idl__
36 #include
<com
/sun
/star
/ucb
/XContent.idl
>
39 #ifndef __com_sun_star_lang_XComponent_idl__
40 #include
<com
/sun
/star
/lang
/XComponent.idl
>
43 #ifndef __com_sun_star_ucb_XCommandProcessor_idl__
44 #include
<com
/sun
/star
/ucb
/XCommandProcessor.idl
>
47 #ifndef __com_sun_star_ucb_XCommandProcessor2_idl__
48 #include
<com
/sun
/star
/ucb
/XCommandProcessor2.idl
>
51 #ifndef __com_sun_star_ucb_XCommandInfoChangeNotifier_idl__
52 #include
<com
/sun
/star
/ucb
/XCommandInfoChangeNotifier.idl
>
55 #ifndef __com_sun_star_beans_XPropertyContainer_idl__
56 #include
<com
/sun
/star
/beans
/XPropertyContainer.idl
>
59 #ifndef __com_sun_star_beans_XPropertySetInfoChangeNotifier_idl__
60 #include
<com
/sun
/star
/beans
/XPropertySetInfoChangeNotifier.idl
>
63 #ifndef __com_sun_star_beans_XPropertiesChangeNotifier_idl__
64 #include
<com
/sun
/star
/beans
/XPropertiesChangeNotifier.idl
>
67 #ifndef __com_sun_star_ucb_XContentCreator_idl__
68 #include
<com
/sun
/star
/ucb
/XContentCreator.idl
>
71 #ifndef __com_sun_star_container_XChild_idl__
72 #include
<com
/sun
/star
/container
/XChild.idl
>
75 //=============================================================================
77 module com
{ module sun
{ module star
{ module ucb
{
79 //=============================================================================
80 /** A <type>Content</type> is a service that provides access to data of a
81 content provided by an implementation of the service
82 <type>ContentProvider</type>.
84 published service Content
86 //-------------------------------------------------------------------------
87 /** provides access to the identitity and the type of the content and
88 allows the registration of listeners for <type>ContentEvent</type>s.
90 <p>This interface is required.
92 interface com
::sun
::star
::ucb
::XContent
;
94 //-------------------------------------------------------------------------
95 /** must be implemented to make it possible to resolve cyclic object
98 <p>Those references i.e. may occure if there are listeners
99 registered at the content ( the content holds the listeners ) and
100 the implementation of the listener interface holds a reference on
101 the content. If the content shall be released,
102 <member scope="com::sun::star::lang">XComponent::dispose</member> must
103 be called at the content. The implementation of this method must call
104 <member scope="com::sun::star::lang">XEventListener::disposing</member>
105 on the registered listeners and release the appropriate object
106 references. At the other hand, the implementation of
107 XEventListener::disposing must release its appropriate references.
109 <p>This interface is required.
111 interface com
::sun
::star
::lang
::XComponent
;
113 //-------------------------------------------------------------------------
114 /** enables the caller to let the content execute commands.
116 <p>It is strongly recommended that any implementation supports the
117 improved <type>XCommandProcessor2</type> interface.</p>
119 <p>Typical commands are "open", "delete", "getPropertyValues" and
120 "setPropertyValues". Each content must support a set of standard
121 commands and properties. Also there is a set of predefined optionally
122 commands and properties. A content may define additional commands and
125 <p>This interface is required. </p>
128 =======================================================================
130 =======================================================================
134 [parameter type and name]
136 -----------------------------------------------------------------------
138 -----------------------------------------------------------------------
140 // This command obtains an interface which allows to query
141 // information on commands supported by a content.
142 <type>XCommandInfo</type>
146 // This command obtains an interface which allows to query
147 // information on properties supported by a content.
148 <type scope="com::sun::star::beans">XPropertySetInfo</type>
152 // This command obtains property values from the content.
153 // Note: The execution will not be aborted, if there are properties
154 // requested, that are unknown to the content! The returned
155 // row object must contain a NULL value in the corresponding
157 <type scope="com::sun::star::sdbc">XRow</type>
159 sequence< <type scope="com::sun::star::beans">Property</type> > aProps
161 // This command sets property values of the content.
162 // Note that setPropertyValues does not throw an exception in the case
163 // that one or more of the requested property values cannot be set! The
164 // implementation should set as much property values as possible. This
165 // command returns a sequence< any > which has exactly the same number
166 // of elements like the number of properties to set. Every sequence
167 // element contains the status for a property. The first sequence
168 // elements corresponds to the first element in the sequence of
169 // <type scope="com::sun::star::beans">PropertyValue</type> passed as
170 // command argument and so on. The exceptions will never be passed to
171 // an Interaction Handler.
173 // An any containing:
175 // - No value indicates, that the property value was set successfully.
176 // - <type scope="com::sun::star::beans">UnknownPropertyException</type>
177 // indicates, that the property is not known to the content
179 // - <type scope="com::sun::star::beans">IllegalTypeException</type>
180 // indicates, that the data type of the property value is not
182 // - <type scope="com::sun::star::lang">IllegalAccessException</type>
183 // indicates, that the property is constant
184 // (<member scope="com::sun::star::beans">PropertyAttribute::READONLY</member>
186 // - <type scope="com::sun::star::lang">IllegalArgumentException</type>
187 // indicates, that the property value is not acceptable. For instance,
188 // setting an empty title may be illegal.
189 // - Any other execption derived from <type scope="com::sun::star::uno">Exception</type>
190 // indicates, that the value was not set successfully. For example,
191 // this can be a <type>InteractiveAugmentedIOException</type>
192 // transporting the error code <member>IOErrorCode::ACCESS_DENIED</member>.
194 // If the value to set is equal to the current value, no exception must
195 // be added to the returned sequence
196 sequence< any >
198 sequence< <type scope="com::sun::star::beans">PropertyValue</type> > aValues
200 -----------------------------------------------------------------------
202 -----------------------------------------------------------------------
204 // For folder objects, this command will return an implementation
205 // of service <type>DynamicResultSet</type>.
207 // The <type>OpenCommandArgument2</type> members must be filled as follows:
209 // Mode : ALL or FOLDERS or DOCUMENTS. The implementation
210 // of the open command MUST support all these modes!
211 // Priority : can be set, but implementation may ignore the value
212 // Sink : empty( ignored )
213 // Properties : The properties for that the result set shall
214 // contain the property values. The order of the
215 // sequence is the same as the order of result set
216 // columns. First element of sequence will be row
217 // number one, second will be row number two, ...
218 // SortingInfo : contains sort criteria, if result set shall
219 // be sorted, otherwise it can be left empty.
221 // The exceution must be aborted by the implementation of this command
222 // (by throwing a <type>CommandAbortedException</type>), if an
223 // unsupported mode is requested.
224 <type>XDynamicResultSet</type>
226 <type>OpenCommandArgument2</type> aOpenCommandArg
228 // For non-folder objects, the <type>OpenCommandArgument2</type> struct
229 // will be prefilled with a data sink object, which will be filled
230 // with the content data.
232 // The <type>OpenCommandArgument2</type> members must be filled as follows:
234 // Mode : DOCUMENT or DOCUMENT_SHARE_DENY_NONE or
235 // DOCUMENT_SHARE_DENY_WRITE. Support for DOCUMENT
236 // is mandatory, all others are optional.
237 // Priority : can be set, but implementation may ignore the value
238 // Sink : a sink, where the implementation can put the
239 // document data into.
240 // Properties : empty ( ignored )
241 // SortingInfo : empty ( ignored )
243 // The exceution must be aborted by the implementation of this command
244 // (by throwing a <type>CommandAbortedException</type>), if an
245 // unsupported mode is requested.
248 <type>OpenCommandArgument2</type> aOpenCommandArg
250 // This command triggers an update operation on a content. For example,
251 // when "updating" a POP3-Inbox, the content for that box will get
252 // and store all new objects on the appropriate server. The inserted
253 // contents will be notified by calling
254 // <member>XContentEventListener::contentEvent</member>.
257 <type>OpenCommandArgument2</type> aOpenCommandArg
259 // This command triggers a synchronization operation between locally
260 // cached data and remote server's data. For example, when
261 // "synchronizing" a POP3-Inbox the content for that box will get and
262 // store all new objects and destroy all cached data for objects no
263 // longer existing on the server. The inserted/deleted contents will
264 // be notified by calling
265 // <member>XContent::contentEvent</member>.
268 <type>OpenCommandArgument2</type> aOpenCommandArg
270 // This command closes an object.
275 // This command deletes an object. If <TRUE/> is passed as parameter,
276 // the object will be destroyed physically. Otherwise it will be put
277 // into trash can, if such a service is available and the object to
278 // be deleted supports the command "undelete".
279 // On successful completion of this command, the deleted content
280 // must propagate its deletion by notifying a <type>ContentEvent</type>
281 // - <member>ContentAction::DELETED</member>. Additionally, the contents
282 // parent must notify a <type>ContentEvent</type>
283 // - <member>ContentAction::REMOVED</member>
286 boolean bDeletePhysically
288 // This command restores an object previously deleted into trash. It
289 // must be supported by objects which claim to be undeletable, but
290 // should never be called directly.
295 // (1) This command inserts a new content. It commits the process of
296 // creating a new content via executing the command "createNewContent"
297 // and initializing it via setting properties, afterwards.
298 // The command is not called on the content which created the new
299 // content, because the new object already knows where it is to be
300 // inserted (i.e. Calling createNewContent with the content type for a
301 // message on a News Group creates a content which internally belongs
302 // to the Outbox. Calling "insert" on that message will result in
303 // posting the article to the appropriate News Group). Not calling
304 // "insert" for the new content, i.e. because the user cancels writing
305 // a new message, simply discards the new object. No extra call to
306 // "delete" is necessary.
307 // On successful completion of this command, the parent of the inserted
308 // content must propagate the change by notifying a
309 // <type>ContentEvent</type> - <member>ContentAction::INSERTED</member>.
311 // (2) Additionally this command can be called at any time to overwrite
312 // the data of an existing content.
315 <type>InsertCommandArgument</type> aInsertCommandArg
317 // This command searches for subcontents of a content matching the
318 // given search criteria. The command will return an implemenation
319 // of service <type>DynamicResultSet</type>.
320 <type>XDynamicResultSet</type>
322 <type>SearchCommandArgument</type> aSearchCommandArg
324 // <b>Important note:</b> A client that wants to transfer data should
325 // not execute this command, but it should execute the command
326 // "globalTransfer" at the <type>UniversalContentBroker</type>.
327 // This command is able to transfer all kind of content
328 // supported by that UCB.
330 // This command transfers (copies/moves) an object from one location
331 // to another. It must be executed at the folder content representing
332 // the destination of the transfer operation. Note that the
333 // implementation need not(!) be able to handle any type of contents.
334 // Generally, there are good chances that a transfer of a content will
335 // succeed, if source and target folder have the same URL scheme.
336 // But there is no guaranty for that. For instance, moving a message
337 // from a folder on IMAP server A to a folder on IMAP server B may
338 // fail, because the transfer command can't be implemented efficiently
339 // for this scenario, because it is not directly supported by the IMAP
340 // protocol. On the other hand, moving a message from one folder to
341 // another folder on the same IMAP server should work, because it can
342 // be implemeted efficiently. If an implementation is not able to
343 // handle a given source URL, it should indicate this by issuing a
344 // <type>InteractiveBadTransferURLException</type> interaction request.
345 // Source and target folder may be the same when doing a move operation.
347 // Transfers without the transfer command can be done as follows:
349 // 1) Create a new content at the target folder
350 // --> targetContent = target.execute( "createNewContent", type )
351 // 2) Transfer data from source to target content
352 // --> props = sourceContent.execute( "getPropertyValues", ... )
353 // --> dataStream = sourceContent.execute( "open", ... )
354 // --> targetContent.execute( "setPropertyValues", props )
355 // 3) Insert ( commit ) the new content
356 // --> targetContent.execute( "insert", dataStream )
357 // 4) For move operations only: destroy the source content
358 // sourceContent.execute( "delete", ... )
360 // This mechanism should work for all transfer operations, but generally
361 // it's less efficient than the transfer command.
364 <type>TransferInfo</type> aTransferInfo
366 // This command obtains an exlusive write lock for the resource. The
367 // lock is active until command "unlock" is executed or the OOo
368 // session that obtained the lock ends or until the lock is released by
369 // a third party (e.g. a system administrator).
373 Exceptions: <type>InteractiveLockingLockedException</type>
374 <type>InteractiveLockingLockExpiredException</type>
376 // This command removes a lock obtained by executing the command "lock"
377 // from the resource.
381 Exceptions: <type>InteractiveLockingNotLockedException</type>
382 <type>InteractiveLockingLockExpiredException</type>
384 // Note that <type>InteractiveLockingLockExpiredException</type> might
385 // be raised by any command that requires a previously obtained lock.
387 // This command creates a new non-persistent content of a given type.
389 // <p>Creation of a new (persistent) content:
391 // <li>creatabletypes = obtain "CreatableContentsInfo" property<br>
393 // <li>choose a suitable type from creatabletypes
394 // <li>newObject = execute command "createNewContent(type)" at<br>
396 // <li>initialize the new object (i.e. newObject.Property1 = ...)
397 // <li>execute command "insert" at new content. This command
398 // commits the data and makes the new content persistent.
401 // This command must be supported by every Content that supports the
402 // property "CreatableContentsInfo" if the returned property value
403 // contains a non-empty sequence of creatable types.
405 // Note: This command is part of the replacement for the deprecated
406 // interface <type>XContentCreator</type>.
407 <type>XContent</type> >
408 <B>createNewContent</B>
409 <type>ContentInfo<type> contentinfo
411 =======================================================================
413 =======================================================================
415 -----------------------------------------------------------------------
416 Mandatory properties:
417 -----------------------------------------------------------------------
419 // contains a unique(!) type string for the content ( i.e.
420 // "application/vnd.sun.star.hierarchy-link" ). This property is always
421 // read-only. It does not contain the media type ( MIME types ) of the
422 // content. Media types may be provided through the optional property
424 // The value of this property should match the information on creatable
425 // contents given by UCB contents that implement the property
426 // "CreatableContentsInfo".
429 // indicates, whether a content can contain other contents.
432 // indicates, whether a content is a document. This means, the
433 // content can dump itself into a data sink.
436 // contains the title of an object (e.g. the subject of a message).
439 -----------------------------------------------------------------------
441 -----------------------------------------------------------------------
443 // contains the interval for automatic updates of an object.
444 // It is specified in seconds.
445 long AutoUpdateInterval
447 // contains the maximum number of network connections
448 // allowed for one (internet) protocol at a time. (e.g. The HTTP
449 // cache can be configured to use a maximum for the number of
450 // connections used for browsing.)
451 short ConnectionLimit
453 // contains the current connection mode for the object.
454 // (see <type>ConnectionMode</type>)
457 // contains the date and time the object was created.
458 <type scope"com::sun::star::util">DateTime</type> DateCreated
460 // contains the date and time the object was last modified.
461 <type scope"com::sun::star::util">DateTime</type> DateModified
463 // contains the count of documents of a folder.
466 // contains the count of marked documents within a folder.
467 long DocumentCountMarked
469 // contains a sequence of documemt header fields (i.e. header
470 // fields of a MIME-message, or the document info of an
471 // office document ). For some standard header fields there
472 // are predefined separate properties, like "MessageTo".
473 sequence< <type>DocumentHeaderField</type> > DocumentHeader
475 // contains information about the way a folder stores the
476 // contents of (remote) documents.
477 <type>DocumentStoreMode</type> DocumentStoreMode
479 // contains the count of subfolders of a folder.
482 // contains the free space left on a storage device. It is
486 // indicates whether a content has subcontents, which are documents.
489 // indicates whether a content has subcontents, which are folders.
492 // indicates whether a content is "marked".
495 // indicates whether a content has been "read".
498 // indicates whether a content is read-only.
501 // indicates whether a content is subscribed.
504 // indicates whether the feature to store contents depending on
505 // their age is active.
506 boolean IsTimeLimitedStore;
508 // indicates whether (sub)contents shall be automatically updated
509 // everytime a (folder) content is opened. This property may be
510 // used to control whether a folder content should read data only
511 // from local cache when it is opened, or whether it should connect
512 // to a server to obtain latest data.
515 // contains the keywords of a document (e.g. the value
516 // of the "keywords" header field of a news article).
519 // contains the media type ( MIME type ) of a content. It is highly
520 // recommended to support this property if the content's implementation
521 // can obtain the media type natively from its data source ( i.e.
522 // HTTP servers provide media types for all their documents ).
525 // contains the BCC (blind carbon copy) receiver(s) of a message.
528 // contains the CC (carbon copy) receiver(s) of a message.
531 // contains (the address of) the sender of a message.
534 // contains the ID of a message.
537 // contains the "In-Reply-To" field of a message.
538 string MessageInReplyTo
540 // contains the "Reply-To" field of a message.
541 string MessageReplyTo
543 // contains the recipient(s) of a message.
546 // contains the name(s) of the newsgroup(s) into which a message
550 // contains a password (e.g. needed to access a POP3-Server).
553 // contains a priority (i.e. of a message).
554 <type>Priority</type> Priority
556 // contains the "References" field of a news article.
559 // contains the rules set for a content.
560 <type>RuleSet</type> Rules
562 // contains the count of seen/read subcontents of a folder content.
565 // contains the base directory to use on a server. (e.g. Setting
566 // the server base of an FTP-Account to "/pub/incoming"
567 // will result in showing contents from that directory and not from
568 // server's root directory)
571 // contains a server name (e.g. The name of the server to use for
575 // contains a numeric server port.
578 // contains the size (usually in bytes) of an object.
581 // contains a size limit for an object. (e.g. One may specify the
582 // maximum size of the HTTP-Cache)
585 // contains the count of subscribed contents of a folder.
588 // contains the policy to use when synchronizing two objects.
589 <type>SynchronizePolicy</type> SynchronizePolicy
591 // contains information about the target frame to use when displaying
594 <p>The value is a string containing three tokens, separated by ";"
598 </dt><dd>Behavior on "select" ( single click )
600 </dt><dd>Behavior on "open" ( double click )
602 </dt><dd>Behavior on "open in new task" ( double click + CTRL key )
605 <p> Each token may contain the following values:<br/>
607 <dt>"_beamer"
608 </dt><dd>Show in "Beamer"
609 </dd><dt>"_top"
610 </dt><dd>Show in current frame (replaces old)
611 </dd><dt>"_blank"
612 </dt><dd>Show in new task
617 // for contents that are links to other contents, contains the URL of
618 // the target content
621 // contains the value to use if the property "IsTimeLimitedStore" is set.
622 short TimeLimitStore;
624 // contains a user name. (e.g. the user name needed to access a
628 // describes a verification policy.
629 <type>VerificationMode</type> VerificationMode
631 // contains the types of Contents a Content object can create via
632 // command "createNewContent".
634 // If the property value can be a non-empty sequence, the Content must
635 // also support command "createNewContent".
637 // Note: This property is part of the replacement for the deprecated
638 // interface <type>XContentCreator</type>.
639 sequence <type>ContentInfo</type> CreatableContentsInfo
643 interface com
::sun
::star
::ucb
::XCommandProcessor
;
645 //-------------------------------------------------------------------------
646 /** is an enhanced version of <type>XCommandProcessor</type> that has an
647 additional method for releasing command identifiers obtained via
648 <member>XCommandProcessor::createCommandIdentifier</member> to avoid
649 resource leaks. For a detailed description of the problem refer to
650 <member>XCommandProcessor2::releaseCommandIdentifier</member>.
652 <p>Where many existing <type>Content</type> implementations do not
653 (yet), every new implementation should support this interface.
655 [optional] interface com
::sun
::star
::ucb
::XCommandProcessor2
;
657 //-------------------------------------------------------------------------
658 /** notifies changes of property values to listeners registered for
661 <p>This interface is required.
663 interface com
::sun
::star
::beans
::XPropertiesChangeNotifier
;
665 //-------------------------------------------------------------------------
666 /** can be used to add new properties to the content and to remove
667 properties from the content dynamically.
669 <p>Note that the dynamic properties must be kept persistent. The
670 service <type>Store</type> (UCB persistence service) may be used to
673 <p><b>Important:</b> The implementation of
674 <method scope="com::sun::star::beans">XPropertyContainer::addProperty</method>
675 must at least support adding properties of the following basic data
691 <p>If a property with an unsupported type shall be added a
692 <type scope="com::sun::star::beans">IllegalTypeException</type> must
695 interface com
::sun
::star
::beans
::XPropertyContainer
;
697 //-------------------------------------------------------------------------
698 /** can be used to notify properties removed from or added to the
699 content's property set.
701 <p>This interface must be implemented, if the implementation can
702 dynamically change it's property set ( e.g. because it implements
704 <type scope="com::sun::star::beans">XPropertyContainer</type>. )
706 [optional] interface com
::sun
::star
::beans
::XPropertySetInfoChangeNotifier
;
708 //-------------------------------------------------------------------------
709 /** can be used to notify commands removed from or added to the
710 content's command set.
712 <p>This interface must be implemented, if the implementation can
713 dynamically change it's command set ( e.g. because the set of
714 available commands depends on the value of a property of the
717 <p>This interface is optional.
719 [optional] interface com
::sun
::star
::ucb
::XCommandInfoChangeNotifier
;
721 //-------------------------------------------------------------------------
722 /** creates new contents (i.e. creates a new folder in another folder
723 somewhere in the local file system).
725 <p>A content is "new", if it does not physically exist before creating
726 it using this interface.
728 <p>This interface is optional. It should be implemented by contents
729 which shall be able to create new objects.
733 <p>This interface is <b>deprecated</b>. Use property
734 "CreatableContentsInfo" and command "createNewContent" instead.
736 [optional] interface com
::sun
::star
::ucb
::XContentCreator
;
738 //-------------------------------------------------------------------------
739 /** provides access to the parent content of this content.
741 <p>The object returned by the implementation of the method
742 <member scope="com::sun::star::container">XChild::getParent()</member>
743 must implement the service <type>Content</type>. If the content is a
744 root object, an empty interface may be returned.
746 <p>This interface must be implemented by a content which is a (logical)
749 [optional] interface com
::sun
::star
::container
::XChild
;
752 //=============================================================================