1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
21 module com
{ module sun
{ module star
{ module ucb
{
23 /** A PCP Folder is a container for other PCP Folders and PCP Streams.
25 @see com::sun::star::ucb::PackageContentProvider
26 @see com::sun::star::ucb::PackageStreamContent
28 published service PackageFolderContent
30 /** This interface is implemented according to the specification of
33 interface com
::sun
::star
::lang
::XComponent
;
35 /** This interface is implemented according to the specification of
38 interface com
::sun
::star
::ucb
::XContent
;
40 /** This interface is implemented according to the specification of
45 <b>Supported Commands</b>
60 insert ( makes a newly created folder persistent )
69 transfer ( only transfers from PCP Folders/PCP Streams to other
70 PCP folders. It does not handle contents with a URL scheme other
71 then the PCP-URL-scheme. )
74 flush ( a command introduced by the PCP Folder. It takes a
75 void-argument and returns void. This command is used to write unsaved
76 changes to the underlying package file. Note that the current
77 implementation of PCP contents never flushes automatically! Operations
78 which require a flush to get persistent, are:
79 "setPropertyValues( < any_non_read_only_property > ) ", "delete",
84 <b>Supported Properties</b>
87 string ContentType ( read-only, always "application/vnd.sun.star.pkg-folder" )
90 boolean IsDocument ( read-only, always false )
93 boolean IsFolder ( read-only, always true )
105 interface com
::sun
::star
::ucb
::XCommandProcessor
;
107 /** is an enhanced version of XCommandProcessor that has an
108 additional method for releasing command identifiers obtained via
109 XCommandProcessor::createCommandIdentifier() to avoid
110 resource leaks. For a detailed description of the problem refer to
111 XCommandProcessor2::releaseCommandIdentifier().
113 <p>Where many existing Content implementations do not
114 (yet), every new implementation should support this interface.
116 [optional] interface com
::sun
::star
::ucb
::XCommandProcessor2
;
118 /** This interface is implemented according to the specification of
121 interface com
::sun
::star
::beans
::XPropertiesChangeNotifier
;
123 /** This interface is implemented according to the specification of
126 interface com
::sun
::star
::beans
::XPropertyContainer
;
128 /** This interface is implemented according to the specification of
131 interface com
::sun
::star
::beans
::XPropertySetInfoChangeNotifier
;
133 /** This interface is implemented according to the specification of
136 interface com
::sun
::star
::ucb
::XCommandInfoChangeNotifier
;
138 /** This interface is implemented according to the specification of
141 interface com
::sun
::star
::container
::XChild
;
143 /** This interface is implemented according to the specification of
148 A PCP Folder can create other PCP Folders and PCP Streams. To create
149 a new child of a PCP Folder:
153 Let the parent folder create a new content by calling
154 XContentCreator::createNewContent() on it. The content
155 type to use for new folders is "application/vnd.sun.star.pkg-folder".
156 To create a new PCP Stream, use the type
157 "application/vnd.sun.star.pkg-stream".
160 Set a title at the new folder / stream. ( Let the new child execute
161 the command "setPropertyValues", which sets at least the property
162 "Title" to a non-empty value ).
165 Let the new child ( not the parent! ) execute the command "insert".
166 This will commit the creation process. For streams, you need to supply
167 the implementation of an
168 com::sun::star::io::XInputStream with the command's
169 parameters, that provides access to the stream data.
176 Another, more convenient way for creating streams is simply to assemble
177 the URL for the new content ( last part of the path will become the
178 title of the new stream ) and to obtain a Content object for that URL
179 from the UCB. Then let the content execute the command "insert". The
180 command will fail, if you set the command's parameter
181 InsertCommandArgument::ReplaceExisting"
182 to false and there is already a stream with the title given by the
187 interface com
::sun
::star
::ucb
::XContentCreator
;
193 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */