Class DatabaseVerifier

java.lang.Object
com.atlassian.crowd.migration.verify.DatabaseVerifier
Direct Known Subclasses:
LegacyDatabaseVerifier, SupportedDatabaseVerifier

public abstract class DatabaseVerifier extends Object
Responsible for verifying the correctness/compatibility of pre 2.0 database to 2.0+ database
  • Field Details

  • Constructor Details

    • DatabaseVerifier

      public DatabaseVerifier()
  • Method Details

    • verify

      public abstract void verify()
      This method will verify if the correctness/compatibility of the database. If an error is detected, the error will be added to the errors list.
    • clearState

      public void clearState()
      This method will be called between runs of the verifier to make sure that state can be purged between runs if required.
    • hasErrors

      public boolean hasErrors()
      Checks if there are any errors as a result of the verification
      Returns:
      true if there are no errors (errors list is empty), false otherwise
    • getErrors

      public List<String> getErrors()
      Returns:
      the list of error messages during verification
    • setLegacyTableQueries

      public void setLegacyTableQueries(LegacyTableQueries legacyTableQueries)
      Provides the appropriate legacy table querier to the verifier if it needs to query the database.
      Parameters:
      legacyTableQueries - The appropriate table querier (eg. MySQL, Postgres)