xref: /AOO41X/main/offapi/com/sun/star/resource/XStringResourceWithStorage.idl (revision d1766043198e81d0bcfc626e12893e7b4d7e31ca)
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
23#ifndef __com_sun_star_resource_XStringResourceWithStorage_idl__
24#define __com_sun_star_resource_XStringResourceWithStorage_idl__
25
26#ifndef __com_sun_star_resource_XStringResourcePersistence_idl__
27#include <com/sun/star/resource/XStringResourcePersistence.idl>
28#endif
29
30
31//=============================================================================
32
33module com { module sun { module star { module resource {
34
35//=============================================================================
36/**
37    Extends <type>XStringResourcePersistence</type> by methods to handle an
38    associated <type scope="com::sun::star::embed">XStorage</type> instance.
39
40    @see <type>XStringResourcePersistence</type>.
41*/
42interface XStringResourceWithStorage: com::sun::star::resource::XStringResourcePersistence
43{
44    /**
45        Stores all string table data to a storage and associates this storage
46        to this instance as if <member>setStorage</member> was called with
47        this storage. The modified state will be unmodified after the call.
48
49        This method can throw all exceptions thrown by the methods of
50        <type scope="com::sun::star::embed">XStorage</type>
51    */
52    void storeAsStorage( [in] ::com::sun::star::embed::XStorage Storage )
53        raises( com::sun::star::uno::Exception );
54
55
56    /**
57        Associates a storage to the StringResourceWithStorage instance
58        which is used on subsequent calls of <member>store</member>.
59
60        @param Storage
61            the storage to be associated to the StringResourceManager
62
63        <p>
64        This call has to be used carefully as it removes the storage
65        previously connected to the StringResourceWithStorage. It may
66        force the implementation to reload data from the previous storage
67        before releasing it. The StringResourceManager will be modified
68        after calling this method as the data isn't stored to the new
69        storage yet. <member>storeAsStorage</member> should be prefered
70        as it directly stores the data to the new storage and afterwards
71        this storage is in sync with the resource data.
72        </p>
73
74        @throws <type scope="com::sun::star::lang">IllegalArgumentException</type>
75            if a null interface is passed as Storage
76    */
77    void setStorage( [in] ::com::sun::star::embed::XStorage Storage )
78        raises( ::com::sun::star::lang::IllegalArgumentException );
79};
80
81//=============================================================================
82
83}; }; }; };
84
85#endif
86