1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2007 EDIT
|
4
|
* European Distributed Institute of Taxonomy
|
5
|
* http://www.e-taxonomy.eu
|
6
|
*
|
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.
|
9
|
*/
|
10
|
|
11
|
package eu.etaxonomy.taxeditor.datasource.wizard;
|
12
|
|
13
|
import eu.etaxonomy.cdm.database.CdmDataSource;
|
14
|
import eu.etaxonomy.cdm.database.ICdmDataSource;
|
15
|
|
16
|
/**
|
17
|
* <p>CdmDataSourceH2WizardPage class.</p>
|
18
|
*
|
19
|
* @author n.hoffmann
|
20
|
* @created 19.05.2009
|
21
|
* @version 1.0
|
22
|
*/
|
23
|
public class CdmDataSourceH2WizardPage extends CdmDataSourceCredentialsWizardPage {
|
24
|
|
25
|
/**
|
26
|
* <p>Constructor for CdmDataSourceH2WizardPage.</p>
|
27
|
*
|
28
|
* @param dataSource a {@link eu.etaxonomy.cdm.database.ICdmDataSource} object.
|
29
|
*/
|
30
|
protected CdmDataSourceH2WizardPage(ICdmDataSource dataSource) {
|
31
|
super("H2");
|
32
|
setTitle("Enter credentials for embedded H2 database");
|
33
|
this.setDataSource(dataSource);
|
34
|
}
|
35
|
|
36
|
/* (non-Javadoc)
|
37
|
* @see eu.etaxonomy.taxeditor.store.datasource.CdmDataSourceCredentialsWizardPage#createDatabaseForm()
|
38
|
*/
|
39
|
/** {@inheritDoc} */
|
40
|
@Override
|
41
|
public void createDatabaseForm() {
|
42
|
// no more fields needed for embedded H2
|
43
|
}
|
44
|
|
45
|
/* (non-Javadoc)
|
46
|
* @see eu.etaxonomy.taxeditor.store.datasource.CdmDataSourceCredentialsWizardPage#updateLocation()
|
47
|
*/
|
48
|
/** {@inheritDoc} */
|
49
|
@Override
|
50
|
public void updateLocation() {
|
51
|
// nothing to do, no location data provided
|
52
|
}
|
53
|
|
54
|
/* (non-Javadoc)
|
55
|
* @see eu.etaxonomy.taxeditor.datasource.wizard.CdmDataSourceCredentialsWizardPage#updateDataSource()
|
56
|
*/
|
57
|
/** {@inheritDoc} */
|
58
|
@Override
|
59
|
public void updateDataSource() {
|
60
|
setDataSource(CdmDataSource.NewH2EmbeddedInstance(database,
|
61
|
username,
|
62
|
password,
|
63
|
nomenclaturalCode));
|
64
|
}
|
65
|
|
66
|
/* (non-Javadoc)
|
67
|
* @see eu.etaxonomy.taxeditor.datasource.wizard.CdmDataSourceCredentialsWizardPage#checkPageComplete()
|
68
|
*/
|
69
|
/** {@inheritDoc} */
|
70
|
@Override
|
71
|
public void checkPageComplete() {
|
72
|
super.checkPageComplete();
|
73
|
}
|
74
|
}
|