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 eu
.etaxonomy
.cdm
.database
.CdmDataSource
;
14 import eu
.etaxonomy
.cdm
.database
.ICdmDataSource
;
17 * <p>CdmDataSourceH2WizardPage class.</p>
22 public class CdmDataSourceH2WizardPage
extends CdmDataSourceCredentialsWizardPage
{
25 * <p>Constructor for CdmDataSourceH2WizardPage.</p>
27 * @param dataSource a {@link eu.etaxonomy.cdm.database.ICdmDataSource} object.
30 protected CdmDataSourceH2WizardPage(ICdmDataSource dataSource
) {
31 super("H2", dataSource
);
32 setTitle("Enter credentials for embedded H2 database");
36 * <p>Constructor for CdmDataSourceH2WizardPage.</p>
38 * @param dataSource a {@link eu.etaxonomy.cdm.database.ICdmDataSource} object.
39 * @param mode a {@link eu.etaxonomy.taxeditor.datasource.wizard.CdmDataSourceWizard.Mode} enum type.
41 protected CdmDataSourceH2WizardPage(ICdmDataSource dataSource
, CdmDataSourceWizard
.Mode mode
) {
42 super("H2", dataSource
, mode
);
43 setTitle("Enter credentials for embedded H2 database");
48 public void createDatabaseForm() {
49 // no more fields needed for embedded H2
54 public void updateLocation() {
55 // nothing to do, no location data provided
60 public void updateDataSource() {
61 ICdmDataSource dataSource
= getDataSource();
63 if(dataSource
== null) {
64 setDataSource(CdmDataSource
.NewH2EmbeddedInstance(database
,
68 dataSource
.setName(name
);
69 dataSource
.setDatabase(database
);
70 dataSource
.setUsername(username
);
71 dataSource
.setPassword(password
);
77 public void checkPageComplete() {
78 super.checkPageComplete();