com.atlassian.jira.configurator.db
Class PostgresDatabaseConfig

java.lang.Object
  extended by com.atlassian.jira.configurator.db.PostgresDatabaseConfig
All Implemented Interfaces:
DatabaseConfig

public class PostgresDatabaseConfig
extends Object


Constructor Summary
PostgresDatabaseConfig()
           
 
Method Summary
 String getClassName()
           
 String getDatabaseType()
           
 String getInstanceFieldName()
          The name of the "Instance" field for this DB.
protected  String getProtocolPrefix()
           
 String getUrl(String hostname, String port, String instance)
          Returns the JDBC URL for this DB config.
 DatabaseInstance parseUrl(String jdbcUrl)
           
protected  String removeProtocolPrefix(String jdbcUrl)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostgresDatabaseConfig

public PostgresDatabaseConfig()
Method Detail

getDatabaseType

public String getDatabaseType()

getInstanceFieldName

public String getInstanceFieldName()
Description copied from interface: DatabaseConfig
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

public String getClassName()

getUrl

public String getUrl(String hostname,
                     String port,
                     String instance)
              throws ValidationException
Description copied from interface: DatabaseConfig
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

parseUrl

public DatabaseInstance parseUrl(String jdbcUrl)
                          throws ParseException
Throws:
ParseException

getProtocolPrefix

protected String getProtocolPrefix()

removeProtocolPrefix

protected String removeProtocolPrefix(String jdbcUrl)
                               throws ParseException
Throws:
ParseException


Copyright © 2002-2012 Atlassian. All Rights Reserved.