com.atlassian.jira.appconsistency.db
Class DatabaseChecker

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

public class DatabaseChecker
extends Object


Method Summary
 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
 

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()

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-2008 Atlassian. All Rights Reserved.