xref: /aoo41x/main/offapi/com/sun/star/embed/XStorage.idl (revision d1766043)
1*d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3*d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5*d1766043SAndrew Rist * distributed with this work for additional information
6*d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7*d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9*d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10*d1766043SAndrew Rist *
11*d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12*d1766043SAndrew Rist *
13*d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*d1766043SAndrew Rist * software distributed under the License is distributed on an
15*d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17*d1766043SAndrew Rist * specific language governing permissions and limitations
18*d1766043SAndrew Rist * under the License.
19*d1766043SAndrew Rist *
20*d1766043SAndrew Rist *************************************************************/
21*d1766043SAndrew Rist
22*d1766043SAndrew Rist
23cdf0e10cSrcweir#ifndef __com_sun_star_embed_XStorage_idl__
24cdf0e10cSrcweir#define __com_sun_star_embed_XStorage_idl__
25cdf0e10cSrcweir
26cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__
27cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl>
28cdf0e10cSrcweir#endif
29cdf0e10cSrcweir
30cdf0e10cSrcweir#ifndef __com_sun_star_io_XStream_idl__
31cdf0e10cSrcweir#include <com/sun/star/io/XStream.idl>
32cdf0e10cSrcweir#endif
33cdf0e10cSrcweir
34cdf0e10cSrcweir#ifndef __com_sun_star_io_XInputStream_idl__
35cdf0e10cSrcweir#include <com/sun/star/io/XInputStream.idl>
36cdf0e10cSrcweir#endif
37cdf0e10cSrcweir
38cdf0e10cSrcweir#ifndef __com_sun_star_io_IOException_idl__
39cdf0e10cSrcweir#include <com/sun/star/io/IOException.idl>
40cdf0e10cSrcweir#endif
41cdf0e10cSrcweir
42cdf0e10cSrcweir#ifndef __com_sun_star_lang_XComponent_idl__
43cdf0e10cSrcweir#include <com/sun/star/lang/XComponent.idl>
44cdf0e10cSrcweir#endif
45cdf0e10cSrcweir
46cdf0e10cSrcweir#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
47cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl>
48cdf0e10cSrcweir#endif
49cdf0e10cSrcweir
50cdf0e10cSrcweir#ifndef __com_sun_star_embed_StorageWrappedTargetException_idl__
51cdf0e10cSrcweir#include <com/sun/star/embed/StorageWrappedTargetException.idl>
52cdf0e10cSrcweir#endif
53cdf0e10cSrcweir
54cdf0e10cSrcweir#ifndef __com_sun_star_embed_InvalidStorageException_idl__
55cdf0e10cSrcweir#include <com/sun/star/embed/InvalidStorageException.idl>
56cdf0e10cSrcweir#endif
57cdf0e10cSrcweir
58cdf0e10cSrcweir#ifndef __com_sun_star_packages_WrongPasswordException_idl__
59cdf0e10cSrcweir#include <com/sun/star/packages/WrongPasswordException.idl>
60cdf0e10cSrcweir#endif
61cdf0e10cSrcweir
62cdf0e10cSrcweir#ifndef __com_sun_star_container_XNameAccess_idl__
63cdf0e10cSrcweir#include <com/sun/star/container/XNameAccess.idl>
64cdf0e10cSrcweir#endif
65cdf0e10cSrcweir
66cdf0e10cSrcweir#ifndef __com_sun_star_container_NoSuchElementException_idl__
67cdf0e10cSrcweir#include <com/sun/star/container/NoSuchElementException.idl>
68cdf0e10cSrcweir#endif
69cdf0e10cSrcweir
70cdf0e10cSrcweir#ifndef __com_sun_star_container_ElementExistException_idl__
71cdf0e10cSrcweir#include <com/sun/star/container/ElementExistException.idl>
72cdf0e10cSrcweir#endif
73cdf0e10cSrcweir
74cdf0e10cSrcweir#ifndef __com_sun_star_packages_NoEncryptionException_idl__
75cdf0e10cSrcweir#include <com/sun/star/packages/NoEncryptionException.idl>
76cdf0e10cSrcweir#endif
77cdf0e10cSrcweir
78cdf0e10cSrcweir#ifndef __com_sun_star_packages_NoRawFormatException_idl__
79cdf0e10cSrcweir#include <com/sun/star/packages/NoRawFormatException.idl>
80cdf0e10cSrcweir#endif
81cdf0e10cSrcweir
82cdf0e10cSrcweir
83cdf0e10cSrcweir//============================================================================
84cdf0e10cSrcweir
85cdf0e10cSrcweir module com {  module sun {  module star {  module embed {
86cdf0e10cSrcweir
87cdf0e10cSrcweir//============================================================================
88cdf0e10cSrcweir/** This interface represents main storage functionality.
89cdf0e10cSrcweir */
90cdf0e10cSrcweirpublished interface XStorage
91cdf0e10cSrcweir{
92cdf0e10cSrcweir	// INTERFACES
93cdf0e10cSrcweir	//
94cdf0e10cSrcweir	// -----------------------------------------------------------------------
95cdf0e10cSrcweir	/** allows to get list of child elements and to check if an element with a
96cdf0e10cSrcweir		specified name exists in a storage.
97cdf0e10cSrcweir
98cdf0e10cSrcweir		<p>
99cdf0e10cSrcweir		It is also possible to use this interface to get read access to
100cdf0e10cSrcweir		a child element by
101cdf0e10cSrcweir		<method scope="com::sun::star::container">XNameAccess::getByName</method>
102cdf0e10cSrcweir		call. But the recommended way is to use <type>XStorage</type>
103cdf0e10cSrcweir		interface for this purpose.
104cdf0e10cSrcweir		</p>
105cdf0e10cSrcweir	 */
106cdf0e10cSrcweir	interface ::com::sun::star::container::XNameAccess;
107cdf0e10cSrcweir
108cdf0e10cSrcweir	// -----------------------------------------------------------------------
109cdf0e10cSrcweir	/** allows to controll and track lifetime of the storage.
110cdf0e10cSrcweir
111cdf0e10cSrcweir		<p>
112cdf0e10cSrcweir		In case a storage is disposed any call to it's methods should result
113cdf0e10cSrcweir		in <type scope="com::sun::star::lang">DisposedException</type>.
114cdf0e10cSrcweir		</p>
115cdf0e10cSrcweir	 */
116cdf0e10cSrcweir	interface ::com::sun::star::lang::XComponent;
117cdf0e10cSrcweir
118cdf0e10cSrcweir
119cdf0e10cSrcweir	// METHODS
120cdf0e10cSrcweir	//
121cdf0e10cSrcweir	// -----------------------------------------------------------------------
122cdf0e10cSrcweir	/** allows to copy current storage to another one
123cdf0e10cSrcweir
124cdf0e10cSrcweir		<p>
125cdf0e10cSrcweir		The destination storage contents are overwritten.
126cdf0e10cSrcweir		After the successful copying the target storage is automatically
127cdf0e10cSrcweir		commited if it implements transacted access.
128cdf0e10cSrcweir		</p>
129cdf0e10cSrcweir
130cdf0e10cSrcweir		@param xDest
131cdf0e10cSrcweir			a destination storage this storage must be copied to.
132cdf0e10cSrcweir
133cdf0e10cSrcweir		@throws ::com::sun::star::embed::InvalidStorageException
134cdf0e10cSrcweir			this storage is in invalid state for any reason
135cdf0e10cSrcweir
136cdf0e10cSrcweir		@throws ::com::sun::star::lang::IllegalArgumentException
137cdf0e10cSrcweir			an illegal argument is provided
138cdf0e10cSrcweir
139cdf0e10cSrcweir		@throws ::com::sun::star::io::IOException
140cdf0e10cSrcweir			in case of io errors during copying
141cdf0e10cSrcweir
142cdf0e10cSrcweir		@throws ::com::sun::star::embed::StorageWrappedTargetException
143cdf0e10cSrcweir			wraps other exception acquired during copying
144cdf0e10cSrcweir	 */
145cdf0e10cSrcweir	void copyToStorage( [in] XStorage xDest )
146cdf0e10cSrcweir		raises( ::com::sun::star::embed::InvalidStorageException,
147cdf0e10cSrcweir				::com::sun::star::lang::IllegalArgumentException,
148cdf0e10cSrcweir				::com::sun::star::io::IOException,
149cdf0e10cSrcweir				::com::sun::star::embed::StorageWrappedTargetException );
150cdf0e10cSrcweir
151cdf0e10cSrcweir	// -----------------------------------------------------------------------
152cdf0e10cSrcweir	/** allows to get access to a child stream of the storage.
153cdf0e10cSrcweir
154cdf0e10cSrcweir		<p>
155cdf0e10cSrcweir		In case the stream is open in readonly mode the
156cdf0e10cSrcweir		<method scope="com::sun::star::io">XStream::getOutputStream</method>
157cdf0e10cSrcweir		method will return an empty reference.
158cdf0e10cSrcweir		</p>
159cdf0e10cSrcweir
160cdf0e10cSrcweir		@param sStreamName
161cdf0e10cSrcweir			the name of the substream that should be open
162cdf0e10cSrcweir
163cdf0e10cSrcweir		@param nOpenMode
164cdf0e10cSrcweir			a mode the stream should be open in,
165cdf0e10cSrcweir			can be a combination of <type>ElementModes</type> values
166cdf0e10cSrcweir
167cdf0e10cSrcweir		@throws ::com::sun::star::embed::InvalidStorageException
168cdf0e10cSrcweir			this storage is in invalid state for any reason
169cdf0e10cSrcweir
170cdf0e10cSrcweir		@throws ::com::sun::star::lang::IllegalArgumentException
171cdf0e10cSrcweir			one of provided arguments is illegal
172cdf0e10cSrcweir
173cdf0e10cSrcweir		@throws ::com::sun::star::packages::WrongPasswordException
174cdf0e10cSrcweir			the provided password is wrong
175cdf0e10cSrcweir
176cdf0e10cSrcweir		@throws ::com::sun::star::io::IOException
177cdf0e10cSrcweir			in case of io errors during stream opening
178cdf0e10cSrcweir
179cdf0e10cSrcweir		@throws ::com::sun::star::embed::StorageWrappedTargetException
180cdf0e10cSrcweir			wraps other exceptions
181cdf0e10cSrcweir	 */
182cdf0e10cSrcweir    ::com::sun::star::io::XStream  openStreamElement(
183cdf0e10cSrcweir			[in] string sStreamName,
184cdf0e10cSrcweir			[in] long nOpenMode )
185cdf0e10cSrcweir		raises( ::com::sun::star::embed::InvalidStorageException,
186cdf0e10cSrcweir				::com::sun::star::lang::IllegalArgumentException,
187cdf0e10cSrcweir				::com::sun::star::packages::WrongPasswordException,
188cdf0e10cSrcweir				::com::sun::star::io::IOException,
189cdf0e10cSrcweir				::com::sun::star::embed::StorageWrappedTargetException );
190cdf0e10cSrcweir
191cdf0e10cSrcweir	// -----------------------------------------------------------------------
192cdf0e10cSrcweir	/** allows to get access to a child encrypted stream with password.
193cdf0e10cSrcweir
194cdf0e10cSrcweir		<p>
195cdf0e10cSrcweir		If storage does not allow any encryption this method will always throw
196cdf0e10cSrcweir		<type scope="com::sun::star::packages">NoEncryptionException</type>.
197cdf0e10cSrcweir		</p>
198cdf0e10cSrcweir
199cdf0e10cSrcweir		<p>
200cdf0e10cSrcweir		In case the stream is open in readonly mode the
201cdf0e10cSrcweir		<method scope="com::sun::star::io">XStream::getOutputStream</method>
202cdf0e10cSrcweir		method will return an empty reference.
203cdf0e10cSrcweir		</p>
204cdf0e10cSrcweir
205cdf0e10cSrcweir		@param sStreamName
206cdf0e10cSrcweir			the name of the substream that should be open
207cdf0e10cSrcweir
208cdf0e10cSrcweir		@param nOpenMode
209cdf0e10cSrcweir			a mode the stream should be open in,
210cdf0e10cSrcweir			can be a combination of <type>ElementModes</type> values
211cdf0e10cSrcweir
212cdf0e10cSrcweir		@param sPassword
213cdf0e10cSrcweir			this parameter allowes to specify a reading password for the
214cdf0e10cSrcweir			stream, the password must be a correct one, otherwise an
215cdf0e10cSrcweir			exception will be thrown
216cdf0e10cSrcweir
217cdf0e10cSrcweir		@throws ::com::sun::star::embed::InvalidStorageException
218cdf0e10cSrcweir			this storage is in invalid state for any reason
219cdf0e10cSrcweir
220cdf0e10cSrcweir		@throws ::com::sun::star::lang::IllegalArgumentException
221cdf0e10cSrcweir			one of provided arguments is illegal
222cdf0e10cSrcweir
223cdf0e10cSrcweir		@throws ::com::sun::star::packages::NoEncryptionException
224cdf0e10cSrcweir			the stream is not encrypted
225cdf0e10cSrcweir
226cdf0e10cSrcweir		@throws ::com::sun::star::packages::WrongPasswordException
227cdf0e10cSrcweir			the provided password is wrong
228cdf0e10cSrcweir
229cdf0e10cSrcweir		@throws ::com::sun::star::io::IOException
230cdf0e10cSrcweir			in case of io errors during stream opening
231cdf0e10cSrcweir
232cdf0e10cSrcweir		@throws ::com::sun::star::embed::StorageWrappedTargetException
233cdf0e10cSrcweir			wraps other exceptions
234cdf0e10cSrcweir	 */
235cdf0e10cSrcweir    ::com::sun::star::io::XStream  openEncryptedStreamElement(
236cdf0e10cSrcweir			[in] string sStreamName,
237cdf0e10cSrcweir			[in] long nOpenMode,
238cdf0e10cSrcweir			[in] string sPassword )
239cdf0e10cSrcweir		raises( ::com::sun::star::embed::InvalidStorageException,
240cdf0e10cSrcweir				::com::sun::star::lang::IllegalArgumentException,
241cdf0e10cSrcweir				::com::sun::star::packages::NoEncryptionException,
242cdf0e10cSrcweir				::com::sun::star::packages::WrongPasswordException,
243cdf0e10cSrcweir				::com::sun::star::io::IOException,
244cdf0e10cSrcweir				::com::sun::star::embed::StorageWrappedTargetException );
245cdf0e10cSrcweir
246cdf0e10cSrcweir	// -----------------------------------------------------------------------
247cdf0e10cSrcweir	/** allows to get access to a child storage.
248cdf0e10cSrcweir
249cdf0e10cSrcweir		<p>
250cdf0e10cSrcweir		The opened substorage must support specified in 'nOpenMode' access
251cdf0e10cSrcweir		modes. It can support 'read' mode in addition. But any child element
252cdf0e10cSrcweir		can support one of those modes only in case this mode is supported by
253cdf0e10cSrcweir		parent storage.
254cdf0e10cSrcweir		</p>
255cdf0e10cSrcweir
256cdf0e10cSrcweir		@param sStorName
257cdf0e10cSrcweir			the name of the storage that should be open
258cdf0e10cSrcweir
259cdf0e10cSrcweir		@param nOpenMode
260cdf0e10cSrcweir			a mode the storage should be open in
261cdf0e10cSrcweir
262cdf0e10cSrcweir		@throws ::com::sun::star::embed::InvalidStorageException
263cdf0e10cSrcweir			this storage is in invalid state for any reason
264cdf0e10cSrcweir
265cdf0e10cSrcweir		@throws ::com::sun::star::lang::IllegalArgumentException
266cdf0e10cSrcweir			one of provided arguments is illegal
267cdf0e10cSrcweir
268cdf0e10cSrcweir		@throws ::com::sun::star::io::IOException
269cdf0e10cSrcweir			in case of io errors during stream opening
270cdf0e10cSrcweir
271cdf0e10cSrcweir		@throws ::com::sun::star::embed::StorageWrappedTargetException
272cdf0e10cSrcweir			wraps other exceptions
273cdf0e10cSrcweir
274cdf0e10cSrcweir	 */
275cdf0e10cSrcweir    XStorage openStorageElement( [in] string sStorName,
276cdf0e10cSrcweir								 [in] long nOpenMode )
277cdf0e10cSrcweir		raises( ::com::sun::star::embed::InvalidStorageException,
278cdf0e10cSrcweir				::com::sun::star::lang::IllegalArgumentException,
279cdf0e10cSrcweir				::com::sun::star::io::IOException,
280cdf0e10cSrcweir				::com::sun::star::embed::StorageWrappedTargetException );
281cdf0e10cSrcweir
282cdf0e10cSrcweir	// -----------------------------------------------------------------------
283cdf0e10cSrcweir	/** allows to get readonly copy of a child stream of the storage.
284cdf0e10cSrcweir
285cdf0e10cSrcweir		<p>
286cdf0e10cSrcweir		The stream is open in readonly mode so the
287cdf0e10cSrcweir		<method scope="com::sun::star::io">XStream::getOutputStream</method>
288cdf0e10cSrcweir		method will return an empty reference.
289cdf0e10cSrcweir		</p>
290cdf0e10cSrcweir
291cdf0e10cSrcweir		@param sStreamName
292cdf0e10cSrcweir			the name of the substream that should be copied
293cdf0e10cSrcweir
294cdf0e10cSrcweir		@throws ::com::sun::star::embed::InvalidStorageException
295cdf0e10cSrcweir			this storage is in invalid state for any reason
296cdf0e10cSrcweir
297cdf0e10cSrcweir		@throws ::com::sun::star::lang::IllegalArgumentException
298cdf0e10cSrcweir			one of provided arguments is illegal
299cdf0e10cSrcweir
300cdf0e10cSrcweir		@throws ::com::sun::star::packages::WrongPasswordException
301cdf0e10cSrcweir			the provided password is wrong
302cdf0e10cSrcweir
303cdf0e10cSrcweir		@throws ::com::sun::star::io::IOException
304cdf0e10cSrcweir			in case of io errors during stream opening
305cdf0e10cSrcweir
306cdf0e10cSrcweir		@throws ::com::sun::star::embed::StorageWrappedTargetException
307cdf0e10cSrcweir			wraps other exceptions
308cdf0e10cSrcweir	 */
309cdf0e10cSrcweir    ::com::sun::star::io::XStream cloneStreamElement( [in] string sStreamName )
310cdf0e10cSrcweir		raises( ::com::sun::star::embed::InvalidStorageException,
311cdf0e10cSrcweir				::com::sun::star::lang::IllegalArgumentException,
312cdf0e10cSrcweir				::com::sun::star::packages::WrongPasswordException,
313cdf0e10cSrcweir				::com::sun::star::io::IOException,
314cdf0e10cSrcweir				::com::sun::star::embed::StorageWrappedTargetException );
315cdf0e10cSrcweir
316cdf0e10cSrcweir	// -----------------------------------------------------------------------
317cdf0e10cSrcweir	/** allows to get readonly copy of a child encrypted stream with password.
318cdf0e10cSrcweir
319cdf0e10cSrcweir		<p>
320cdf0e10cSrcweir		If storage does not allow any encryption this method will always throw
321cdf0e10cSrcweir		<type scope="com::sun::star::packages">NoEncryptionException</type>.
322cdf0e10cSrcweir		</p>
323cdf0e10cSrcweir
324cdf0e10cSrcweir		<p>
325cdf0e10cSrcweir		The stream is open in readonly mode so the
326cdf0e10cSrcweir		<method scope="com::sun::star::io">XStream::getOutputStream</method>
327cdf0e10cSrcweir		method will return an empty reference.
328cdf0e10cSrcweir		</p>
329cdf0e10cSrcweir
330cdf0e10cSrcweir		<p>
331cdf0e10cSrcweir		This method allows to specify reading password for the child stream
332cdf0e10cSrcweir		explicitly.
333cdf0e10cSrcweir		</p>
334cdf0e10cSrcweir
335cdf0e10cSrcweir		@param sStreamName
336cdf0e10cSrcweir			the name of the substream that should be copied
337cdf0e10cSrcweir
338cdf0e10cSrcweir		@param sPassword
339cdf0e10cSrcweir			this parameter allowes to specify a reading password for the
340cdf0e10cSrcweir			stream, the password must be a correct one, otherwise an
341cdf0e10cSrcweir			exception will be thrown
342cdf0e10cSrcweir
343cdf0e10cSrcweir		@throws ::com::sun::star::embed::InvalidStorageException
344cdf0e10cSrcweir			this storage is in invalid state for any reason
345cdf0e10cSrcweir
346cdf0e10cSrcweir		@throws ::com::sun::star::lang::IllegalArgumentException
347cdf0e10cSrcweir			one of provided arguments is illegal
348cdf0e10cSrcweir
349cdf0e10cSrcweir		@throws ::com::sun::star::packages::NoEncryptionException
350cdf0e10cSrcweir			the stream is not encrypted
351cdf0e10cSrcweir
352cdf0e10cSrcweir		@throws ::com::sun::star::packages::WrongPasswordException
353cdf0e10cSrcweir			the provided password is wrong
354cdf0e10cSrcweir
355cdf0e10cSrcweir		@throws ::com::sun::star::io::IOException
356cdf0e10cSrcweir			in case of io errors during stream opening
357cdf0e10cSrcweir
358cdf0e10cSrcweir		@throws ::com::sun::star::embed::StorageWrappedTargetException
359cdf0e10cSrcweir			wraps other exceptions
360cdf0e10cSrcweir	 */
361cdf0e10cSrcweir    ::com::sun::star::io::XStream cloneEncryptedStreamElement(
362cdf0e10cSrcweir			[in] string sStreamName,
363cdf0e10cSrcweir			[in] string sPassword )
364cdf0e10cSrcweir		raises( ::com::sun::star::embed::InvalidStorageException,
365cdf0e10cSrcweir				::com::sun::star::lang::IllegalArgumentException,
366cdf0e10cSrcweir				::com::sun::star::packages::NoEncryptionException,
367cdf0e10cSrcweir				::com::sun::star::packages::WrongPasswordException,
368cdf0e10cSrcweir				::com::sun::star::io::IOException,
369cdf0e10cSrcweir				::com::sun::star::embed::StorageWrappedTargetException );
370cdf0e10cSrcweir
371cdf0e10cSrcweir	// -----------------------------------------------------------------------
372cdf0e10cSrcweir	/** allows to get copy of this storage at the state of it's last commit.
373cdf0e10cSrcweir
374cdf0e10cSrcweir		<p>
375cdf0e10cSrcweir		This method makes sence only for services implementations that allow
376cdf0e10cSrcweir		transaction in the storage.
377cdf0e10cSrcweir		</p>
378cdf0e10cSrcweir
379cdf0e10cSrcweir		@param xStorage
380cdf0e10cSrcweir			the target storage that will be filled in with copy.
381cdf0e10cSrcweir
382cdf0e10cSrcweir		@throws ::com::sun::star::embed::InvalidStorageException
383cdf0e10cSrcweir			this storage is in invalid state for any reason
384cdf0e10cSrcweir
385cdf0e10cSrcweir		@throws ::com::sun::star::lang::IllegalArgumentException
386cdf0e10cSrcweir			one of provided arguments is illegal
387cdf0e10cSrcweir
388cdf0e10cSrcweir		@throws ::com::sun::star::io::IOException
389cdf0e10cSrcweir			in case of io errors during copying
390cdf0e10cSrcweir
391cdf0e10cSrcweir		@throws ::com::sun::star::embed::StorageWrappedTargetException
392cdf0e10cSrcweir			wraps other exceptions
393cdf0e10cSrcweir
394cdf0e10cSrcweir	 */
395cdf0e10cSrcweir    void copyLastCommitTo( [in] XStorage xTargetStorage )
396cdf0e10cSrcweir		raises( ::com::sun::star::embed::InvalidStorageException,
397cdf0e10cSrcweir				::com::sun::star::lang::IllegalArgumentException,
398cdf0e10cSrcweir				::com::sun::star::io::IOException,
399cdf0e10cSrcweir				::com::sun::star::embed::StorageWrappedTargetException );
400cdf0e10cSrcweir
401cdf0e10cSrcweir	// -----------------------------------------------------------------------
402cdf0e10cSrcweir	/** allows to get copy of a child storage at the state of it's last commit.
403cdf0e10cSrcweir
404cdf0e10cSrcweir		<p>
405cdf0e10cSrcweir		This method makes sence only for services implementations that allow
406cdf0e10cSrcweir		transaction in the storage.
407cdf0e10cSrcweir		</p>
408cdf0e10cSrcweir
409cdf0e10cSrcweir		@param sStorName
410cdf0e10cSrcweir			the name of the storage that should be copied
411cdf0e10cSrcweir
412cdf0e10cSrcweir		@param xStorage
413cdf0e10cSrcweir			the target storage that will be filled in with copy
414cdf0e10cSrcweir
415cdf0e10cSrcweir		@throws ::com::sun::star::embed::InvalidStorageException
416cdf0e10cSrcweir			this storage is in invalid state for any reason
417cdf0e10cSrcweir
418cdf0e10cSrcweir		@throws ::com::sun::star::lang::IllegalArgumentException
419cdf0e10cSrcweir			one of provided arguments is illegal
420cdf0e10cSrcweir
421cdf0e10cSrcweir		@throws ::com::sun::star::io::IOException
422cdf0e10cSrcweir			in case of io errors during copying
423cdf0e10cSrcweir
424cdf0e10cSrcweir		@throws ::com::sun::star::embed::StorageWrappedTargetException
425cdf0e10cSrcweir			wraps other exceptions
426cdf0e10cSrcweir
427cdf0e10cSrcweir	 */
428cdf0e10cSrcweir    void copyStorageElementLastCommitTo(
429cdf0e10cSrcweir			[in] string sStorName,
430cdf0e10cSrcweir			[in] XStorage xTargetStorage )
431cdf0e10cSrcweir		raises( ::com::sun::star::embed::InvalidStorageException,
432cdf0e10cSrcweir				::com::sun::star::lang::IllegalArgumentException,
433cdf0e10cSrcweir				::com::sun::star::io::IOException,
434cdf0e10cSrcweir				::com::sun::star::embed::StorageWrappedTargetException );
435cdf0e10cSrcweir
436cdf0e10cSrcweir	// -----------------------------------------------------------------------
437cdf0e10cSrcweir	/** allows to check if an element is a child stream with specified name.
438cdf0e10cSrcweir
439cdf0e10cSrcweir		<p>
440cdf0e10cSrcweir		In case there is no child element with such name an exception will be
441cdf0e10cSrcweir		thrown.
442cdf0e10cSrcweir		</p>
443cdf0e10cSrcweir
444cdf0e10cSrcweir		@param sElementName
445cdf0e10cSrcweir			the name of the element to check
446cdf0e10cSrcweir
447cdf0e10cSrcweir		@returns
448cdf0e10cSrcweir			<TRUE/> in case the element is a stream
449cdf0e10cSrcweir			<FALSE/> - the element is a storage
450cdf0e10cSrcweir
451cdf0e10cSrcweir		@throws ::com::sun::star::container::NoSuchElementException
452cdf0e10cSrcweir			there is no element with such name
453cdf0e10cSrcweir
454cdf0e10cSrcweir		@throws ::com::sun::star::lang::IllegalArgumentException
455cdf0e10cSrcweir			an illegal argument is provided
456cdf0e10cSrcweir
457cdf0e10cSrcweir		@throws ::com::sun::star::embed::InvalidStorageException
458cdf0e10cSrcweir			this storage is in invalid state for any reason
459cdf0e10cSrcweir
460cdf0e10cSrcweir	 */
461cdf0e10cSrcweir    boolean isStreamElement( [in] string sElementName )
462cdf0e10cSrcweir		raises( ::com::sun::star::container::NoSuchElementException,
463cdf0e10cSrcweir				::com::sun::star::lang::IllegalArgumentException,
464cdf0e10cSrcweir				::com::sun::star::embed::InvalidStorageException );
465cdf0e10cSrcweir
466cdf0e10cSrcweir
467cdf0e10cSrcweir	// -----------------------------------------------------------------------
468cdf0e10cSrcweir	/** allows to check if an element is a child storage with specified name.
469cdf0e10cSrcweir
470cdf0e10cSrcweir		<p>
471cdf0e10cSrcweir		In case there is no child element with such name an exception will be
472cdf0e10cSrcweir		thrown.
473cdf0e10cSrcweir		</p>
474cdf0e10cSrcweir
475cdf0e10cSrcweir		@param sElementName
476cdf0e10cSrcweir			the name of the element to check
477cdf0e10cSrcweir
478cdf0e10cSrcweir		@returns
479cdf0e10cSrcweir			<TRUE/> in case the element is a storage
480cdf0e10cSrcweir			<FALSE/> - the element is a stream
481cdf0e10cSrcweir
482cdf0e10cSrcweir		@throws ::com::sun::star::container::NoSuchElementException
483cdf0e10cSrcweir			there is no element with such name
484cdf0e10cSrcweir
485cdf0e10cSrcweir		@throws ::com::sun::star::lang::IllegalArgumentException
486cdf0e10cSrcweir			an illegal argument is provided
487cdf0e10cSrcweir
488cdf0e10cSrcweir		@throws ::com::sun::star::embed::InvalidStorageException
489cdf0e10cSrcweir			this storage is in invalid state for any reason
490cdf0e10cSrcweir
491cdf0e10cSrcweir	 */
492cdf0e10cSrcweir    boolean isStorageElement( [in] string sElementName )
493cdf0e10cSrcweir		raises( ::com::sun::star::container::NoSuchElementException,
494cdf0e10cSrcweir				::com::sun::star::lang::IllegalArgumentException,
495cdf0e10cSrcweir				::com::sun::star::embed::InvalidStorageException );
496cdf0e10cSrcweir
497cdf0e10cSrcweir	// -----------------------------------------------------------------------
498cdf0e10cSrcweir	/** removes an element from a storage.
499cdf0e10cSrcweir
500cdf0e10cSrcweir		@param sElementName
501cdf0e10cSrcweir			the name of the element to remove
502cdf0e10cSrcweir
503cdf0e10cSrcweir		@throws ::com::sun::star::embed::InvalidStorageException
504cdf0e10cSrcweir			this storage is in invalid state for eny reason
505cdf0e10cSrcweir
506cdf0e10cSrcweir		@throws ::com::sun::star::lang::IllegalArgumentException
507cdf0e10cSrcweir			an illegal argument is provided
508cdf0e10cSrcweir
509cdf0e10cSrcweir		@throws ::com::sun::star::container::NoSuchElementException
510cdf0e10cSrcweir			there is no element with such name
511cdf0e10cSrcweir
512cdf0e10cSrcweir		@throws ::com::sun::star::io::IOException
513cdf0e10cSrcweir			in case of io errors during removing
514cdf0e10cSrcweir
515cdf0e10cSrcweir		@throws ::com::sun::star::embed::StorageWrappedTargetException
516cdf0e10cSrcweir			wraps other exceptions
517cdf0e10cSrcweir
518cdf0e10cSrcweir	 */
519cdf0e10cSrcweir    void removeElement( [in] string sElementName )
520cdf0e10cSrcweir		raises( ::com::sun::star::embed::InvalidStorageException,
521cdf0e10cSrcweir				::com::sun::star::lang::IllegalArgumentException,
522cdf0e10cSrcweir				::com::sun::star::container::NoSuchElementException,
523cdf0e10cSrcweir				::com::sun::star::io::IOException,
524cdf0e10cSrcweir				::com::sun::star::embed::StorageWrappedTargetException );
525cdf0e10cSrcweir
526cdf0e10cSrcweir	// -----------------------------------------------------------------------
527cdf0e10cSrcweir	/** renames an element in a storage.
528cdf0e10cSrcweir
529cdf0e10cSrcweir		@param sElementName
530cdf0e10cSrcweir			the old name of the element to rename
531cdf0e10cSrcweir
532cdf0e10cSrcweir		@param sNewName
533cdf0e10cSrcweir			the new name of the element to rename
534cdf0e10cSrcweir
535cdf0e10cSrcweir		@throws ::com::sun::star::embed::InvalidStorageException
536cdf0e10cSrcweir			this storage is in invalid state for eny reason
537cdf0e10cSrcweir
538cdf0e10cSrcweir		@throws ::com::sun::star::lang::IllegalArgumentException
539cdf0e10cSrcweir			an illegal argument is provided
540cdf0e10cSrcweir
541cdf0e10cSrcweir		@throws ::com::sun::star::container::NoSuchElementException
542cdf0e10cSrcweir			there is no element with old name in this storage
543cdf0e10cSrcweir
544cdf0e10cSrcweir		@throws ::com::sun::star::container::ElementExistException
545cdf0e10cSrcweir			an element with new name already exists in this storage
546cdf0e10cSrcweir
547cdf0e10cSrcweir		@throws ::com::sun::star::io::IOException
548cdf0e10cSrcweir			in case of io errors during renaming
549cdf0e10cSrcweir
550cdf0e10cSrcweir		@throws ::com::sun::star::embed::StorageWrappedTargetException
551cdf0e10cSrcweir			wraps other exceptions
552cdf0e10cSrcweir
553cdf0e10cSrcweir	 */
554cdf0e10cSrcweir    void renameElement( [in] string sElementName, [in] string sNewName )
555cdf0e10cSrcweir		raises( ::com::sun::star::embed::InvalidStorageException,
556cdf0e10cSrcweir				::com::sun::star::lang::IllegalArgumentException,
557cdf0e10cSrcweir				::com::sun::star::container::NoSuchElementException,
558cdf0e10cSrcweir				::com::sun::star::container::ElementExistException,
559cdf0e10cSrcweir				::com::sun::star::io::IOException,
560cdf0e10cSrcweir				::com::sun::star::embed::StorageWrappedTargetException );
561cdf0e10cSrcweir
562cdf0e10cSrcweir	// -----------------------------------------------------------------------
563cdf0e10cSrcweir	/** allows to copy an entry from one storage to another.
564cdf0e10cSrcweir
565cdf0e10cSrcweir		<p>
566cdf0e10cSrcweir		If target element supports transacted mode it must be commited by this
567cdf0e10cSrcweir		method after successful copying.
568cdf0e10cSrcweir		</p>
569cdf0e10cSrcweir
570cdf0e10cSrcweir		@param sElementName
571cdf0e10cSrcweir			the name of the element in this storage
572cdf0e10cSrcweir
573cdf0e10cSrcweir		@param xDest
574cdf0e10cSrcweir			a destination storage
575cdf0e10cSrcweir
576cdf0e10cSrcweir		@param sNewName
577cdf0e10cSrcweir			the name of the result element in destination storage
578cdf0e10cSrcweir
579cdf0e10cSrcweir		@throws ::com::sun::star::embed::InvalidStorageException
580cdf0e10cSrcweir			this storage is in invalid state for eny reason
581cdf0e10cSrcweir
582cdf0e10cSrcweir		@throws ::com::sun::star::container::NoSuchElementException
583cdf0e10cSrcweir			there is no specified source element in this storage
584cdf0e10cSrcweir
585cdf0e10cSrcweir		@throws ::com::sun::star::container::ElementExistException
586cdf0e10cSrcweir			an element with specified destination name already exists in destination storage
587cdf0e10cSrcweir
588cdf0e10cSrcweir		@throws ::com::sun::star::io::IOException
589cdf0e10cSrcweir			in case of io errors during copying
590cdf0e10cSrcweir
591cdf0e10cSrcweir		@throws ::com::sun::star::embed::StorageWrappedTargetException
592cdf0e10cSrcweir			wraps other exceptions
593cdf0e10cSrcweir
594cdf0e10cSrcweir	 */
595cdf0e10cSrcweir    void copyElementTo(
596cdf0e10cSrcweir			[in] string sElementName,
597cdf0e10cSrcweir			[in] XStorage xDest,
598cdf0e10cSrcweir			[in] string sNewName )
599cdf0e10cSrcweir		raises( ::com::sun::star::embed::InvalidStorageException,
600cdf0e10cSrcweir				::com::sun::star::lang::IllegalArgumentException,
601cdf0e10cSrcweir				::com::sun::star::container::NoSuchElementException,
602cdf0e10cSrcweir				::com::sun::star::container::ElementExistException,
603cdf0e10cSrcweir				::com::sun::star::io::IOException,
604cdf0e10cSrcweir				::com::sun::star::embed::StorageWrappedTargetException );
605cdf0e10cSrcweir
606cdf0e10cSrcweir	// -----------------------------------------------------------------------
607cdf0e10cSrcweir	/** allows to move an entry from one storage to another.
608cdf0e10cSrcweir
609cdf0e10cSrcweir		<p>
610cdf0e10cSrcweir		If target element supports transacted mode it must be commited by this
611cdf0e10cSrcweir		method after successful moving.
612cdf0e10cSrcweir		</p>
613cdf0e10cSrcweir
614cdf0e10cSrcweir		@param sElementName
615cdf0e10cSrcweir			the name of the element in this storage
616cdf0e10cSrcweir
617cdf0e10cSrcweir		@param xDest
618cdf0e10cSrcweir			a destination storage
619cdf0e10cSrcweir
620cdf0e10cSrcweir		@param sNewName
621cdf0e10cSrcweir			the name of the result element in destination storage
622cdf0e10cSrcweir
623cdf0e10cSrcweir		@throws ::com::sun::star::embed::InvalidStorageException
624cdf0e10cSrcweir			this storage is in invalid state for eny reason
625cdf0e10cSrcweir
626cdf0e10cSrcweir		@throws ::com::sun::star::container::NoSuchElementException
627cdf0e10cSrcweir			there is no specified source element in this storage
628cdf0e10cSrcweir
629cdf0e10cSrcweir		@throws ::com::sun::star::container::ElementExistException
630cdf0e10cSrcweir			an element with specified destination name already exists in destination storage
631cdf0e10cSrcweir
632cdf0e10cSrcweir		@throws ::com::sun::star::io::IOException
633cdf0e10cSrcweir			in case of io errors during moving
634cdf0e10cSrcweir
635cdf0e10cSrcweir		@throws ::com::sun::star::embed::StorageWrappedTargetException
636cdf0e10cSrcweir			wraps other exceptions
637cdf0e10cSrcweir
638cdf0e10cSrcweir	 */
639cdf0e10cSrcweir    void moveElementTo(
640cdf0e10cSrcweir			[in] string sElementName,
641cdf0e10cSrcweir			[in] XStorage xDest,
642cdf0e10cSrcweir			[in] string sNewName )
643cdf0e10cSrcweir		raises( ::com::sun::star::embed::InvalidStorageException,
644cdf0e10cSrcweir				::com::sun::star::lang::IllegalArgumentException,
645cdf0e10cSrcweir				::com::sun::star::container::NoSuchElementException,
646cdf0e10cSrcweir				::com::sun::star::container::ElementExistException,
647cdf0e10cSrcweir				::com::sun::star::io::IOException,
648cdf0e10cSrcweir				::com::sun::star::embed::StorageWrappedTargetException );
649cdf0e10cSrcweir
650cdf0e10cSrcweir};
651cdf0e10cSrcweir
652cdf0e10cSrcweir//============================================================================
653cdf0e10cSrcweir
654cdf0e10cSrcweir}; }; }; };
655cdf0e10cSrcweir
656cdf0e10cSrcweir#endif
657cdf0e10cSrcweir
658