2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.taxeditor
.datasource
.wizard
;
12 import eu
.etaxonomy
.cdm
.database
.CdmDataSource
;
13 import eu
.etaxonomy
.cdm
.database
.ICdmDataSource
;
16 * <p>CdmDataSourceH2WizardPage class.</p>
21 public class CdmDataSourceH2WizardPage
extends CdmDataSourceCredentialsWizardPage
{
24 * <p>Constructor for CdmDataSourceH2WizardPage.</p>
26 * @param dataSource a {@link eu.etaxonomy.cdm.database.ICdmDataSource} object.
29 protected CdmDataSourceH2WizardPage(ICdmDataSource dataSource
) {
30 super("H2", dataSource
);
31 setTitle("Enter credentials for embedded H2 database");
35 * <p>Constructor for CdmDataSourceH2WizardPage.</p>
37 * @param dataSource a {@link eu.etaxonomy.cdm.database.ICdmDataSource} object.
38 * @param mode a {@link eu.etaxonomy.taxeditor.datasource.wizard.CdmDataSourceWizard.Mode} enum type.
40 protected CdmDataSourceH2WizardPage(ICdmDataSource dataSource
, CdmDataSourceWizard
.Mode mode
) {
41 super("H2", dataSource
, mode
);
42 setTitle("Enter credentials for embedded H2 database");
47 public void createDatabaseForm() {
48 // no more fields needed for embedded H2
53 public void updateLocation() {
54 // nothing to do, no location data provided
59 public void updateDataSource() {
60 ICdmDataSource dataSource
= getDataSource();
62 if(dataSource
== null) {
63 setDataSource(CdmDataSource
.NewH2EmbeddedInstance(database
,
67 dataSource
.setName(name
);
68 dataSource
.setDatabase(database
);
69 dataSource
.setUsername(username
);
70 dataSource
.setPassword(password
);
76 public void checkPageComplete() {
77 super.checkPageComplete();