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
.store
.datasource
.wizard
;
13 import org
.apache
.log4j
.Logger
;
14 import org
.eclipse
.jface
.dialogs
.MessageDialog
;
16 import eu
.etaxonomy
.cdm
.database
.CdmDataSource
;
17 import eu
.etaxonomy
.cdm
.database
.ICdmDataSource
;
24 public class CdmDataSourceH2WizardPage
extends CdmDataSourceCredentialsWizardPage
{
27 private static final Logger logger
= Logger
28 .getLogger(CdmDataSourceH2WizardPage
.class);
34 protected CdmDataSourceH2WizardPage(ICdmDataSource dataSource
) {
36 setTitle("Enter credentials for embedded H2 database");
37 this.dataSource
= dataSource
;
42 * @see eu.etaxonomy.taxeditor.store.datasource.CdmDataSourceCredentialsWizardPage#createDatabaseForm()
45 public void createDatabaseForm() {
46 // no more fields needed for embedded H2
51 * @see eu.etaxonomy.taxeditor.store.datasource.ICdmDataSourceCredentialsWizardPage#testDbConfiguration()
53 public void testDbConfiguration() {
54 CdmDataSource dataSource
= CdmDataSource
.NewH2EmbeddedInstance(
55 getWizard().getDatabase(),
56 getWizard().getUsername(),
57 getWizard().getPassword()
60 if (dataSource
.testConnection()) {
61 MessageDialog
.openConfirm(parent
.getShell(), "Test successful", "Test successful");
63 MessageDialog
.openWarning(parent
.getShell(), "Test unsuccessful", "Test unsuccessful");
68 * @see eu.etaxonomy.taxeditor.store.datasource.CdmDataSourceCredentialsWizardPage#updateLocation()
71 public void updateLocation() {
72 // nothing to do, no location data provided