Class LocalConfigurationDAO

java.lang.Object
org.lsst.ccs.config.LocalConfigurationDAO
All Implemented Interfaces:
AutoCloseable, ConfigurationDAO

public class LocalConfigurationDAO extends Object implements ConfigurationDAO
Local file based implementation of interface ConfigurationDAO.
Author:
The LSST CCS Team
  • Constructor Details

    • LocalConfigurationDAO

      public LocalConfigurationDAO()
      Default constructor of a local file based ConfigurationDAO.
  • Method Details

    • loadCategoryTag

      public SingleCategoryTagData loadCategoryTag(SingleCategoryTag singleCategoryTag) throws ConfigurationServiceException
      Description copied from interface: ConfigurationDAO
      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.
      Specified by:
      loadCategoryTag in interface ConfigurationDAO
      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.
    • updateSingleCategoryTagDefaultVersion

      public void updateSingleCategoryTagDefaultVersion(SingleCategoryTag tag)
    • updateSingleCategoryTagDefaultVersion

      public void updateSingleCategoryTagDefaultVersion(SingleCategoryTag tag, String version)
    • saveCategoryTagData

      public SingleCategoryTag saveCategoryTagData(SingleCategoryTagData data) throws ConfigurationServiceException
      Description copied from interface: ConfigurationDAO
      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.
      Specified by:
      saveCategoryTagData in interface ConfigurationDAO
      Parameters:
      data - 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.
    • toPropertiesFileName

      public static String toPropertiesFileName(SingleCategoryTag singleCategoryTag)
    • addListener

      public void addListener(LocalConfigurationDAO.Listener listener)
    • removeLoadedTagListener

      public void removeLoadedTagListener(LocalConfigurationDAO.Listener listener)