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 ************************************************************************/
27 #ifndef __com_sun_star_ucb_PackageFolderContent_idl__
28 #define __com_sun_star_ucb_PackageFolderContent_idl__
30 #ifndef __com_sun_star_lang_XComponent_idl__
31 #include
<com
/sun
/star
/lang
/XComponent.idl
>
34 #ifndef __com_sun_star_ucb_XContent_idl__
35 #include
<com
/sun
/star
/ucb
/XContent.idl
>
38 #ifndef __com_sun_star_ucb_XCommandProcessor_idl__
39 #include
<com
/sun
/star
/ucb
/XCommandProcessor.idl
>
42 #ifndef __com_sun_star_ucb_XCommandProcessor2_idl__
43 #include
<com
/sun
/star
/ucb
/XCommandProcessor2.idl
>
46 #ifndef __com_sun_star_beans_XPropertiesChangeNotifier_idl__
47 #include
<com
/sun
/star
/beans
/XPropertiesChangeNotifier.idl
>
50 #ifndef __com_sun_star_beans_XPropertyContainer_idl__
51 #include
<com
/sun
/star
/beans
/XPropertyContainer.idl
>
54 #ifndef __com_sun_star_beans_XPropertySetInfoChangeNotifier_idl__
55 #include
<com
/sun
/star
/beans
/XPropertySetInfoChangeNotifier.idl
>
58 #ifndef __com_sun_star_ucb_XCommandInfoChangeNotifier_idl__
59 #include
<com
/sun
/star
/ucb
/XCommandInfoChangeNotifier.idl
>
62 #ifndef __com_sun_star_container_XChild_idl__
63 #include
<com
/sun
/star
/container
/XChild.idl
>
66 #ifndef __com_sun_star_ucb_XContentCreator_idl__
67 #include
<com
/sun
/star
/ucb
/XContentCreator.idl
>
70 //=============================================================================
72 module com
{ module sun
{ module star
{ module ucb
{
74 //=============================================================================
75 /** A PCP Folder is a container for other PCP Folders and PCP Streams.
77 @see com::sun::star::ucb::PackageContentProvider
78 @see com::sun::star::ucb::PackageStreamContent
80 published service PackageFolderContent
82 //-------------------------------------------------------------------------
83 /** This interface is implemented according to the specification of
84 service <type>Content</type>.
86 interface com
::sun
::star
::lang
::XComponent
;
88 //-------------------------------------------------------------------------
89 /** This interface is implemented according to the specification of
90 service <type>Content</type>.
92 interface com
::sun
::star
::ucb
::XContent
;
94 //-------------------------------------------------------------------------
95 /** This interface is implemented according to the specification of
96 service <type>Content</type>.
100 <b>Supported Commands</b>
115 insert ( makes a newly created folder persistent )
124 transfer ( only transfers from PCP Folders/PCP Streams to other
125 PCP folders. It does not handle contents with a URL scheme other
126 then the PCP-URL-scheme. )
129 flush ( a command introduced by the PCP Folder. It takes a
130 void-argument and returns void. This command is used to write unsaved
131 changes to the underlying package file. Note that the current
132 implementation of PCP contents never flushes automatically! Operations
133 which require a flush to get persistent, are:
134 "setPropertyValues( < any_non_read_only_property > ) ", "delete",
139 <b>Supported Properties</b>
142 string ContentType ( read-only, always "application/vnd.sun.star.pkg-folder" )
145 boolean IsDocument ( read-only, always false )
148 boolean IsFolder ( read-only, always true )
160 interface com
::sun
::star
::ucb
::XCommandProcessor
;
162 //-------------------------------------------------------------------------
163 /** is an enhanced version of <type>XCommandProcessor</type> that has an
164 additional method for releasing command identifiers obtained via
165 <member>XCommandProcessor::createCommandIdentifier</member> to avoid
166 resource leaks. For a detailed description of the problem refer to
167 <member>XCommandProcessor2::releaseCommandIdentifier</member>.
169 <p>Where many existing <type>Content</type> implementations do not
170 (yet), every new implementation should support this interface.
172 [optional] interface com
::sun
::star
::ucb
::XCommandProcessor2
;
174 //-------------------------------------------------------------------------
175 /** This interface is implemented according to the specification of
176 service <type>Content</type>.
178 interface com
::sun
::star
::beans
::XPropertiesChangeNotifier
;
180 //-------------------------------------------------------------------------
181 /** This interface is implemented according to the specification of
182 service <type>Content</type>.
184 interface com
::sun
::star
::beans
::XPropertyContainer
;
186 //-------------------------------------------------------------------------
187 /** This interface is implemented according to the specification of
188 service <type>Content</type>.
190 interface com
::sun
::star
::beans
::XPropertySetInfoChangeNotifier
;
192 //-------------------------------------------------------------------------
193 /** This interface is implemented according to the specification of
194 service <type>Content</type>.
196 interface com
::sun
::star
::ucb
::XCommandInfoChangeNotifier
;
198 //-------------------------------------------------------------------------
199 /** This interface is implemented according to the specification of
200 service <type>Content</type>.
202 interface com
::sun
::star
::container
::XChild
;
204 //-------------------------------------------------------------------------
205 /** This interface is implemented according to the specification of
206 service <type>Content</type>.
210 A PCP Folder can create other PCP Folders and PCP Streams. To create
211 a new child of a PCP Folder:
215 Let the parent folder create a new content by calling
216 <member>XContentCreator::createNewContent</member> on it. The content
217 type to use for new folders is "application/vnd.sun.star.pkg-folder".
218 To create a new PCP Stream, use the type
219 "application/vnd.sun.star.pkg-stream".
222 Set a title at the new folder / stream. ( Let the new child execute
223 the command "setPropertyValues", which sets at least the property
224 "Title" to a non-empty value ).
227 Let the new child ( not the parent! ) execute the command "insert".
228 This will commit the creation process. For streams, you need to supply
229 the implementation of an
230 <type scope="com::sun::star::io">XInputStream</type> with the command's
231 parameters, that provides access to the stream data.
238 Another, more convenient way for creating streams is simply to assemble
239 the URL for the new content ( last part of the path will become the
240 title of the new stream ) and to obtain a Content object for that URL
241 from the UCB. Then let the content execute the command "insert". The
242 command will fail, if you set the command's parameter
243 <member>InsertCommandArgument::ReplaceExisting"</member>
244 to false and there is already a stream with the title given by the
249 interface com
::sun
::star
::ucb
::XContentCreator
;
252 //=============================================================================