1*ebfcd9afSAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3*ebfcd9afSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*ebfcd9afSAndrew Rist * or more contributor license agreements.  See the NOTICE file
5*ebfcd9afSAndrew Rist * distributed with this work for additional information
6*ebfcd9afSAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7*ebfcd9afSAndrew Rist * to you under the Apache License, Version 2.0 (the
8*ebfcd9afSAndrew Rist * "License"); you may not use this file except in compliance
9*ebfcd9afSAndrew Rist * with the License.  You may obtain a copy of the License at
10*ebfcd9afSAndrew Rist *
11*ebfcd9afSAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12*ebfcd9afSAndrew Rist *
13*ebfcd9afSAndrew Rist * Unless required by applicable law or agreed to in writing,
14*ebfcd9afSAndrew Rist * software distributed under the License is distributed on an
15*ebfcd9afSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*ebfcd9afSAndrew Rist * KIND, either express or implied.  See the License for the
17*ebfcd9afSAndrew Rist * specific language governing permissions and limitations
18*ebfcd9afSAndrew Rist * under the License.
19*ebfcd9afSAndrew Rist *
20*ebfcd9afSAndrew Rist *************************************************************/
21*ebfcd9afSAndrew Rist
22*ebfcd9afSAndrew Rist
23cdf0e10cSrcweir#ifndef __com_sun_star_sdb_InteractionHandler_idl__
24cdf0e10cSrcweir#define __com_sun_star_sdb_InteractionHandler_idl__
25cdf0e10cSrcweir
26cdf0e10cSrcweirmodule com { module sun { module star { module task {
27cdf0e10cSrcweir    interface XInteractionHandler2;
28cdf0e10cSrcweir}; }; }; };
29cdf0e10cSrcweir
30cdf0e10cSrcweirmodule com {  module sun {  module star {  module sdb {
31cdf0e10cSrcweir
32cdf0e10cSrcweir/**	describes a service which is able to handle database-related interactions.
33cdf0e10cSrcweir
34cdf0e10cSrcweir    <p>Usually, you will not instantiate this service directly. Instead, you'll instantiate a generic
35cdf0e10cSrcweir    <type scope="com::sun::star::task">InteractionHandler</type> service, and pass it your request. Based on
36cdf0e10cSrcweir    configuration data, this implementation will decide where to forward the request to.</p>
37cdf0e10cSrcweir
38cdf0e10cSrcweir    <p>By default, the <code>DatabaseInteractionHandler</code> feels responsible (as per configuration) for the
39cdf0e10cSrcweir    following interaction types:
40cdf0e10cSrcweir	<ul>
41cdf0e10cSrcweir		<li><b>database related errors</b><br/>
42cdf0e10cSrcweir			The general structure to transport such errors is the <type scope="com::sun::star::sdbc">SQLException</type>,
43cdf0e10cSrcweir            and if your interaction request supplies such a <code>SQLException</code> (or an instance of any derived class),
44cdf0e10cSrcweir			the handler will display a generic error dialog, which is able to travel the object chain which may be contained
45cdf0e10cSrcweir            in the exception.
46cdf0e10cSrcweir		</li>
47cdf0e10cSrcweir		<li><b>parameter requests</b><br/>
48cdf0e10cSrcweir			If your interaction request supplies an <type scope="com::sun::star::sdb">ParametersRequest</type>,
49cdf0e10cSrcweir            the handler will open a standard dialog asking the user to fill in parameter values.
50cdf0e10cSrcweir			<br/>
51cdf0e10cSrcweir			In the case you want to use this feature of the handler, you should supply a special continuation
52cdf0e10cSrcweir			(<type scope="com::sun::star::sdb">XInteractionSupplyParameters</type>) as well, so the
53cdf0e10cSrcweir			handler can return the entered information.
54cdf0e10cSrcweir		</li>
55cdf0e10cSrcweir	</ul>
56cdf0e10cSrcweir	</p>
57cdf0e10cSrcweir*/
58cdf0e10cSrcweirservice DatabaseInteractionHandler: com::sun::star::task::XInteractionHandler2;
59cdf0e10cSrcweir
60cdf0e10cSrcweir//=============================================================================
61cdf0e10cSrcweir
62cdf0e10cSrcweir}; }; }; };
63cdf0e10cSrcweir
64cdf0e10cSrcweir#endif
65