1*cdf0e10cSrcweir/************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir#ifndef __com_sun_star_sdb_ErrorMessageDialog_idl__ 29*cdf0e10cSrcweir#define __com_sun_star_sdb_ErrorMessageDialog_idl__ 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir#ifndef __com_sun_star_ui_dialogs_XExecutableDialog_idl__ 32*cdf0e10cSrcweir#include <com/sun/star/ui/dialogs/XExecutableDialog.idl> 33*cdf0e10cSrcweir#endif 34*cdf0e10cSrcweir 35*cdf0e10cSrcweir#ifndef __com_sun_star_awt_XWindow_idl__ 36*cdf0e10cSrcweir#include <com/sun/star/awt/XWindow.idl> 37*cdf0e10cSrcweir#endif 38*cdf0e10cSrcweir 39*cdf0e10cSrcweir#ifndef __com_sun_star_lang_XInitialization_idl__ 40*cdf0e10cSrcweir#include <com/sun/star/lang/XInitialization.idl> 41*cdf0e10cSrcweir#endif 42*cdf0e10cSrcweir 43*cdf0e10cSrcweir#ifndef __com_sun_star_beans_XPropertySet_idl__ 44*cdf0e10cSrcweir#include <com/sun/star/beans/XPropertySet.idl> 45*cdf0e10cSrcweir#endif 46*cdf0e10cSrcweir 47*cdf0e10cSrcweir//============================================================================= 48*cdf0e10cSrcweir 49*cdf0e10cSrcweirmodule com { module sun { module star { module sdb { 50*cdf0e10cSrcweir 51*cdf0e10cSrcweir 52*cdf0e10cSrcweir/** provides a dialog for displaying database related exceptions. 53*cdf0e10cSrcweir <p> 54*cdf0e10cSrcweir If applications use any of the functionality provided in the modules 55*cdf0e10cSrcweir <module scope="com.sun.star"> 56*cdf0e10cSrcweir sdbc 57*cdf0e10cSrcweir </module> 58*cdf0e10cSrcweir , 59*cdf0e10cSrcweir <module scope="com.sun.star"> 60*cdf0e10cSrcweir sdbcx 61*cdf0e10cSrcweir </module> 62*cdf0e10cSrcweir and 63*cdf0e10cSrcweir <module scope="com.sun.star"> 64*cdf0e10cSrcweir sdb 65*cdf0e10cSrcweir </module> 66*cdf0e10cSrcweir , 67*cdf0e10cSrcweir they will - sooner or later - encounter 68*cdf0e10cSrcweir <type scope="com::sun::star::sdbc">SQLException</type> 69*cdf0e10cSrcweir 's. 70*cdf0e10cSrcweir <br/> 71*cdf0e10cSrcweir These exceptions can be chained, so the information wrapped in one single 72*cdf0e10cSrcweir <type scope="com::sun::star::sdbc">SQLException</type> 73*cdf0e10cSrcweir can be rather complex (e.g., every instance where such an exception is passing before it is finally caught, could 74*cdf0e10cSrcweir append a 75*cdf0e10cSrcweir <type scope="com::sun::star::sdb">SQLContext</type> 76*cdf0e10cSrcweir to explain what it was doing), and they should be 77*cdf0e10cSrcweir presented to the user in a consistent way. 78*cdf0e10cSrcweir <br/> 79*cdf0e10cSrcweir This can be reached by using this service. 80*cdf0e10cSrcweir @see com.sun.star.sdb.InteractionHandler 81*cdf0e10cSrcweir </p> 82*cdf0e10cSrcweir*/ 83*cdf0e10cSrcweirpublished service ErrorMessageDialog 84*cdf0e10cSrcweir{ 85*cdf0e10cSrcweir /** the title of the (dialog) window 86*cdf0e10cSrcweir */ 87*cdf0e10cSrcweir [property] string Title; 88*cdf0e10cSrcweir 89*cdf0e10cSrcweir /** parent window to use for the dialog 90*cdf0e10cSrcweir <p> 91*cdf0e10cSrcweir This property can't be set while the dialog is being displayed. 92*cdf0e10cSrcweir </p> 93*cdf0e10cSrcweir */ 94*cdf0e10cSrcweir [property] com::sun::star::awt::XWindow ParentWindow; 95*cdf0e10cSrcweir 96*cdf0e10cSrcweir /** is the exception displayed by the dialog 97*cdf0e10cSrcweir <p> 98*cdf0e10cSrcweir This should contain a 99*cdf0e10cSrcweir <type scope="com::sun::star::sdbc">SQLException</type> 100*cdf0e10cSrcweir instance, or an instance 101*cdf0e10cSrcweir of any class derived from this exception. 102*cdf0e10cSrcweir </p> 103*cdf0e10cSrcweir <p> 104*cdf0e10cSrcweir This property can't be set while the dialog is being displayed. 105*cdf0e10cSrcweir </p> 106*cdf0e10cSrcweir */ 107*cdf0e10cSrcweir [property] any SQLException; 108*cdf0e10cSrcweir 109*cdf0e10cSrcweir /** specifies the URL to the help topic to associate with the dialog. 110*cdf0e10cSrcweir 111*cdf0e10cSrcweir <p>If This URL is not empty, then the dialog will get a "Help" button, which 112*cdf0e10cSrcweir directs the user to the given help topic.</p> 113*cdf0e10cSrcweir */ 114*cdf0e10cSrcweir [optional, property] string HelpURL; 115*cdf0e10cSrcweir 116*cdf0e10cSrcweir /** allows access to the properties of the object 117*cdf0e10cSrcweir */ 118*cdf0e10cSrcweir interface com::sun::star::beans::XPropertySet; 119*cdf0e10cSrcweir 120*cdf0e10cSrcweir /** allows starting execution of the dialog 121*cdf0e10cSrcweir */ 122*cdf0e10cSrcweir interface com::sun::star::ui::dialogs::XExecutableDialog; 123*cdf0e10cSrcweir 124*cdf0e10cSrcweir /** allows initializing the dialog 125*cdf0e10cSrcweir <p> 126*cdf0e10cSrcweir You do not need to call the initialize method directly, instead you may use the createInstanceWithArguments 127*cdf0e10cSrcweir method of your 128*cdf0e10cSrcweir <type scope="com::sun::star::lang">XMultiServiceFactory</type> 129*cdf0e10cSrcweir . 130*cdf0e10cSrcweir </p> 131*cdf0e10cSrcweir <p> 132*cdf0e10cSrcweir You specify a parameter by passing one (or more) 133*cdf0e10cSrcweir <type scope="com::sun::star::beans">PropertyValue</type> 134*cdf0e10cSrcweir object(s) to the initialize method, where the <em>Name</em> field contains a string describing which aspect 135*cdf0e10cSrcweir you want to affect, and the <em>Value</em> field containing a value. 136*cdf0e10cSrcweir <br/> 137*cdf0e10cSrcweir Imagine the initialization values, as if you use 138*cdf0e10cSrcweir <method scope="com::sun::star::beans">XPropertySet::setPropertyValue() 139*cdf0e10cSrcweir </method> 140*cdf0e10cSrcweir of the 141*cdf0e10cSrcweir <type scope="com::sun::star::beans">XPropertySet</type> 142*cdf0e10cSrcweir interface ... 143*cdf0e10cSrcweir <br/> 144*cdf0e10cSrcweir allowed parameters are 145*cdf0e10cSrcweir <ul> 146*cdf0e10cSrcweir <li><b>Title</b><br/> 147*cdf0e10cSrcweir String describing the initial title of the dialog. If not specified, a default title is used. 148*cdf0e10cSrcweir </li> 149*cdf0e10cSrcweir <li><b>ParentWindow</b><br/> 150*cdf0e10cSrcweir <type scope="com::sun::star::awt">XWindow</type> 151*cdf0e10cSrcweir describing the parent window to use for the dialog. 152*cdf0e10cSrcweir </li> 153*cdf0e10cSrcweir <li><b>SQLException</b><br/> 154*cdf0e10cSrcweir <type scope="com::sun::star::sdbc">SQLException</type> 155*cdf0e10cSrcweir describing the error which is beeing displayed.<br/> 156*cdf0e10cSrcweir When initializing this value, you may use any derivative of 157*cdf0e10cSrcweir <type scope="com::sun::star::sdbc">SQLException</type> 158*cdf0e10cSrcweir . 159*cdf0e10cSrcweir </li> 160*cdf0e10cSrcweir </ul> 161*cdf0e10cSrcweir </p> 162*cdf0e10cSrcweir */ 163*cdf0e10cSrcweir interface com::sun::star::lang::XInitialization; 164*cdf0e10cSrcweir}; 165*cdf0e10cSrcweir 166*cdf0e10cSrcweir//============================================================================= 167*cdf0e10cSrcweir 168*cdf0e10cSrcweir}; }; }; }; 169*cdf0e10cSrcweir 170*cdf0e10cSrcweir#endif 171*cdf0e10cSrcweir 172