Class DatabaseConfigPanel
java.lang.Object
com.atlassian.jira.configurator.db.DatabaseConfigPanel
- Direct Known Subclasses:
CommonConfigPanel,H2ConfigPanel,MySql8ConfigPanel,OracleConfigPanel
An abstract class that represents the GUI Config panel for a particular DB type.
Each DB type will require a separate subclass with DB-specific operations.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionabstract JPanelgetPanel()abstract Stringabstract StringFor DB's that want to allow entity-engine to set a schema-name, this will return the user's selected Schema-nameabstract StringReturns the JDBC URL for this DB config.abstract StringvoidsaveSettings(Settings newSettings, String jiraHome) Apply the current user entered settings into the given Settings object.abstract voidsetSettings(Settings settings) voidtestConnection(String jiraHome) toString()abstract voidvalidate()Verify that the settings are valid.
-
Field Details
-
TEXT_FIELD_COLUMNS
public static final int TEXT_FIELD_COLUMNS- See Also:
-
-
Method Details
-
toString
-
validate
Verify that the settings are valid.- Throws:
ValidationException- if any config is invalid.
-
getDisplayName
-
getClassName
-
getUrl
Returns the JDBC URL for this DB config.The current jira-home is passed because it used by H2.
- 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
-
getUsername
-
getPassword
-
getSchemaName
For DB's that want to allow entity-engine to set a schema-name, this will return the user's selected Schema-name- Returns:
- the user's selected Schema-name
-
getDatabaseType
-
getPanel
-
setSettings
- Throws:
ParseException
-
saveSettings
Apply the current user entered settings into the given Settings object.- Parameters:
newSettings- The Settings object to set the values in.jiraHome- the jira home where the settings should be saved- Throws:
ValidationException- if any of the new settings are Invalid
-
testConnection
public void testConnection(String jiraHome) throws ClassNotFoundException, SQLException, ValidationException
-