com.atlassian.jira.config.database
Class MultiTenantDatabaseConfigurationLoader

java.lang.Object
  extended by com.atlassian.jira.config.database.MultiTenantDatabaseConfigurationLoader
All Implemented Interfaces:
DatabaseConfigurationLoader

public class MultiTenantDatabaseConfigurationLoader
extends Object
implements DatabaseConfigurationLoader

Implements the DatabaseConfigurationLoader for MultiTenant mode - where the MultiTenantContext provides configuration storage for this stuff.

Since:
v4.4

Constructor Summary
MultiTenantDatabaseConfigurationLoader()
           
 
Method Summary
 boolean configExists()
          Returns true only if the database configuration file already exists in the JIRA home directory.
 DatabaseConfig loadDatabaseConfiguration()
          Reads and deserialises the DatabaseConfig from its permanent store.
 void saveDatabaseConfiguration(DatabaseConfig config)
          Serialises and persists the given config to its permanent store.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiTenantDatabaseConfigurationLoader

public MultiTenantDatabaseConfigurationLoader()
Method Detail

configExists

public boolean configExists()
Description copied from interface: DatabaseConfigurationLoader
Returns true only if the database configuration file already exists in the JIRA home directory.

Specified by:
configExists in interface DatabaseConfigurationLoader
Returns:
whether the config file exists.

loadDatabaseConfiguration

public DatabaseConfig loadDatabaseConfiguration()
                                         throws RuntimeException,
                                                RuntimeIOException
Description copied from interface: DatabaseConfigurationLoader
Reads and deserialises the DatabaseConfig from its permanent store.

Specified by:
loadDatabaseConfiguration in interface DatabaseConfigurationLoader
Returns:
the database configuration.
Throws:
RuntimeIOException - if the config cannot be loaded due to a missing file or bad permissions.
RuntimeException - if the config cannot be loaded for example due to a corrupt file format.

saveDatabaseConfiguration

public void saveDatabaseConfiguration(DatabaseConfig config)
                               throws RuntimeIOException
Description copied from interface: DatabaseConfigurationLoader
Serialises and persists the given config to its permanent store.

Specified by:
saveDatabaseConfiguration in interface DatabaseConfigurationLoader
Parameters:
config - the config to store.
Throws:
RuntimeIOException - if there was some IO problem saving.


Copyright © 2002-2012 Atlassian. All Rights Reserved.