3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
11 package eu
.etaxonomy
.taxeditor
.datasource
.wizard
;
13 import org
.eclipse
.jface
.dialogs
.MessageDialog
;
15 import eu
.etaxonomy
.cdm
.database
.CdmDataSource
;
16 import eu
.etaxonomy
.cdm
.database
.ICdmDataSource
;
23 public class CdmDataSourceH2WizardPage
extends CdmDataSourceCredentialsWizardPage
{
28 protected CdmDataSourceH2WizardPage(ICdmDataSource dataSource
) {
30 setTitle("Enter credentials for embedded H2 database");
31 this.dataSource
= dataSource
;
36 * @see eu.etaxonomy.taxeditor.store.datasource.CdmDataSourceCredentialsWizardPage#createDatabaseForm()
39 public void createDatabaseForm() {
40 // no more fields needed for embedded H2
45 * @see eu.etaxonomy.taxeditor.store.datasource.ICdmDataSourceCredentialsWizardPage#testDbConfiguration()
47 public void testDbConfiguration() {
48 CdmDataSource dataSource
= CdmDataSource
.NewH2EmbeddedInstance(
49 getWizard().getDatabase(),
50 getWizard().getUsername(),
51 getWizard().getPassword()
54 if (dataSource
.testConnection()) {
55 MessageDialog
.openConfirm(parent
.getShell(), "Test successful", "Test successful");
57 MessageDialog
.openWarning(parent
.getShell(), "Test unsuccessful", "Test unsuccessful");
62 * @see eu.etaxonomy.taxeditor.store.datasource.CdmDataSourceCredentialsWizardPage#updateLocation()
65 public void updateLocation() {
66 // nothing to do, no location data provided