1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XStorageBasedLibraryContainer.idl,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
32 #ifndef __com_sun_star_script_XStorageBasedLibraryContainer_idl__
33 #define __com_sun_star_script_XStorageBasedLibraryContainer_idl__
35 #ifndef __com_sun_star_embed_XStorage_idl__
36 #include
<com
/sun
/star
/embed
/XStorage.idl
>
38 #ifndef __com_sun_star_script_XPersistentLibraryContainer_idl__
39 #include
<com
/sun
/star
/script
/XPersistentLibraryContainer.idl
>
42 //=============================================================================
44 module com
{ module sun
{ module star
{ module script
{
46 //=============================================================================
48 /** is the interface for an <type>XLibraryContainer</type> which can be made
49 persistent in an <type scope="com::sun::star::embed">XStorage</type>.
51 <p>A persistent library container is associated with a root storage. The
52 container is responsible for a particular sub storage of the root storage,
53 the container storage.</p>
57 interface XStorageBasedLibraryContainer
59 interface XPersistentLibraryContainer
;
61 /** denotes the root storage associated with the container.
63 <p>Effectively, this attribute is a typed version of
64 <member>XPersistentLibraryContainer::RootLocation</member>, it's guaranteed
65 that at every time, <code>XPersistentLibraryContainer::RootLocation</code> and
66 <code>RootStorage</code> have the same value.</p>
68 <p>You should only <em>set</em> this attribute to a new value if you previously
69 called storeLibrariesToStorage with the same storage. Setting this attribute
70 to a storage into which the container has not been stored previously might
71 result in unexpected behaviour.</p>
73 [attribute
] ::com
::sun
::star
::embed
::XStorage RootStorage
75 set raises
( ::com
::sun
::star
::lang
::IllegalArgumentException
);
78 /** stores the libraries to a storage other than the current container storage
80 <p>Note that the library continer is not automatically associated with the
81 new root storage. Instead, you need to manually set the <type>RootStroage</type>
82 attribute afterwards. This separation allows for Save-To as well Save-As
86 denotes the root storage into which the libraries should be written, which
87 must not be <NULL/>.<br/>
88 Note that the actual libraries are written into a sub storage of this
89 root storage, as usual.
91 @throws ::com::sun::star::lang::IllegalArgumentException
92 if the <code>RootStorage</code> parameter is <NULL/>, or equals
93 <member>RootStorage</member>.
95 @throws ::com::sun::star::lang::WrappedTargetException
96 if an error occurs during storing.
98 void storeLibrariesToStorage
( [in] ::com
::sun
::star
::embed
::XStorage RootStorage
)
99 raises
( ::com
::sun
::star
::lang
::IllegalArgumentException
, ::com
::sun
::star
::lang
::WrappedTargetException
);
102 //=============================================================================
106 //=============================================================================