Package org.lsst.ccs.config
Class LocalConfigurationDAO
java.lang.Object
org.lsst.ccs.config.LocalConfigurationDAO
- All Implemented Interfaces:
AutoCloseable,ConfigurationDAO
Local file based implementation of interface ConfigurationDAO.
- Author:
- The LSST CCS Team
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor of a local file based ConfigurationDAO. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(LocalConfigurationDAO.Listener listener) loadCategoryTag(SingleCategoryTag singleCategoryTag) Load the configuration data for a SingleCategoryTag.voidSave the data included in the provided SingleCategoryTag object.static StringtoPropertiesFileName(SingleCategoryTag singleCategoryTag) voidvoidupdateSingleCategoryTagDefaultVersion(SingleCategoryTag tag, String version) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.lsst.ccs.config.ConfigurationDAO
close, resolveVersionForCategoryTag
-
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:ConfigurationDAOLoad 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:
loadCategoryTagin interfaceConfigurationDAO- 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
-
updateSingleCategoryTagDefaultVersion
-
saveCategoryTagData
public SingleCategoryTag saveCategoryTagData(SingleCategoryTagData data) throws ConfigurationServiceException Description copied from interface:ConfigurationDAOSave 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:
saveCategoryTagDatain interfaceConfigurationDAO- 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
-
addListener
-
removeLoadedTagListener
-