xref: /trunk/main/offapi/com/sun/star/script/XStorageBasedLibraryContainer.idl (revision 66b843ff8f1eedd2e69941f1ea52fa080f01ec28)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22#ifndef __com_sun_star_script_XStorageBasedLibraryContainer_idl__
23#define __com_sun_star_script_XStorageBasedLibraryContainer_idl__
24
25#ifndef __com_sun_star_embed_XStorage_idl__
26#include <com/sun/star/embed/XStorage.idl>
27#endif
28#ifndef __com_sun_star_script_XPersistentLibraryContainer_idl__
29#include <com/sun/star/script/XPersistentLibraryContainer.idl>
30#endif
31
32//=============================================================================
33
34module com { module sun { module star { module script {
35
36//=============================================================================
37
38/** is the interface for an <type>XLibraryContainer</type> which can be made
39    persistent in an <type scope="com::sun::star::embed">XStorage</type>.
40
41    <p>A persistent library container is associated with a root storage. The
42    container is responsible for a particular sub storage of the root storage,
43    the container storage.</p>
44
45    @since OpenOffice 2.3
46 */
47interface XStorageBasedLibraryContainer
48{
49    interface XPersistentLibraryContainer;
50
51    /** denotes the root storage associated with the container.
52
53        <p>Effectively, this attribute is a typed version of
54        <member>XPersistentLibraryContainer::RootLocation</member>, it's guaranteed
55        that at every time, <code>XPersistentLibraryContainer::RootLocation</code> and
56        <code>RootStorage</code> have the same value.</p>
57
58        <p>You should only <em>set</em> this attribute to a new value if you previously
59        called storeLibrariesToStorage with the same storage. Setting this attribute
60        to a storage into which the container has not been stored previously might
61        result in unexpected behavior.</p>
62    */
63    [attribute] ::com::sun::star::embed::XStorage RootStorage
64    {
65        set raises ( ::com::sun::star::lang::IllegalArgumentException );
66    };
67
68    /** stores the libraries to a storage other than the current container storage
69
70        <p>Note that the library container is not automatically associated with the
71        new root storage. Instead, you need to manually set the <type>RootStroage</type>
72        attribute afterwards. This separation allows for Save-To as well Save-As
73        operations.</p>
74
75        @param RootStorage
76            denotes the root storage into which the libraries should be written, which
77            must not be <NULL/>.<br/>
78            Note that the actual libraries are written into a sub storage of this
79            root storage, as usual.
80
81        @throws ::com::sun::star::lang::IllegalArgumentException
82            if the <code>RootStorage</code> parameter is <NULL/>, or equals
83            <member>RootStorage</member>.
84
85        @throws ::com::sun::star::lang::WrappedTargetException
86            if an error occurs during storing.
87    */
88    void    storeLibrariesToStorage( [in] ::com::sun::star::embed::XStorage RootStorage )
89        raises ( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
90};
91
92//=============================================================================
93
94}; }; }; };
95
96//=============================================================================
97
98#endif
99