@Internal public class


extends Object
   ↳ com.atlassian.jira.config.database.DatabaseDriverRegisterer


This class is an internal implementation detail and will change without notice.

Clients that depend on @Internal classes and interfaces can not expect to be compatible with any version other than the version they were compiled against (even minor version and milestone releases may break binary compatibility with respect to @Internal elements).

Class Overview

Registers required DB drivers and provides db-specific error messages when things go wrong.


Public Methods
DatabaseType databaseType()
static DatabaseDriverRegisterer forDriverClass(String className)
static DatabaseDriverRegisterer forType(DatabaseType type)
static HelpUrl getDbConfigLink(DatabaseType type, HelpUrls urls)
Iterable<String> getErrorMessage()
Get error message (for failed registration) specific to the database type.
boolean isDriverRegistered()
void registerDriver()
Registers the driver.
Inherited Methods
From class java.lang.Object

Public Methods

public DatabaseType databaseType ()

public static DatabaseDriverRegisterer forDriverClass (String className)

public static DatabaseDriverRegisterer forType (DatabaseType type)

public static HelpUrl getDbConfigLink (DatabaseType type, HelpUrls urls)

public Iterable<String> getErrorMessage ()

Get error message (for failed registration) specific to the database type.

  • message as a list of strings (non-i18ned)

public boolean isDriverRegistered ()

public void registerDriver ()

Registers the driver. If the driver is not found on the classpath, prints an error message in the logs and throws IllegalStateException (yes, it does both things! log it and throw it FTW:)

InvalidDatabaseDriverException if the driver is not found