Class DatabaseUtil

java.lang.Object
edu.ucsb.nceas.metacat.util.DatabaseUtil

public class DatabaseUtil extends Object
  • Method Details

    • isDatabaseConfigured

      public static boolean isDatabaseConfigured() throws MetacatUtilException
      Reports whether database is fully configured.
      Returns:
      a boolean that is true if database is not unconfigured and false otherwise
      Throws:
      MetacatUtilException
    • getUpgradeVersions

      public static TreeSet<DBVersion> getUpgradeVersions() throws edu.ucsb.nceas.utilities.PropertyNotFoundException
      Gets the available upgrade versions for metacat by getting a list of upgrade script from properties in metacat.properties that start with "database.upgradeVersion". It then creats a DBVersion object for each upgrade version.
      Returns:
      a TreeSet of DBVersion objects holding individual version information
      Throws:
      edu.ucsb.nceas.utilities.PropertyNotFoundException
    • getScriptSuffixes

      public static Map<String,String> getScriptSuffixes() throws edu.ucsb.nceas.utilities.PropertyNotFoundException
      Gets the available upgrade versions for metacat by getting a list of upgrade script from properties in metacat.properties that start with "database.upgradeVersion". It then creats a DBVersion object for each upgrade version.
      Returns:
      a TreeSet of DBVersion objects holding individual version information
      Throws:
      edu.ucsb.nceas.utilities.PropertyNotFoundException