1*d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3*d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5*d1766043SAndrew Rist * distributed with this work for additional information
6*d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7*d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9*d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10*d1766043SAndrew Rist *
11*d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12*d1766043SAndrew Rist *
13*d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*d1766043SAndrew Rist * software distributed under the License is distributed on an
15*d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17*d1766043SAndrew Rist * specific language governing permissions and limitations
18*d1766043SAndrew Rist * under the License.
19*d1766043SAndrew Rist *
20*d1766043SAndrew Rist *************************************************************/
21*d1766043SAndrew Rist
22*d1766043SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir#ifndef __com_sun_star_sdb_ErrorMessageDialog_idl__
25cdf0e10cSrcweir#define __com_sun_star_sdb_ErrorMessageDialog_idl__
26cdf0e10cSrcweir
27cdf0e10cSrcweir#ifndef __com_sun_star_ui_dialogs_XExecutableDialog_idl__
28cdf0e10cSrcweir#include <com/sun/star/ui/dialogs/XExecutableDialog.idl>
29cdf0e10cSrcweir#endif
30cdf0e10cSrcweir
31cdf0e10cSrcweir#ifndef __com_sun_star_awt_XWindow_idl__
32cdf0e10cSrcweir#include <com/sun/star/awt/XWindow.idl>
33cdf0e10cSrcweir#endif
34cdf0e10cSrcweir
35cdf0e10cSrcweir#ifndef __com_sun_star_lang_XInitialization_idl__
36cdf0e10cSrcweir#include <com/sun/star/lang/XInitialization.idl>
37cdf0e10cSrcweir#endif
38cdf0e10cSrcweir
39cdf0e10cSrcweir#ifndef __com_sun_star_beans_XPropertySet_idl__
40cdf0e10cSrcweir#include <com/sun/star/beans/XPropertySet.idl>
41cdf0e10cSrcweir#endif
42cdf0e10cSrcweir
43cdf0e10cSrcweir//=============================================================================
44cdf0e10cSrcweir
45cdf0e10cSrcweirmodule com {  module sun {  module star {  module sdb {
46cdf0e10cSrcweir
47cdf0e10cSrcweir
48cdf0e10cSrcweir/** provides a dialog for displaying database related exceptions.
49cdf0e10cSrcweir	<p>
50cdf0e10cSrcweir	If applications use any of the functionality provided in the modules
51cdf0e10cSrcweir	<module scope="com.sun.star">
52cdf0e10cSrcweir	sdbc
53cdf0e10cSrcweir	</module>
54cdf0e10cSrcweir	,
55cdf0e10cSrcweir	<module scope="com.sun.star">
56cdf0e10cSrcweir	sdbcx
57cdf0e10cSrcweir	</module>
58cdf0e10cSrcweir	 and
59cdf0e10cSrcweir	 <module scope="com.sun.star">
60cdf0e10cSrcweir	 sdb
61cdf0e10cSrcweir	 </module>
62cdf0e10cSrcweir	 ,
63cdf0e10cSrcweir	they will - sooner or later - encounter
64cdf0e10cSrcweir	<type scope="com::sun::star::sdbc">SQLException</type>
65cdf0e10cSrcweir	's.
66cdf0e10cSrcweir	<br/>
67cdf0e10cSrcweir	These exceptions can be chained, so the information wrapped in one single
68cdf0e10cSrcweir	<type scope="com::sun::star::sdbc">SQLException</type>
69cdf0e10cSrcweir	can be rather complex (e.g., every instance where such an exception is passing before it is finally caught, could
70cdf0e10cSrcweir	append a
71cdf0e10cSrcweir	<type scope="com::sun::star::sdb">SQLContext</type>
72cdf0e10cSrcweir	to explain what it was doing), and they should be
73cdf0e10cSrcweir	presented to the user in a consistent way.
74cdf0e10cSrcweir	<br/>
75cdf0e10cSrcweir	This can be reached by using this service.
76cdf0e10cSrcweir	@see com.sun.star.sdb.InteractionHandler
77cdf0e10cSrcweir	</p>
78cdf0e10cSrcweir*/
79cdf0e10cSrcweirpublished service ErrorMessageDialog
80cdf0e10cSrcweir{
81cdf0e10cSrcweir	/** the title of the (dialog) window
82cdf0e10cSrcweir	*/
83cdf0e10cSrcweir	[property] string Title;
84cdf0e10cSrcweir
85cdf0e10cSrcweir	/** parent window to use for the dialog
86cdf0e10cSrcweir		<p>
87cdf0e10cSrcweir		This property can't be set while the dialog is being displayed.
88cdf0e10cSrcweir		</p>
89cdf0e10cSrcweir	*/
90cdf0e10cSrcweir	[property] com::sun::star::awt::XWindow ParentWindow;
91cdf0e10cSrcweir
92cdf0e10cSrcweir	/** is the exception displayed by the dialog
93cdf0e10cSrcweir		<p>
94cdf0e10cSrcweir		This should contain a
95cdf0e10cSrcweir		<type scope="com::sun::star::sdbc">SQLException</type>
96cdf0e10cSrcweir		instance, or an instance
97cdf0e10cSrcweir		of any class derived from this exception.
98cdf0e10cSrcweir		</p>
99cdf0e10cSrcweir		<p>
100cdf0e10cSrcweir		This property can't be set while the dialog is being displayed.
101cdf0e10cSrcweir		</p>
102cdf0e10cSrcweir	*/
103cdf0e10cSrcweir	[property] any SQLException;
104cdf0e10cSrcweir
105cdf0e10cSrcweir    /** specifies the URL to the help topic to associate with the dialog.
106cdf0e10cSrcweir
107cdf0e10cSrcweir        <p>If This URL is not empty, then the dialog will get a "Help" button, which
108cdf0e10cSrcweir        directs the user to the given help topic.</p>
109cdf0e10cSrcweir    */
110cdf0e10cSrcweir    [optional, property] string HelpURL;
111cdf0e10cSrcweir
112cdf0e10cSrcweir	/** allows access to the properties of the object
113cdf0e10cSrcweir	*/
114cdf0e10cSrcweir	interface com::sun::star::beans::XPropertySet;
115cdf0e10cSrcweir
116cdf0e10cSrcweir	/** allows starting execution of the dialog
117cdf0e10cSrcweir	*/
118cdf0e10cSrcweir	interface com::sun::star::ui::dialogs::XExecutableDialog;
119cdf0e10cSrcweir
120cdf0e10cSrcweir	/** allows initializing the dialog
121cdf0e10cSrcweir		<p>
122cdf0e10cSrcweir		You do not need to call the initialize method directly, instead you may use the createInstanceWithArguments
123cdf0e10cSrcweir		method of your
124cdf0e10cSrcweir		<type scope="com::sun::star::lang">XMultiServiceFactory</type>
125cdf0e10cSrcweir		.
126cdf0e10cSrcweir		</p>
127cdf0e10cSrcweir		<p>
128cdf0e10cSrcweir		You specify a parameter by passing one (or more)
129cdf0e10cSrcweir		<type scope="com::sun::star::beans">PropertyValue</type>
130cdf0e10cSrcweir		object(s) to the initialize method, where the <em>Name</em> field contains a string describing which aspect
131cdf0e10cSrcweir		you want to affect, and the <em>Value</em> field containing a value.
132cdf0e10cSrcweir		<br/>
133cdf0e10cSrcweir		Imagine the initialization values, as if you use
134cdf0e10cSrcweir		<method scope="com::sun::star::beans">XPropertySet::setPropertyValue()
135cdf0e10cSrcweir		</method>
136cdf0e10cSrcweir		 of the
137cdf0e10cSrcweir		<type scope="com::sun::star::beans">XPropertySet</type>
138cdf0e10cSrcweir		interface ...
139cdf0e10cSrcweir		<br/>
140cdf0e10cSrcweir		allowed parameters are
141cdf0e10cSrcweir		<ul>
142cdf0e10cSrcweir			<li><b>Title</b><br/>
143cdf0e10cSrcweir				String describing the initial title of the dialog. If not specified, a default title is used.
144cdf0e10cSrcweir			</li>
145cdf0e10cSrcweir			<li><b>ParentWindow</b><br/>
146cdf0e10cSrcweir				<type scope="com::sun::star::awt">XWindow</type>
147cdf0e10cSrcweir				describing the parent window to use for the dialog.
148cdf0e10cSrcweir			</li>
149cdf0e10cSrcweir			<li><b>SQLException</b><br/>
150cdf0e10cSrcweir				<type scope="com::sun::star::sdbc">SQLException</type>
151cdf0e10cSrcweir				describing the error which is beeing displayed.<br/>
152cdf0e10cSrcweir				When initializing this value, you may use any derivative of
153cdf0e10cSrcweir				<type scope="com::sun::star::sdbc">SQLException</type>
154cdf0e10cSrcweir				.
155cdf0e10cSrcweir			</li>
156cdf0e10cSrcweir		</ul>
157cdf0e10cSrcweir		</p>
158cdf0e10cSrcweir	*/
159cdf0e10cSrcweir	interface com::sun::star::lang::XInitialization;
160cdf0e10cSrcweir};
161cdf0e10cSrcweir
162cdf0e10cSrcweir//=============================================================================
163cdf0e10cSrcweir
164cdf0e10cSrcweir}; }; }; };
165cdf0e10cSrcweir
166cdf0e10cSrcweir#endif
167cdf0e10cSrcweir
168