CdmDataSourceWizard and CdmDataSourceTypeSelectionWizardPage now call the new constructor.
super(pageName);
this.setPageComplete(false);
setDataSource(dataSource);
+ mode = CdmDataSourceWizard.Mode.CREATE;
}
/**
*
* @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.datasource.wizard.CdmDataSourceWizard.Mode} enum type.
+ */
+ protected CdmDataSourceH2WizardPage(ICdmDataSource dataSource, CdmDataSourceWizard.Mode mode) {
+ super("H2", dataSource, mode);
+ setTitle("Enter credentials for embedded H2 database");
+ }
+
/* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.store.datasource.CdmDataSourceCredentialsWizardPage#createDatabaseForm()
*/
*
* @param dataSource a {@link eu.etaxonomy.cdm.database.ICdmDataSource} object.
*/
+ @Deprecated
protected CdmDataSourceMySQLWizardPage(ICdmDataSource dataSource) {
super("MySQL", dataSource, CdmDataSourceWizard.Mode.CREATE);
setTitle("MySQL Server");
* <p>Constructor for CdmDataSourceMySQLWizardPage.</p>
*
* @param dataSource a {@link eu.etaxonomy.cdm.database.ICdmDataSource} object.
+ * @param mode a {@link eu.etaxonomy.taxeditor.datasource.wizard.CdmDataSourceWizard.Mode} enum type.
*/
protected CdmDataSourceMySQLWizardPage(ICdmDataSource dataSource, CdmDataSourceWizard.Mode mode) {
super("MySQL", dataSource, mode);
private int port;
+ @Deprecated
protected CdmDataSourcePostgreSQLServerWizardPage(ICdmDataSource dataSource) {
super("PostgreSQL Server", dataSource);
setTitle("PostgreSQL Server");
setDescription("Enter credentials for PostgreSQL Server database");
}
+
+ /**
+ * <p>Constructor for CdmDataSourcePostgreSQLServerWizardPage.</p>
+ *
+ * @param dataSource a {@link eu.etaxonomy.cdm.database.ICdmDataSource} object.
+ * @param mode a {@link eu.etaxonomy.taxeditor.datasource.wizard.CdmDataSourceWizard.Mode} enum type.
+ */
+ protected CdmDataSourcePostgreSQLServerWizardPage(ICdmDataSource dataSource, CdmDataSourceWizard.Mode mode) {
+ super("PostgreSQL Server", dataSource, mode);
+ setTitle("PostgreSQL Server");
+ setDescription("Enter credentials for PostgreSQL Server database");
+
+ }
/* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.datasource.wizard.CdmDataSourceCredentialsWizardPage#createDatabaseForm()
*
* @param dataSource a {@link eu.etaxonomy.cdm.database.ICdmDataSource} object.
*/
+ @Deprecated
public CdmDataSourceSQLServerWizardPage(ICdmDataSource dataSource) {
super("SQL Server", dataSource);
setTitle("SQL Server");
this.setDataSource(dataSource);
}
+ /**
+ * <p>Constructor for CdmDataSourceSQLServerWizardPage.</p>
+ *
+ * @param dataSource a {@link eu.etaxonomy.cdm.database.ICdmDataSource} object.
+ * param mode a {@link eu.etaxonomy.taxeditor.datasource.wizard.CdmDataSourceWizard.Mode} enum type.
+ */
+ public CdmDataSourceSQLServerWizardPage(ICdmDataSource dataSource, CdmDataSourceWizard.Mode mode) {
+ super("SQL Server", dataSource, mode);
+ setTitle("SQL Server");
+ setDescription("Enter credentials for SQL Server database");
+ this.setDataSource(dataSource);
+ }
+
/* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.store.datasource.CdmDataSourceCredentialsWizardPage#createDatabaseForm()
*/
if(type == DatabaseTypeEnum.H2){
- credentialsWizardPage = new CdmDataSourceH2WizardPage(dataSource);
+ credentialsWizardPage = new CdmDataSourceH2WizardPage(dataSource,CdmDataSourceWizard.Mode.CREATE);
}
else if(type == DatabaseTypeEnum.MySQL){
- credentialsWizardPage = new CdmDataSourceMySQLWizardPage(dataSource);
+ credentialsWizardPage = new CdmDataSourceMySQLWizardPage(dataSource, CdmDataSourceWizard.Mode.CREATE);
}
else if(type == DatabaseTypeEnum.PostgreSQL){
- credentialsWizardPage = new CdmDataSourcePostgreSQLServerWizardPage(dataSource);
+ credentialsWizardPage = new CdmDataSourcePostgreSQLServerWizardPage(dataSource, CdmDataSourceWizard.Mode.CREATE);
}
// else if(type == DatabaseTypeEnum.SqlServer2005){
case EDIT:
case CLONE:
if(dataSource.getDatabaseType() == DatabaseTypeEnum.H2){
- dataSourcePage = new CdmDataSourceH2WizardPage(dataSource);
+ dataSourcePage = new CdmDataSourceH2WizardPage(dataSource, mode);
}else if(dataSource.getDatabaseType() == DatabaseTypeEnum.MySQL){
dataSourcePage = new CdmDataSourceMySQLWizardPage(dataSource, mode);
}else if(dataSource.getDatabaseType() == DatabaseTypeEnum.SqlServer2005){
- dataSourcePage = new CdmDataSourceSQLServerWizardPage(dataSource);
+ dataSourcePage = new CdmDataSourceSQLServerWizardPage(dataSource,mode);
}else if(dataSource.getDatabaseType() == DatabaseTypeEnum.PostgreSQL){
- dataSourcePage = new CdmDataSourcePostgreSQLServerWizardPage(dataSource);
+ dataSourcePage = new CdmDataSourcePostgreSQLServerWizardPage(dataSource, mode);
}else{
throw new RuntimeException("Editing a datasource of type '" + dataSource.getDatabaseType() + "' is not supported yet.");
}