com.atlassian.jira.configurator.db
Class CommonConfigPanel
java.lang.Object
com.atlassian.jira.configurator.db.DatabaseConfigPanel
com.atlassian.jira.configurator.db.CommonConfigPanel
- Direct Known Subclasses:
- PostgresConfigPanel, SqlServerConfigPanel
public abstract class CommonConfigPanel
- extends DatabaseConfigPanel
Holds config options like username and password that are common to most DB types.
tfHostname
protected JTextField tfHostname
tfPort
protected JTextField tfPort
tfUsername
protected JTextField tfUsername
tfPassword
protected JTextField tfPassword
CommonConfigPanel
public CommonConfigPanel(DatabaseConfig databaseConfig)
getUsername
public String getUsername()
- Specified by:
getUsername
in class DatabaseConfigPanel
getPassword
public String getPassword()
- Specified by:
getPassword
in class DatabaseConfigPanel
getClassName
public String getClassName()
- Specified by:
getClassName
in class DatabaseConfigPanel
getUrl
public String getUrl(String jiraHome)
throws ValidationException
- Description copied from class:
DatabaseConfigPanel
- Returns the JDBC URL for this DB config.
The current jira-home is passed because it used by HSQL.
- Specified by:
getUrl
in class DatabaseConfigPanel
- Parameters:
jiraHome
- The current configured jira-home
- Returns:
- the JDBC URL for this DB config.
- Throws:
ValidationException
- If the underlying configuration is invalid for this DB type. eg for Postgres, "Database" (instance) is a required field
getHostname
protected abstract String getHostname()
getPort
protected abstract String getPort()
getInstance
protected abstract String getInstance()
getPanel
public final JPanel getPanel()
- Specified by:
getPanel
in class DatabaseConfigPanel
buildConfigPanel
protected abstract JPanel buildConfigPanel()
setSettings
public void setSettings(Settings settings)
throws ParseException
- Specified by:
setSettings
in class DatabaseConfigPanel
- Throws:
ParseException
setUrlSettings
protected abstract void setUrlSettings(DatabaseInstance connectionProperties)
throws ParseException
- Throws:
ParseException
setSchemaName
protected abstract void setSchemaName(String schemaName)
validate
public void validate()
throws ValidationException
- Description copied from class:
DatabaseConfigPanel
- Verify that the settings are valid.
- Specified by:
validate
in class DatabaseConfigPanel
- Throws:
ValidationException
- if any config is invalid.
Copyright © 2002-2012 Atlassian. All Rights Reserved.