com.atlassian.jira.configurator.db
Class HsqlDatabaseConfig

java.lang.Object
  extended by com.atlassian.jira.configurator.db.HsqlDatabaseConfig
All Implemented Interfaces:
ConnectionConfig, DatabaseConfig, DatabaseConfigConsole

public class HsqlDatabaseConfig
extends Object
implements DatabaseConfigConsole


Constructor Summary
HsqlDatabaseConfig()
           
 
Method Summary
 String getClassName()
           
 String getDatabaseType()
           
 ConfigField[] getFields()
           
 String getInstanceFieldName()
          The name of the "Instance" field for this DB.
 String getInstanceName()
           
 String getPassword()
           
protected  String getProtocolPrefix()
           
 String getUrl()
           
 String getUrl(String hostname, String port, String instance)
          Returns the JDBC URL for this DB config.
 String getUsername()
           
 DatabaseInstance parseUrl(String jdbcUrl)
           
protected  String removeProtocolPrefix(String jdbcUrl)
           
 void saveSettings(Settings newSettings)
          Saves the settings in this ConnectionConfig into the given Settings object.
 void setSettings(Settings settings)
           
 void testConnection()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HsqlDatabaseConfig

public HsqlDatabaseConfig()
Method Detail

getDatabaseType

public String getDatabaseType()
Specified by:
getDatabaseType in interface DatabaseConfig
Specified by:
getDatabaseType in interface DatabaseConfigConsole

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".

Specified by:
getInstanceFieldName in interface DatabaseConfig
Returns:
name of the "Instance" field for this DB.

getClassName

public String getClassName()
Specified by:
getClassName in interface ConnectionConfig
Specified by:
getClassName in interface DatabaseConfig

getUsername

public String getUsername()
Specified by:
getUsername in interface ConnectionConfig

getPassword

public String getPassword()
Specified by:
getPassword in interface ConnectionConfig

getFields

public ConfigField[] getFields()
Specified by:
getFields in interface DatabaseConfigConsole

setSettings

public void setSettings(Settings settings)
                 throws ParseException
Specified by:
setSettings in interface DatabaseConfigConsole
Throws:
ParseException

getInstanceName

public String getInstanceName()
Specified by:
getInstanceName in interface DatabaseConfigConsole

saveSettings

public void saveSettings(Settings newSettings)
                  throws ValidationException
Description copied from interface: ConnectionConfig
Saves the settings in this ConnectionConfig into the given Settings object.

Specified by:
saveSettings in interface ConnectionConfig
Parameters:
newSettings - Settings object to copy the settings into.
Throws:
ValidationException

testConnection

public void testConnection()
Specified by:
testConnection in interface ConnectionConfig

getUrl

public String getUrl()
Specified by:
getUrl in interface ConnectionConfig

getUrl

public String getUrl(String hostname,
                     String port,
                     String instance)
Description copied from interface: DatabaseConfig
Returns the JDBC URL for this DB config.

Specified by:
getUrl in interface DatabaseConfig
Parameters:
hostname - the hostname
port - the TCP/IP port number
instance - the DB "instance"
Returns:
the JDBC URL for this DB config.

parseUrl

public DatabaseInstance parseUrl(String jdbcUrl)
                          throws ParseException
Specified by:
parseUrl in interface DatabaseConfig
Throws:
ParseException

getProtocolPrefix

protected String getProtocolPrefix()

removeProtocolPrefix

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


Copyright © 2002-2013 Atlassian. All Rights Reserved.