com.atlassian.jira.configurator.db
Interface DatabaseConfig

All Known Implementing Classes:
HsqlDatabaseConfig, MySqlDatabaseConfig, OracleDatabaseConfig, PostgresDatabaseConfig, SqlServerDatabaseConfig

public interface DatabaseConfig

Implementations of this interface provide DB-specific JDBC configuration operations.


Method Summary
 String getClassName()
           
 String getDatabaseType()
           
 String getInstanceFieldName()
          The name of the "Instance" field for this DB.
 String getUrl(String hostname, String port, String instance)
          Returns the JDBC URL for this DB config.
 DatabaseInstance parseUrl(String jdbcUrl)
           
 

Method Detail

getDatabaseType

String getDatabaseType()

getInstanceFieldName

String getInstanceFieldName()
The name of the "Instance" field for this DB. eg for Oracle it is "SID", while for MySQL and PostgreSQL it is "Database" and for MS-SQL it is "Instance".

Returns:
name of the "Instance" field for this DB.

getClassName

String getClassName()

parseUrl

DatabaseInstance parseUrl(String jdbcUrl)
                          throws ParseException
Throws:
ParseException

getUrl

String getUrl(String hostname,
              String port,
              String instance)
              throws ValidationException
Returns the JDBC URL for this DB config.

Parameters:
hostname - the hostname
port - the TCP/IP port number
instance - the DB "instance"
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


Copyright © 2002-2014 Atlassian. All Rights Reserved.