1d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5d1766043SAndrew Rist * distributed with this work for additional information
6d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10d1766043SAndrew Rist *
11d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12d1766043SAndrew Rist *
13d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14d1766043SAndrew Rist * software distributed under the License is distributed on an
15d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17d1766043SAndrew Rist * specific language governing permissions and limitations
18d1766043SAndrew Rist * under the License.
19d1766043SAndrew Rist *
20d1766043SAndrew Rist *************************************************************/
21d1766043SAndrew Rist
22d1766043SAndrew Rist
23cdf0e10cSrcweir#ifndef __com_sun_star_configuration_backend_DataImporter_idl__
24cdf0e10cSrcweir#define __com_sun_star_configuration_backend_DataImporter_idl__
25cdf0e10cSrcweir
26cdf0e10cSrcweir#ifndef __com_sun_star_task_XJob_idl__
27cdf0e10cSrcweir#include <com/sun/star/task/XJob.idl>
28cdf0e10cSrcweir#endif
29cdf0e10cSrcweir
30cdf0e10cSrcweir//=============================================================================
31cdf0e10cSrcweir
32cdf0e10cSrcweirmodule com { module sun { module star { module configuration { module backend {
33cdf0e10cSrcweir
34cdf0e10cSrcweir//=============================================================================
35cdf0e10cSrcweir
36cdf0e10cSrcweir/**
37cdf0e10cSrcweir    allows importing data from one configuration repository into another. .
38cdf0e10cSrcweir
39*0d3a54ffSJürgen Schmidt    @since OpenOffice 1.1.2
40cdf0e10cSrcweir*/
41cdf0e10cSrcweirpublished service DataImporter
42cdf0e10cSrcweir{
43cdf0e10cSrcweir	//-------------------------------------------------------------------------
44cdf0e10cSrcweir
45cdf0e10cSrcweir    /** allows running an import job
46cdf0e10cSrcweir
47cdf0e10cSrcweir        <p> The source and destination repositories are selected by arguments
48cdf0e10cSrcweir            passed to
49cdf0e10cSrcweir            <member scope="com::sun::star::task">XJob::execute()</member>.
50cdf0e10cSrcweir            The names and meanings of such arguments depend on
51cdf0e10cSrcweir            the implementation. Each implementation must document such arguments.
52cdf0e10cSrcweir        </p>
53cdf0e10cSrcweir
54cdf0e10cSrcweir        <p> Implementations may return a value from
55cdf0e10cSrcweir            <member scope="com::sun::star::task">XJob::execute()</member>
56cdf0e10cSrcweir            that indicates the status of job execution. The type and meaning of
57cdf0e10cSrcweir            such status indicators depend on the implementation.
58cdf0e10cSrcweir        </p>
59cdf0e10cSrcweir         <p>If <void/> or <TRUE/> is returned, this indicates successful
60cdf0e10cSrcweir            execution. If an
61cdf0e10cSrcweir            <type scope="com::sun::star::uno">Exception</type> is returned,
62cdf0e10cSrcweir            it represents an error condition encountered during execution.
63cdf0e10cSrcweir        </p>
64cdf0e10cSrcweir
65cdf0e10cSrcweir        <p> The following arguments to
66cdf0e10cSrcweir            <member scope="com::sun::star::task">XJob::execute()</member>
67cdf0e10cSrcweir            should be supported by implementations. Implementations must document
68cdf0e10cSrcweir            a failure to support any of these arguments:
69cdf0e10cSrcweir        <dl>
70cdf0e10cSrcweir            <dt><code>ImporterService</code> : <atom >string</atom></dt>
71cdf0e10cSrcweir            <dd>A service or implementation name used to instantiate the
72cdf0e10cSrcweir                <type>Importer</type> to use for importing. If this parameter
73cdf0e10cSrcweir                is missing, the implementation selects an appropriate importer.
74cdf0e10cSrcweir                By default, a <type>MergeImporter</type> should be used.
75cdf0e10cSrcweir            </dd>
76cdf0e10cSrcweir            <dt><code>OverwriteExisting</code> : <atom >boolean</atom></dt>
77cdf0e10cSrcweir            <dd>If <TRUE/>, specifies that no existing data should be
78cdf0e10cSrcweir                overwritten by the import. If the <type>Importer</type> used
79cdf0e10cSrcweir                does not support such protection, an error may be raised.
80cdf0e10cSrcweir                If some data is not imported, because there is existing
81cdf0e10cSrcweir                data, this is indicated by returning an appropriate exception.
82cdf0e10cSrcweir            </dd>
83cdf0e10cSrcweir            <dt><code>TruncateExisting</code> : <atom >boolean</atom></dt>
84cdf0e10cSrcweir            <dd>If <TRUE/>, specifies that existing data should be
85cdf0e10cSrcweir                discarded and replaced by the imported data.
86cdf0e10cSrcweir                If the <type>Importer</type> used does not support this
87cdf0e10cSrcweir                operation, an error may be raised.
88cdf0e10cSrcweir                By default, a <type>CopyImporter</type> is used to perform
89cdf0e10cSrcweir                truncating import.
90cdf0e10cSrcweir            </dd>
91cdf0e10cSrcweir            <dt><code>Entity</code> : <atom >string</atom></dt>
92cdf0e10cSrcweir            <dd>An identifier for the entity in the destination backend for
93cdf0e10cSrcweir                which the imported data should apply. The value will be passed
94cdf0e10cSrcweir                to <member>XLayerImporter::importLayerForEntity()</member>.
95cdf0e10cSrcweir                If this parameter is missing, the implementation uses
96cdf0e10cSrcweir                <member>XLayerImporter::importLayer()</member> instead.
97cdf0e10cSrcweir            </dd>
98cdf0e10cSrcweir            <dt><code>Component</code> : <atom >string</atom></dt>
99cdf0e10cSrcweir            <dd>Names the component for which to import data. If this
100cdf0e10cSrcweir                parameter is missing, the selection of data to import depends
101cdf0e10cSrcweir                on implementation-specific parameters.
102cdf0e10cSrcweir            </dd>
103cdf0e10cSrcweir            <dt><code>LayerFilter</code> : <type >LayerFilter</type></dt>
104cdf0e10cSrcweir            <dd>A filter to transform data during import. This parameter is
105cdf0e10cSrcweir                optional. If this parameter is missing, data will be imported
106cdf0e10cSrcweir                unaltered. <em>Support for this parameter is optional.</em>
107cdf0e10cSrcweir                If the implementation does not support a filter it will raise an
108cdf0e10cSrcweir                <type scope="com::sun::star::lang">IllegalArgumentException</type>.
109cdf0e10cSrcweir            </dd>
110cdf0e10cSrcweir        </dl>
111cdf0e10cSrcweir        </p>
112cdf0e10cSrcweir
113cdf0e10cSrcweir      */
114cdf0e10cSrcweir    interface com::sun::star::task::XJob ;
115cdf0e10cSrcweir
116cdf0e10cSrcweir	//-------------------------------------------------------------------------
117cdf0e10cSrcweir} ;
118cdf0e10cSrcweir
119cdf0e10cSrcweir//=============================================================================
120cdf0e10cSrcweir
121cdf0e10cSrcweir} ; } ; } ; } ; } ;
122cdf0e10cSrcweir
123cdf0e10cSrcweir#endif
124