+++ /dev/null
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.local.datasource.wizard;
-
-import eu.etaxonomy.cdm.database.CdmDataSource;
-import eu.etaxonomy.cdm.database.ICdmDataSource;
-
-/**
- * <p>CdmDataSourceH2WizardPage class.</p>
- *
- * @author n.hoffmann
- * @created 19.05.2009
- */
-public class CdmDataSourceH2WizardPage extends CdmDataSourceCredentialsWizardPage {
-
- /**
- * <p>Constructor for CdmDataSourceH2WizardPage.</p>
- *
- * @param dataSource a {@link eu.etaxonomy.cdm.database.ICdmDataSource} object.
- */
- @Deprecated
- protected CdmDataSourceH2WizardPage(ICdmDataSource dataSource) {
- super("H2", dataSource);
- setTitle("Enter credentials for embedded H2 database");
- }
-
- /**
- * <p>Constructor for CdmDataSourceH2WizardPage.</p>
- *
- * @param dataSource a {@link eu.etaxonomy.cdm.database.ICdmDataSource} object.
- * @param mode a {@link eu.etaxonomy.taxeditor.webapp.datasource.common.wizard.CdmDataSourceWizard.Mode} enum type.
- */
- protected CdmDataSourceH2WizardPage(ICdmDataSource dataSource, CdmDataSourceWizard.Mode mode) {
- super("H2", dataSource, mode);
- setTitle("Enter credentials for embedded H2 database");
- }
-
- /** {@inheritDoc} */
- @Override
- public void createDatabaseForm() {
- // no more fields needed for embedded H2
- }
-
- /** {@inheritDoc} */
- @Override
- public void updateLocation() {
- // nothing to do, no location data provided
- }
-
- /** {@inheritDoc} */
- @Override
- public void updateDataSource() {
- ICdmDataSource dataSource = getDataSource();
-
- if(dataSource == null) {
- setDataSource(CdmDataSource.NewH2EmbeddedInstance(database,
- username,
- password));
- } else {
- dataSource.setName(name);
- dataSource.setDatabase(database);
- dataSource.setUsername(username);
- dataSource.setPassword(password);
- }
- }
-
- /** {@inheritDoc} */
- @Override
- public void checkPageComplete() {
- super.checkPageComplete();
- }
-}