Branch libreoffice-5-0-4
[LibreOffice.git] / include / ucbhelper / content.hxx
blobcfa632aa020fa46d36cef05c127ace63a78c0843
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 .
19 #ifndef INCLUDED_UCBHELPER_CONTENT_HXX
20 #define INCLUDED_UCBHELPER_CONTENT_HXX
22 #include <rtl/ref.hxx>
23 #include <com/sun/star/ucb/ContentCreationException.hpp>
24 #include <com/sun/star/ucb/CommandAbortedException.hpp>
25 #include <com/sun/star/io/XStream.hpp>
26 #include <com/sun/star/uno/Reference.hxx>
27 #include <com/sun/star/uno/Sequence.hxx>
28 #include <ucbhelper/ucbhelperdllapi.h>
30 namespace com { namespace sun { namespace star { namespace beans {
31 class XPropertySetInfo;
32 } } } }
34 namespace com { namespace sun { namespace star { namespace io {
35 class XActiveDataSink;
36 class XOutputStream;
37 class XInputStream;
38 } } } }
40 namespace com { namespace sun { namespace star { namespace sdbc {
41 class XResultSet;
42 class XRow;
43 } } } }
45 namespace com { namespace sun { namespace star { namespace ucb {
46 class XCommandEnvironment;
47 class XCommandInfo;
48 class XContent;
49 class XContentIdentifier;
50 class XDynamicResultSet;
51 class XAnyCompareFactory;
52 struct ContentInfo;
53 struct NumberedSortingInfo;
54 } } } }
56 namespace com { namespace sun { namespace star { namespace uno {
57 class XComponentContext;
58 } } } }
60 namespace ucbhelper
65 /**
66 * These are the possible values for the parameter eMode of method
67 * ucbhelper::Content::createCursor.
69 enum ResultSetInclude
71 INCLUDE_FOLDERS_ONLY,
72 INCLUDE_DOCUMENTS_ONLY,
73 INCLUDE_FOLDERS_AND_DOCUMENTS
76 /**
77 * These are the possible values for the parameter eOperation of method
78 * ucbhelper::Content::insertNewContent.
80 enum InsertOperation
82 InsertOperation_COPY, // copy source data
83 InsertOperation_MOVE, // move source data
84 InsertOperation_LINK, // create a link to source
85 InsertOperation_CHECKIN // check-in source data
90 class Content_Impl;
92 /**
93 * This class simplifies access to UCB contents by providing a more
94 * convenient API for frequently used functionality then the "raw"
95 * UCB-API does.
97 class UCBHELPER_DLLPUBLIC Content
99 rtl::Reference< Content_Impl > m_xImpl;
101 protected:
102 ::com::sun::star::uno::Any createCursorAny( const ::com::sun::star::uno::Sequence<
103 OUString >& rPropertyNames,
104 ResultSetInclude eMode )
105 throw( ::com::sun::star::ucb::CommandAbortedException,
106 ::com::sun::star::uno::RuntimeException,
107 ::com::sun::star::uno::Exception );
109 public:
111 * Constructor.
113 Content();
116 * Constructor.
118 * @param rURL is the URL of the content to create.
119 * @param rEnv is the environment to use for commands executed by the
120 * content. The command environment is used by the content
121 * implementation to interact with the client and to propagate
122 * errors.
124 Content( const OUString& rURL,
125 const ::com::sun::star::uno::Reference<
126 ::com::sun::star::ucb::XCommandEnvironment >& rEnv,
127 const ::com::sun::star::uno::Reference<
128 ::com::sun::star::uno::XComponentContext >& rCtx )
129 throw ( ::com::sun::star::ucb::ContentCreationException,
130 ::com::sun::star::uno::RuntimeException );
132 * Constructor.
134 * @param rContent is the content object of the content to create.
135 * @param rEnv is the environment to use for commands executed by the
136 * content. The command environment is used by the content
137 * implementation to interact with the client and to propagate
138 * errors.
140 Content( const ::com::sun::star::uno::Reference<
141 ::com::sun::star::ucb::XContent >& rContent,
142 const ::com::sun::star::uno::Reference<
143 ::com::sun::star::ucb::XCommandEnvironment >& rEnv,
144 const ::com::sun::star::uno::Reference<
145 ::com::sun::star::uno::XComponentContext >& rCtx )
146 throw ( ::com::sun::star::ucb::ContentCreationException,
147 ::com::sun::star::uno::RuntimeException );
149 * Copy Constructor.
151 * @param rContent is the content this content shall be a copy of.
153 Content( const Content& rOther );
156 * Destructor.
158 ~Content();
161 * Assignment operator.
163 * @param rContent is the content this content shall be a copy of.
165 Content& operator=( const Content& rOther );
168 * Constructor. This method should be used, if the exception thrown
169 * by the direct ctors of this class are to 'expensive' for your
170 * application
172 * @param rURL is the URL of the content to create.
173 * @param rEnv is the environment to use for commands executed by the
174 * content. The command environment is used by the content
175 * implementation to interact with the client and to propagate
176 * errors.
177 * @param rContent will be filled by this method with the content created.
178 * @return true, if the operation was successful - false, otherwise.
180 static bool
181 create( const OUString& rURL,
182 const ::com::sun::star::uno::Reference<
183 ::com::sun::star::ucb::XCommandEnvironment >& rEnv,
184 const ::com::sun::star::uno::Reference<
185 ::com::sun::star::uno::XComponentContext >& rCtx,
186 Content& rContent );
189 // Direct access to UCB content.
193 * This method provides access to the "native" UCB content interface(s).
194 * This is useful in case the convenience methods provided by this
195 * class are insufficient for your needs. You may obtain all interfaces
196 * supported by the underlying UCB content by calling this method and
197 * after that doing a queryInterface call.
199 * @return the XContent interface of the underlying UCB content.
201 ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent >
202 get() const;
205 // Object identity.
209 * This method returns the URL of the content.
211 * @return the URL of the content.
213 const OUString& getURL() const;
216 // Command environment.
220 * This method returns the environment to use when executing commands.
222 * @return the command environment.
224 const ::com::sun::star::uno::Reference<
225 ::com::sun::star::ucb::XCommandEnvironment >&
226 getCommandEnvironment() const;
229 * This method sets a new command environment.
231 * @param xNewEnv is the new command environment.
233 void setCommandEnvironment(
234 const ::com::sun::star::uno::Reference<
235 ::com::sun::star::ucb::XCommandEnvironment >& xNewEnv );
238 // Access to supported commands/properties.
242 * This methods provides access to meta data of the commands supported
243 * by this content.
245 * @return an XCommandInfo interface implementation, which can be used
246 * to obtain meta data of the commands supported by this content.
248 ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandInfo >
249 getCommands()
250 throw( ::com::sun::star::ucb::CommandAbortedException,
251 ::com::sun::star::uno::RuntimeException,
252 ::com::sun::star::uno::Exception );
254 * This methods provides access to meta data of the properties supported
255 * by this content.
257 * @return an XPropertSetInfo interface implementation, which can be used
258 * to obtain meta data of the properties supported by this content.
260 ::com::sun::star::uno::Reference<
261 ::com::sun::star::beans::XPropertySetInfo >
262 getProperties()
263 throw( ::com::sun::star::ucb::CommandAbortedException,
264 ::com::sun::star::uno::RuntimeException,
265 ::com::sun::star::uno::Exception );
268 // Access to property value(s).
272 * This method can be used to read a single property value.
274 * @param rPropertyName is the name of the property for that the value
275 * shall be obtained.
276 * @return the property value.
278 ::com::sun::star::uno::Any
279 getPropertyValue( const OUString& rPropertyName )
280 throw( ::com::sun::star::ucb::CommandAbortedException,
281 ::com::sun::star::uno::RuntimeException,
282 ::com::sun::star::uno::Exception );
284 * This method can be used to set a single property value.
286 * @param rPropertyName is the name of the property for that the
287 * value shall be set.
288 * @return an any containing:
289 * - No value indicates, that the property value was set
290 * successfully.
291 * - com::sun::star::beans::UnknownPropertyException indicates,
292 * that the property is not known to the content implementation.
293 * - com::sun::star::beans::IllegalTypeException indicates, that
294 * the data type of the property value is not acceptable.
295 * - com::sun::star::lang::IllegalAccessException indicates, that
296 * the property is constant.
297 * - com::sun::star::lang::IllegalArgumentException indicates,
298 * that the property value is not acceptable. For instance,
299 * setting an empty title may be illegal.
300 * - Any other exception derived from
301 * com::sun::star::uno::Exception indicates, that the value was
302 * not set successfully. For example, this can be a
303 * com::sun:star::ucb::InteractiveAugmentedIOException
304 * transporting the error code
305 * com::sun::star::ucb::IOErrorCode::ACCESS_DENIED.
307 ::com::sun::star::uno::Any
308 setPropertyValue( const OUString& rPropertyName,
309 const ::com::sun::star::uno::Any& rValue )
310 throw( ::com::sun::star::ucb::CommandAbortedException,
311 ::com::sun::star::uno::RuntimeException,
312 ::com::sun::star::uno::Exception );
314 * This method can be used to read multiple property values.
316 * @param rPropertyNames is a sequence of names of properties for
317 * that the values shall be obtained.
318 * @return the property values.
320 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
321 getPropertyValues( const ::com::sun::star::uno::Sequence<
322 OUString >& rPropertyNames )
323 throw( ::com::sun::star::ucb::CommandAbortedException,
324 ::com::sun::star::uno::RuntimeException,
325 ::com::sun::star::uno::Exception );
327 * This method can be used to read multiple property values.
329 * @param rPropertyNames is a sequence of names of properties for
330 * that the values shall be obtained.
331 * @return the property values.
333 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow >
334 getPropertyValuesInterface( const ::com::sun::star::uno::Sequence<
335 OUString >& rPropertyNames )
336 throw( ::com::sun::star::ucb::CommandAbortedException,
337 ::com::sun::star::uno::RuntimeException,
338 ::com::sun::star::uno::Exception );
341 * This method can be used to set multiple property values.
343 * @param rPropertyNames is a sequence of names of properties for
344 * that values shall be set.
345 * @return a sequence of any's which has exactly the same number
346 * of elements as the number of properties to set. Every
347 * sequence element contains the status for a property. The
348 * first sequence elements corresponds to the first element in
349 * the sequence of property names and so on.
351 * An any containing:
352 * - No value indicates, that the property value was set
353 * successfully.
354 * - com::sun::star::beans::UnknownPropertyException indicates,
355 * that the property is not known to the content implementation.
356 * - com::sun::star::beans::IllegalTypeException indicates, that
357 * the data type of the property value is not acceptable.
358 * - com::sun::star::lang::IllegalAccessException indicates, that
359 * the property is constant.
360 * - com::sun::star::lang::IllegalArgumentException indicates,
361 * that the property value is not acceptable. For instance,
362 * setting an empty title may be illegal.
363 * - Any other exception derived from
364 * com::sun::star::uno::Exception indicates, that the value was
365 * not set successfully. For example, this can be a
366 * com::sun:star::ucb::InteractiveAugmentedIOException
367 * transporting the error code
368 * com::sun::star::ucb::IOErrorCode::ACCESS_DENIED.
370 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
371 setPropertyValues( const ::com::sun::star::uno::Sequence<
372 OUString >& rPropertyNames,
373 const ::com::sun::star::uno::Sequence<
374 ::com::sun::star::uno::Any >& rValues )
375 throw( ::com::sun::star::ucb::CommandAbortedException,
376 ::com::sun::star::uno::RuntimeException,
377 ::com::sun::star::uno::Exception );
380 // General command execution.
384 * This method can be used to execute any command supported by the
385 * content.
387 * @param rCommandName is the name of the command to execute.
388 * @param rCommandArgument is the argument for the command. Type and
389 * values of this parameter must correspond to the command
390 * specification.
391 * @return the result of the command according to its specification.
393 ::com::sun::star::uno::Any
394 executeCommand( const OUString& rCommandName,
395 const ::com::sun::star::uno::Any& rCommandArgument )
396 throw( ::com::sun::star::ucb::CommandAbortedException,
397 ::com::sun::star::uno::RuntimeException,
398 ::com::sun::star::uno::Exception );
401 // Special commands.
405 * This methods gives access to the children of a folder content.
406 * Additionally, the result set returned provides efficient access to
407 * preselected property values of the children.
408 * Internally it executes the command "open" at the content.
410 * @param rPropertyNames is a sequence of names of properties for
411 * that the values should be accessible via the resultset
412 * returned by this method.
413 * @param eMode is a very simple filter for the children contained
414 * in the resultset.
415 * @return an implementation of the service
416 * com.cun.star.ucb.ContentResultSet, which can be used to
417 * get access to the children of a content.
419 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet >
420 createCursor( const ::com::sun::star::uno::Sequence<
421 OUString >& rPropertyNames,
422 ResultSetInclude eMode = INCLUDE_FOLDERS_AND_DOCUMENTS )
423 throw( ::com::sun::star::ucb::CommandAbortedException,
424 ::com::sun::star::uno::RuntimeException,
425 ::com::sun::star::uno::Exception );
427 * This methods gives access to the children of a folder content.
428 * Additionally, the result set returned provides efficient access to
429 * preselected property values of the children.
430 * Internally it executes the command "open" at the content.
432 * @param rPropertyNames is a sequence of names of properties for
433 * that the values should be accessible via the resultset
434 * returned by this method.
435 * @param eMode is a very simple filter for the children contained
436 * in the resultset.
437 * @return an implementation of the service
438 * com.cun.star.ucb.DynamicResultSet, which can be used to
439 * get access to the children of a content.
441 ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XDynamicResultSet >
442 createDynamicCursor( const ::com::sun::star::uno::Sequence<
443 OUString >& rPropertyNames,
444 ResultSetInclude eMode
445 = INCLUDE_FOLDERS_AND_DOCUMENTS )
446 throw( ::com::sun::star::ucb::CommandAbortedException,
447 ::com::sun::star::uno::RuntimeException,
448 ::com::sun::star::uno::Exception );
450 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet >
451 createSortedCursor( const ::com::sun::star::uno::Sequence< OUString >& rPropertyNames,
452 const ::com::sun::star::uno::Sequence< ::com::sun::star::ucb::NumberedSortingInfo >& rSortInfo,
453 ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XAnyCompareFactory > rAnyCompareFactory,
454 ResultSetInclude eMode = INCLUDE_FOLDERS_AND_DOCUMENTS )
455 throw( ::com::sun::star::ucb::CommandAbortedException,
456 ::com::sun::star::uno::RuntimeException,
457 ::com::sun::star::uno::Exception );
460 * This methods gives read access to the content stream of a content (i.e
461 * the content of a file located at the local file system).
462 * Internally it executes the command "open" at the content.
464 * @return an implementation of the interface XInputStream, which can
465 * be used to read the content's data.
467 ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >
468 openStream()
469 throw( ::com::sun::star::ucb::CommandAbortedException,
470 ::com::sun::star::uno::RuntimeException,
471 ::com::sun::star::uno::Exception );
473 * This methods gives read access to the content stream of a content (i.e
474 * the content of a file located at the local file system).
475 * Internally it executes the command "open" at the content.
476 * The method requests opening without locking.
478 * @return an implementation of the interface XInputStream, which can
479 * be used to read the content's data.
481 ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >
482 openStreamNoLock()
483 throw( ::com::sun::star::ucb::CommandAbortedException,
484 ::com::sun::star::uno::RuntimeException,
485 ::com::sun::star::uno::Exception );
488 * This methods gives read/write access to the content stream of a content (i.e
489 * the content of a file located at the local file system).
490 * Internally it executes the command "open" at the content.
492 * @return an implementation of the interface XStream, which can
493 * be used to read/write the content's data.
495 ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >
496 openWriteableStream()
497 throw( ::com::sun::star::ucb::CommandAbortedException,
498 ::com::sun::star::uno::RuntimeException,
499 ::com::sun::star::uno::Exception );
501 * This methods gives read/write access to the content stream of a content (i.e
502 * the content of a file located at the local file system).
503 * Internally it executes the command "open" at the content.
504 * The method requests opening without locking.
506 * @return an implementation of the interface XStream, which can
507 * be used to read/write the content's data.
509 ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >
510 openWriteableStreamNoLock()
511 throw( ::com::sun::star::ucb::CommandAbortedException,
512 ::com::sun::star::uno::RuntimeException,
513 ::com::sun::star::uno::Exception );
516 * This methods gives read access to the content stream of a content (i.e
517 * the content of a file located at the local file system).
518 * Internally it executes the command "open" at the content.
520 * @param rSink is the implementation of an XActiveDataSink interface,
521 * which shall be used by the content to deliver the data.
523 bool
524 openStream( const ::com::sun::star::uno::Reference<
525 ::com::sun::star::io::XActiveDataSink >& rSink )
526 throw( ::com::sun::star::ucb::CommandAbortedException,
527 ::com::sun::star::uno::RuntimeException,
528 ::com::sun::star::uno::Exception );
530 * This methods gives read access to the content stream of a content (i.e
531 * the content of a file located at the local file system).
532 * Internally it executes the command "open" at the content.
534 * @param rStream is the implementation of an XOutputStream interface,
535 * which shall be used by the content to deliver the data.
537 bool
538 openStream( const ::com::sun::star::uno::Reference<
539 ::com::sun::star::io::XOutputStream >& rStream )
540 throw( ::com::sun::star::ucb::CommandAbortedException,
541 ::com::sun::star::uno::RuntimeException,
542 ::com::sun::star::uno::Exception );
544 * This methods gives write access to the content stream of a content (i.e
545 * the content of a file located at the local file system).
546 * Internally it executes the command "insert" at the content.
548 * @param rStream is the implementation of an XInputStream interface,
549 * which contains the content data to write.
550 * @param bReplaceExisting specifies, whether any existing content data
551 * shall be overwritten.
553 void
554 writeStream( const ::com::sun::star::uno::Reference<
555 ::com::sun::star::io::XInputStream >& rStream,
556 bool bReplaceExisting )
557 throw( ::com::sun::star::ucb::CommandAbortedException,
558 ::com::sun::star::uno::RuntimeException,
559 ::com::sun::star::uno::Exception );
562 * This method returns the different types of contents this content
563 * can create.
565 * @return the content types or an empty sequence if no contents can be
566 * created by this content.
568 ::com::sun::star::uno::Sequence< ::com::sun::star::ucb::ContentInfo >
569 queryCreatableContentsInfo()
570 throw( ::com::sun::star::ucb::CommandAbortedException,
571 ::com::sun::star::uno::RuntimeException,
572 ::com::sun::star::uno::Exception );
575 * This method creates, initializes and inserts ( commits ) a new content
576 * (i.e. it could be used to create a new file system folder).
577 * Internally this method does a
578 * XCommandProcessor::execute( "createNewContent", ... );
579 * XCommandProcessor::execute( "setPropertyValues", ... );
580 * XCommandProcessor::execute( "insert", ... ); calling sequence.
582 * @param rContentType is the type for the new UCB content. Each content
583 * provider implementation may introduce own types for its content
584 * objects (See queryCreatableContentsInfo()).
585 * @param rPropertyNames is a sequence of names of properties for that
586 * values are to set at the new content before it will be inserted
587 * ( committed ).
588 * The order of the names must correspond to the order of the
589 * property values.
590 * @param rPropertyValues is a sequence of property values that are to
591 * set at the new content before it will be inserted ( committed ).
592 * The order of the values must correspond to the order of the
593 * property names.
594 * @param rNewContent will be filled by the implementation of this method
595 * with the new content.
597 bool
598 insertNewContent( const OUString& rContentType,
599 const ::com::sun::star::uno::Sequence<
600 OUString >& rPropertyNames,
601 const ::com::sun::star::uno::Sequence<
602 ::com::sun::star::uno::Any >& rPropertyValues,
603 Content& rNewContent )
604 throw( ::com::sun::star::ucb::CommandAbortedException,
605 ::com::sun::star::uno::RuntimeException,
606 ::com::sun::star::uno::Exception );
608 * This method creates, initializes and inserts (commits) a new content
609 * inside this (the target folder) content. For example, it can be used to
610 * create a new file system file.
611 * Internally this method does a
612 * XCommandProcessor::execute( "createNewContent", ... );
613 * XCommandProcessor::execute( "setPropertyValues", ... );
614 * XCommandProcessor::execute( "insert", ... ); calling sequence.
616 * @param rContentType is the type for the new UCB content. Each content
617 * provider implementation may introduce own types for its content
618 * objects (See queryCreatableContentsInfo()).
619 * @param rPropertyNames is a sequence of names of properties for that
620 * values are to set at the new content before it will be inserted
621 * ( committed ).
622 * The order of the names must correspond to the order of the
623 * property values.
624 * @param rPropertyValues is a sequence of property values that are to
625 * set at the new content before it will be inserted ( committed ).
626 * The order of the values must correspond to the order of the
627 * property names.
628 * @param rStream is a stream containing the content data for the new
629 * content (i.e. the content of a file to create)
630 * @param rNewContent will be filled by the implementation of this method
631 * with the new content.
633 bool
634 insertNewContent( const OUString& rContentType,
635 const ::com::sun::star::uno::Sequence<
636 OUString >& rPropertyNames,
637 const ::com::sun::star::uno::Sequence<
638 ::com::sun::star::uno::Any >& rPropertyValues,
639 const ::com::sun::star::uno::Reference<
640 ::com::sun::star::io::XInputStream >& rStream,
641 Content& rNewContent )
642 throw( ::com::sun::star::ucb::CommandAbortedException,
643 ::com::sun::star::uno::RuntimeException,
644 ::com::sun::star::uno::Exception );
647 * This method transfers (copies/moves) a content. It creates a new
648 * resource inside this (the target folder) content.
649 * The implementation is able to do cross-provider transfers (like copying
650 * a file from the local file system to a directory located on an HTTP
651 * server).
652 * Internally this method executes the command "globalTransfer" at the UCB.
654 * @param rSourceContent is the content that contains the data for the
655 * new UCB content.
656 * @param eOperation defines what shall be done with the source data
657 * ( COPY, MOVE, LINK ).
658 * @param rTitle contains a title for the new content. If this is an empty
659 * string, the new content will have the same title as the source
660 * content.
661 * @param rNameClashAction describes how the implementation shall behave
662 * in case a content with a clashing name exists in the target
663 * folder.
664 * NameClash::ERROR will abort the operation, NameClash::OVERWRITE
665 * will overwrite the clashing content and all its data,
666 * NameClash::RENAME will generate and supply a non-clashing title.
667 * @see com/sun/star/ucb/NameClash.idl
668 * @param rMimeType contains the MIME type of the document to write.
669 * @param bMajorVersion tells to create a new major version for checkin operations
670 * @param rCommentVersion contains the comment to use for checkin operations
671 * @param rResultURL is a hacky way to get the update URL after the operation in
672 * case there was a change (introduced for the checkin operation)
673 * @param rDocumentId is the document Id ( in case of CMIS ).
675 bool
676 transferContent( const Content& rSourceContent,
677 InsertOperation eOperation,
678 const OUString & rTitle,
679 const sal_Int32 nNameClashAction,
680 const OUString & rMimeType = OUString( ),
681 bool bMajorVersion = false,
682 const OUString & rCommentVersion = OUString( ),
683 OUString* pResultURL = NULL,
684 const OUString & rDocumentId = OUString( ) )
685 throw( ::com::sun::star::ucb::CommandAbortedException,
686 ::com::sun::star::uno::RuntimeException,
687 ::com::sun::star::uno::Exception );
690 // Required properties.
694 * This method returns the value of the content's property "IsFolder".
696 * @return true, if the content is a folder ( it can contain other
697 * UCB contents). false, otherwise.
699 bool
700 isFolder()
701 throw( ::com::sun::star::ucb::CommandAbortedException,
702 ::com::sun::star::uno::RuntimeException,
703 ::com::sun::star::uno::Exception );
705 * This method returns the value of the content's property "IsDocument".
707 * @return true, if the content is a document ( it has a content stream ).
708 * false, otherwise.
710 bool
711 isDocument()
712 throw( ::com::sun::star::ucb::CommandAbortedException,
713 ::com::sun::star::uno::RuntimeException,
714 ::com::sun::star::uno::Exception );
717 } /* namespace ucbhelper */
719 #endif /* ! INCLUDED_UCBHELPER_CONTENT_HXX */
721 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */