com.atlassian.jira.appconsistency.db
Class DatabaseChecker

java.lang.Object
  extended by com.atlassian.jira.appconsistency.db.DatabaseChecker

public class DatabaseChecker
extends Object


Constructor Summary
DatabaseChecker()
           
 
Method Summary
(package private)  void addCheck(DatabaseCheck check)
          Registers a DatabaseCheck, adding to the end of the existing list of checks.
 void checkDatabase()
          Check if there are problems with the configuration of the database such that it shouldn't be used.
 DatabaseCheck getFailedCheck()
          Returns the first check that failed or null if none failed.
 String getFaultDescription()
           
 String getFaultType()
           
static DatabaseChecker getInstance()
           
 boolean isDatabaseOk()
          Returns the current stored value of the result of the database checks if they have been run.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseChecker

DatabaseChecker()
Method Detail

getInstance

public static DatabaseChecker getInstance()

isDatabaseOk

public boolean isDatabaseOk()
Returns the current stored value of the result of the database checks if they have been run. If the checks have not been run (which should not happen in a properly configured JIRA, we assume database is OK and return true.

Returns:
false if the database is known to be incompatible.

getFailedCheck

public DatabaseCheck getFailedCheck()
Returns the first check that failed or null if none failed.

Returns:
the DatabaseCheck.

getFaultDescription

public String getFaultDescription()

getFaultType

public String getFaultType()

addCheck

void addCheck(DatabaseCheck check)
Registers a DatabaseCheck, adding to the end of the existing list of checks.

Parameters:
check - database check

checkDatabase

public void checkDatabase()
Check if there are problems with the configuration of the database such that it shouldn't be used. The result is derived from performing the configured list of DatabaseChecks. The execution of checks stops at the first failure.



Copyright © 2002-2007 Atlassian. All Rights Reserved.