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_embed_XCommonEmbedPersist_idl__
24#define __com_sun_star_embed_XCommonEmbedPersist_idl__
25
26#ifndef __com_sun_star_uno_XInterface_idl__
27#include <com/sun/star/uno/XInterface.idl>
28#endif
29
30#ifndef __com_sun_star_embed_XStorage_idl__
31#include <com/sun/star/embed/XStorage.idl>
32#endif
33
34#ifndef __com_sun_star_io_IOException_idl__
35#include <com/sun/star/io/IOException.idl>
36#endif
37
38#ifndef __com_sun_star_embed_WrongStateException_idl__
39#include <com/sun/star/embed/WrongStateException.idl>
40#endif
41
42#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
43#include <com/sun/star/lang/IllegalArgumentException.idl>
44#endif
45
46#ifndef __com_sun_star_beans_PropertyValue_idl__
47#include <com/sun/star/beans/PropertyValue.idl>
48#endif
49
50//============================================================================
51
52 module com {  module sun {  module star {  module embed {
53
54//============================================================================
55/** specifies common implementation for embedded objects and links
56	persistence.
57 */
58published interface XCommonEmbedPersist: com::sun::star::uno::XInterface
59{
60 	//------------------------------------------------------------------------
61    /** lets the object or the link store itself.
62
63        @throws com::sun::star::embed::WrongStateException
64			the object is in wrong state
65
66        @throws com::sun::star::io::IOException
67			in case of io problems during saving
68
69        @throws com::sun::star::uno::Exception
70			in case of other problems
71	 */
72	void storeOwn()
73		raises( ::com::sun::star::embed::WrongStateException,
74				::com::sun::star::io::IOException,
75				::com::sun::star::uno::Exception );
76
77	//------------------------------------------------------------------------
78    /** allows to detect if the data store is read-only.
79
80        @returns
81            <TRUE/> if the data store is readonly or opened readonly
82            <FALSE/> otherwise
83
84        @throws com::sun::star::embed::WrongStateException
85			the object is in wrong state ( has no entry )
86	 */
87	boolean isReadonly()
88		raises( ::com::sun::star::embed::WrongStateException );
89
90	//------------------------------------------------------------------------
91    /** lets the object or the link reload itself.
92
93		<p>
94		If the object has persistence it will be reloaded from it's persistant
95		entry.
96		</p>
97
98        @param aMediaArgs
99            optional parameters for document reloading, see also
100			<type scope="com::sun::star::document">MediaDescriptor</type>
101
102        @param aObjectArgs
103            optional parameters for object reloading, see also
104			<type scope="com::sun::star::embed">EmbeddedObjectDescriptor</type>
105
106		@throws ::com::sun::star::lang::IllegalArgumentException
107			one of arguments is illegal
108
109        @throws com::sun::star::embed::WrongStateException
110			the object is in wrong state
111
112        @throws com::sun::star::io::IOException
113			in case of io problems during opening\creation
114
115        @throws com::sun::star::uno::Exception
116			in case of other problems
117	 */
118	void reload(
119			[in] sequence< ::com::sun::star::beans::PropertyValue > aMediaArgs,
120			[in] sequence< ::com::sun::star::beans::PropertyValue > aObjectArgs )
121		raises( ::com::sun::star::lang::IllegalArgumentException,
122				::com::sun::star::embed::WrongStateException,
123				::com::sun::star::io::IOException,
124				::com::sun::star::uno::Exception );
125};
126
127//============================================================================
128
129}; }; }; };
130
131#endif
132
133