xref: /AOO41X/main/offapi/com/sun/star/sdb/ErrorMessageDialog.idl (revision d1766043198e81d0bcfc626e12893e7b4d7e31ca)
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
24#ifndef __com_sun_star_sdb_ErrorMessageDialog_idl__
25#define __com_sun_star_sdb_ErrorMessageDialog_idl__
26
27#ifndef __com_sun_star_ui_dialogs_XExecutableDialog_idl__
28#include <com/sun/star/ui/dialogs/XExecutableDialog.idl>
29#endif
30
31#ifndef __com_sun_star_awt_XWindow_idl__
32#include <com/sun/star/awt/XWindow.idl>
33#endif
34
35#ifndef __com_sun_star_lang_XInitialization_idl__
36#include <com/sun/star/lang/XInitialization.idl>
37#endif
38
39#ifndef __com_sun_star_beans_XPropertySet_idl__
40#include <com/sun/star/beans/XPropertySet.idl>
41#endif
42
43//=============================================================================
44
45module com {  module sun {  module star {  module sdb {
46
47
48/** provides a dialog for displaying database related exceptions.
49    <p>
50    If applications use any of the functionality provided in the modules
51    <module scope="com.sun.star">
52    sdbc
53    </module>
54    ,
55    <module scope="com.sun.star">
56    sdbcx
57    </module>
58     and
59     <module scope="com.sun.star">
60     sdb
61     </module>
62     ,
63    they will - sooner or later - encounter
64    <type scope="com::sun::star::sdbc">SQLException</type>
65    's.
66    <br/>
67    These exceptions can be chained, so the information wrapped in one single
68    <type scope="com::sun::star::sdbc">SQLException</type>
69    can be rather complex (e.g., every instance where such an exception is passing before it is finally caught, could
70    append a
71    <type scope="com::sun::star::sdb">SQLContext</type>
72    to explain what it was doing), and they should be
73    presented to the user in a consistent way.
74    <br/>
75    This can be reached by using this service.
76    @see com.sun.star.sdb.InteractionHandler
77    </p>
78*/
79published service ErrorMessageDialog
80{
81    /** the title of the (dialog) window
82    */
83    [property] string Title;
84
85    /** parent window to use for the dialog
86        <p>
87        This property can't be set while the dialog is being displayed.
88        </p>
89    */
90    [property] com::sun::star::awt::XWindow ParentWindow;
91
92    /** is the exception displayed by the dialog
93        <p>
94        This should contain a
95        <type scope="com::sun::star::sdbc">SQLException</type>
96        instance, or an instance
97        of any class derived from this exception.
98        </p>
99        <p>
100        This property can't be set while the dialog is being displayed.
101        </p>
102    */
103    [property] any SQLException;
104
105    /** specifies the URL to the help topic to associate with the dialog.
106
107        <p>If This URL is not empty, then the dialog will get a "Help" button, which
108        directs the user to the given help topic.</p>
109    */
110    [optional, property] string HelpURL;
111
112    /** allows access to the properties of the object
113    */
114    interface com::sun::star::beans::XPropertySet;
115
116    /** allows starting execution of the dialog
117    */
118    interface com::sun::star::ui::dialogs::XExecutableDialog;
119
120    /** allows initializing the dialog
121        <p>
122        You do not need to call the initialize method directly, instead you may use the createInstanceWithArguments
123        method of your
124        <type scope="com::sun::star::lang">XMultiServiceFactory</type>
125        .
126        </p>
127        <p>
128        You specify a parameter by passing one (or more)
129        <type scope="com::sun::star::beans">PropertyValue</type>
130        object(s) to the initialize method, where the <em>Name</em> field contains a string describing which aspect
131        you want to affect, and the <em>Value</em> field containing a value.
132        <br/>
133        Imagine the initialization values, as if you use
134        <method scope="com::sun::star::beans">XPropertySet::setPropertyValue()
135        </method>
136         of the
137        <type scope="com::sun::star::beans">XPropertySet</type>
138        interface ...
139        <br/>
140        allowed parameters are
141        <ul>
142            <li><b>Title</b><br/>
143                String describing the initial title of the dialog. If not specified, a default title is used.
144            </li>
145            <li><b>ParentWindow</b><br/>
146                <type scope="com::sun::star::awt">XWindow</type>
147                describing the parent window to use for the dialog.
148            </li>
149            <li><b>SQLException</b><br/>
150                <type scope="com::sun::star::sdbc">SQLException</type>
151                describing the error which is beeing displayed.<br/>
152                When initializing this value, you may use any derivative of
153                <type scope="com::sun::star::sdbc">SQLException</type>
154                .
155            </li>
156        </ul>
157        </p>
158    */
159    interface com::sun::star::lang::XInitialization;
160};
161
162//=============================================================================
163
164}; }; }; };
165
166#endif
167
168