1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_configuration_backend_XLayerImporter_idl__
28#define __com_sun_star_configuration_backend_XLayerImporter_idl__
29
30#ifndef __com_sun_star_uno_XInterface_idl__
31#include <com/sun/star/uno/XInterface.idl>
32#endif
33
34#ifndef __com_sun_star_configuration_backend_XLayer_idl__
35#include <com/sun/star/configuration/backend/XLayer.idl>
36#endif
37
38#ifndef __com_sun_star_configuration_backend_XBackend_idl__
39#include <com/sun/star/configuration/backend/XBackend.idl>
40#endif
41
42#ifndef __com_sun_star_configuration_backend_MalformedDataException_idl__
43#include <com/sun/star/configuration/backend/MalformedDataException.idl>
44#endif
45#ifndef __com_sun_star_lang_NullPointerException_idl__
46#include <com/sun/star/lang/NullPointerException.idl>
47#endif
48#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
49#include <com/sun/star/lang/IllegalArgumentException.idl>
50#endif
51#ifndef __com_sun_star_lang_WrappedTargetException_idl__
52#include <com/sun/star/lang/WrappedTargetException.idl>
53#endif
54
55//=============================================================================
56
57module com { module sun { module star { module configuration { module backend {
58
59//=============================================================================
60
61/** allows importing a layer into a <type>Backend</type>
62
63  @since OOo 1.1.2
64*/
65published interface XLayerImporter : ::com::sun::star::uno::XInterface
66{
67	//-------------------------------------------------------------------------
68
69    /** gets the target backend for importing.
70
71        @returns
72            the <type>Backend</type> into which layers are
73            imported by <member>XLayerImporter::importLayer()<member/>.
74
75	*/
76    XBackend getTargetBackend();
77
78	//-------------------------------------------------------------------------
79
80    /** sets the target backend for importing.
81
82        @param aBackend
83            a <type>Backend</type> into which layers should be
84            imported by <method>XLayerImporter::importLayer()<method/>.
85
86        @throws com::sun::star::lang::NullPointerException
87            if the backend passed is <NULL/>.
88	*/
89    void setTargetBackend([in] XBackend aBackend)
90        raises (com::sun::star::lang::NullPointerException) ;
91
92	//-------------------------------------------------------------------------
93
94    /** Imports the layer given into the backend.
95
96        <p>This method imports data for the current entity of the backend.</p>
97
98        @param aLayer
99            a layer whose data will be imported into the backend
100
101        @throws com::sun::star::lang::NullPointerException
102            if the layer passed is <NULL/> or no backend is available.
103
104        @throws com::sun::star::configuration::backend::MalformedDataException
105            if the layer passed is invalid
106
107        @throws com::sun::star::lang::IllegalArgumentException
108            if the layer passed is for a component
109            that doesn't exist in the backend
110
111        @throws com::sun::star::lang::WrappedTargetException
112            if an error occurs in the backend or source layer.
113
114        @see com::sun::star::configuration::backend::XBackend::getOwnUpdateHandler()
115	*/
116    void importLayer([in] XLayer aLayer)
117        raises (MalformedDataException,
118                com::sun::star::lang::IllegalArgumentException,
119                com::sun::star::lang::NullPointerException,
120                com::sun::star::lang::WrappedTargetException) ;
121
122	//-------------------------------------------------------------------------
123
124    /** Imports the layer given into the backend for a given entity.
125
126        <p>This method imports data for the current entity of the backend.</p>
127
128        @param aLayer
129            a layer whose data will be imported into the backend
130
131        @param aEntity
132            a entity into whose data the layer will be imported
133
134        @throws com::sun::star::lang::NullPointerException
135            if the layer passed is <NULL/> or no backend is available.
136
137        @throws com::sun::star::configuration::backend::MalformedDataException
138            if the layer passed is invalid
139
140        @throws com::sun::star::lang::IllegalArgumentException
141            if the layer passed is for a component
142            that doesn't exist in the backend
143            or if the entity doesn't exist in the backend.
144
145        @throws com::sun::star::lang::WrappedTargetException
146            if an error occurs in the backend or source layer.
147
148        @see com::sun::star::configuration::backend::XBackend::getUpdateHandler()
149	*/
150    void importLayerForEntity([in] XLayer aLayer, [in] string aEntity)
151        raises (MalformedDataException,
152                com::sun::star::lang::IllegalArgumentException,
153                com::sun::star::lang::NullPointerException,
154                com::sun::star::lang::WrappedTargetException) ;
155
156	//-------------------------------------------------------------------------
157} ;
158
159//=============================================================================
160
161} ; } ; } ; } ; } ;
162
163#endif
164