edu.ucsb.nceas.metacat.util

## Class ConfigurationUtil

- java.lang.Object
- - edu.ucsb.nceas.metacat.util.ConfigurationUtil

-     public class ConfigurationUtil
      extends java.lang.Object

  A suite of utility classes for the metadata catalog server

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static AbstractDatabase` | `dbAdapter`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConfigurationUtil()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `bypassConfiguration()` Reports whether the metacat configuration utility should be run.
    `static boolean` | `isBackupDirConfigured()` Check if the application.backupDir property is populated in metacat.properties and that it points to a writable directory.
    `static boolean` | `isEZIDConfigured()`
    `static boolean` | `isMetacatConfigured()` Reports whether metacat is fully configured.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### dbAdapter

          public static AbstractDatabase dbAdapter

  - ### Constructor Detail

    - #### ConfigurationUtil

          public ConfigurationUtil()

  - ### Method Detail

    - #### isMetacatConfigured

          public static boolean isMetacatConfigured()

      Reports whether metacat is fully configured.
      Returns:
        a boolean that is true if all sections are configured and false otherwise

    - #### isBackupDirConfigured

          public static boolean isBackupDirConfigured()
                                               throws MetacatUtilException,
                                                      edu.ucsb.nceas.utilities.PropertyNotFoundException

      Check if the application.backupDir property is populated in metacat.properties and that it points to a writable directory.
      Returns:
        false if the application.backupDir property does not point to a writable directory.
      Throws:
        `MetacatUtilException`
        `edu.ucsb.nceas.utilities.PropertyNotFoundException`

    - #### isEZIDConfigured

          public static boolean isEZIDConfigured()
                                          throws MetacatUtilException

      Throws:
        `MetacatUtilException`

    - #### bypassConfiguration

          public static boolean bypassConfiguration()
                                             throws MetacatUtilException,
                                                    ServiceException

      Reports whether the metacat configuration utility should be run. Returns false if -- dev.runConfiguration=false and -- backup properties file exists Note that dev.runConfiguration should only be set to false when reinstalling the same version of the application in development.
      Returns:
        a boolean that is false if dev.runConfiguration is false and the backup properties file exists.
      Throws:
        `MetacatUtilException`
        `ServiceException`

Copyright © 2023 Regents of the University of California. All Rights Reserved.