Interface ConfigurationDAO

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
LocalConfigurationDAO, LocalToRemoteMigrationDAO, RestFileServerRemoteDAO

public interface ConfigurationDAO extends AutoCloseable
DAO interface to configuration data. This interface is to be implemented by classes that can save/load configuration data for a SingleCategoryTag.
Author:
LSST CCS Team
  • Method Details

    • loadCategoryTag

      SingleCategoryTagData loadCategoryTag(SingleCategoryTag singleCategoryTag) throws ConfigurationServiceException
      Load the configuration data for a SingleCategoryTag. The provided SingleCategoryTag could contain generic versions as: default, latest, working. It is the responsibility of the DAO to resolve this version and return it as part of the SingleCategoryTag object it returns.
      Parameters:
      singleCategoryTag - The object describing the data to be loaded for a single category tag.
      Returns:
      a SingleCategoryTagData containing the loaded configuration values and the comments associated to them. This object contains a SingleCategoryTag instance to clarify the version of the data that was actually loaded.
      Throws:
      ConfigurationServiceException - if the data cannot be found or loaded for the given SingleCategoryTag instance.
    • saveCategoryTagData

      SingleCategoryTag saveCategoryTagData(SingleCategoryTagData singleCategoryTagData) throws ConfigurationServiceException
      Save the data included in the provided SingleCategoryTag object. It is the responsibility of the DAO to resolve the version of the saved data and return it as part of the SingleCategoryTag object it returns.
      Parameters:
      singleCategoryTagData - The data to be saved; it includes the configuration parameter values and associated comments.
      Returns:
      a SingleCategoryTag instance containing the version in which the provided data was saved.
      Throws:
      ConfigurationServiceException - if the data could not be saved.
    • resolveVersionForCategoryTag

      default String resolveVersionForCategoryTag(SingleCategoryTag singleCategoryTag) throws ConfigurationServiceException
      Throws:
      ConfigurationServiceException
    • close

      default void close()
      Called when the DAO is no longer used (typically at shutdown).
      Specified by:
      close in interface AutoCloseable