public class ConfigurationFacade extends Object
| Constructor and Description |
|---|
ConfigurationFacade(DBInterface dao)
creates a facade object on top of a Data Access Object that implements the base services.
|
| Modifier and Type | Method and Description |
|---|---|
ConfigProfile |
deprecateConfigProfile(String subsystemName,
String descriptionName,
String name,
String tag)
Deprecates a ConfigProfile.
|
SubsystemDescription |
deprecateSubsystemDescription(String subsystemName,
String tag)
Deprecates a Subsystem description already in the database.
|
void |
endRun(String subsystemName,
String configName,
String tag,
long endTime)
marks the end of a run.
|
ParameterConfiguration |
engineerParmConfig(ParameterConfiguration parameterConfiguration)
registration of a modified parameter during an engineering session in the
database
|
org.lsst.ccs.localdb.configdb.model.AConfigProfile |
getActiveConfigProfile(String subsystemName,
String descriptionName,
String configName,
String cat)
returns an active ConfigProfile with name and tag
|
Collection<org.lsst.ccs.localdb.configdb.model.AConfigProfile> |
getActiveProfilesForSubsystem(ASubsystemDescription subsystemDescription,
String category) |
SubsystemDescription |
getActiveSubsystemDescription(String name,
String tag)
returns the active subsystem description with name and tag.
|
String |
getActiveValueAt(String subsystemName,
String descriptionName,
String category,
String parameterPath,
long date)
returns the value of a parameter for a subsystem at a given date.
|
ConfigProfile |
getConfigRunningAt(String subsystemName,
String descriptionName,
String category,
long date)
returns the ConfigProfile active when a subsystem was running at that date.
|
ConfigProfile |
getConfigValidAt(String subsystemName,
String configName,
String configTag,
long date)
tries to get a ConfigProfile which was valid at a given date.
|
ConfigProfile |
getNext(ConfigProfile current)
gets the next modified ConfigProfile with same name and tag
|
ConfigProfile |
getPrevious(ConfigProfile current)
gets a previous ConfigProfile with the same name and tag.
|
SubsystemDescription |
getPrevious(SubsystemDescription current)
returns the previous description with same name and tag.
|
String |
getValueValidAt(String subsystemName,
String profileName,
String profileTag,
String parameterPath,
long date)
returns the value of a parameter at a given time for a given Profile.
|
ConfigProfile |
registerConfigProfile(ConfigProfile newProfile)
registers a ConfigProfile in the database.
|
void |
registerRun(String subsystemName,
String configName,
String tag,
long startTime)
the run and end registrations are based on messages received from a subsystem.
|
SubsystemDescription |
registerSubsystemDescription(SubsystemDescription newDescription)
registers a new (and complete) SubsystemDescription to the persistence Layer.
|
void |
setDeprecationListener(DeprecationListener deprecationListener) |
List<?> |
simpleHQLRequest(String hqlString)
forwards an HQLrequest to the DAO.
|
public ConfigurationFacade(DBInterface dao)
dao - public void setDeprecationListener(DeprecationListener deprecationListener)
public SubsystemDescription registerSubsystemDescription(SubsystemDescription newDescription) throws PersistenceLayerException
description = facade.registerSubsystemDescription(description);if trying to save a Subsystem description already under DB management this method does nothing.
newDescription - a new SubsystemDescription with all ParameterDescriptions (this object is managed and modified
by the persistence layer)PersistenceLayerExceptionIllegalArgumentException - if argument not a "new" description (generated by the factories)public SubsystemDescription deprecateSubsystemDescription(String subsystemName, String tag) throws PersistenceLayerException
subsystemName - tag - use "" if there is no tagPersistenceLayerExceptionpublic SubsystemDescription getActiveSubsystemDescription(String name, String tag) throws PersistenceLayerException
name - the name of the subsystem.tag - the name of the description.PersistenceLayerExceptionpublic ConfigProfile registerConfigProfile(ConfigProfile newProfile) throws PersistenceLayerException
newProfile - PersistenceLayerExceptionpublic ConfigProfile deprecateConfigProfile(String subsystemName, String descriptionName, String name, String tag) throws PersistenceLayerException
subsystemName - descriptionName - name - tag - PersistenceLayerExceptionpublic org.lsst.ccs.localdb.configdb.model.AConfigProfile getActiveConfigProfile(String subsystemName, String descriptionName, String configName, String cat) throws PersistenceLayerException
subsystemName - the subsystem namedescriptionName - the description nameconfigName - the name of the configurationcat - the category of parameters.PersistenceLayerExceptionpublic Collection<org.lsst.ccs.localdb.configdb.model.AConfigProfile> getActiveProfilesForSubsystem(ASubsystemDescription subsystemDescription, String category)
public ParameterConfiguration engineerParmConfig(ParameterConfiguration parameterConfiguration) throws PersistenceLayerException
parameterConfiguration - ParameterConfigurationPersistenceLayerExceptionIllegalArgumentException - if the parameterConfiguration is not a regsitered active parameter of if
the configuration is not in engineering modepublic void registerRun(String subsystemName, String configName, String tag, long startTime) throws PersistenceLayerException
subsystemName - configName - tag - startTime - PersistenceLayerExceptionpublic void endRun(String subsystemName, String configName, String tag, long endTime) throws PersistenceLayerException
subsystemName - configName - tag - endTime - PersistenceLayerExceptionpublic ConfigProfile getConfigRunningAt(String subsystemName, String descriptionName, String category, long date) throws PersistenceLayerException
subsystemName - the subsystem namedescriptionName - the description namecategory - the categorydate - the dateConfigProfile running at the specified datePersistenceLayerExceptionpublic ConfigProfile getConfigValidAt(String subsystemName, String configName, String configTag, long date) throws PersistenceLayerException
configName - configTag - ConfigProfile that was valid at the given datePersistenceLayerExceptionpublic String getActiveValueAt(String subsystemName, String descriptionName, String category, String parameterPath, long date) throws PersistenceLayerException
subsystemName - descriptionName - category - parameterPath - date - PersistenceLayerExceptionpublic String getValueValidAt(String subsystemName, String profileName, String profileTag, String parameterPath, long date) throws PersistenceLayerException
profileName - profileTag - parameterPath - a String in Path syntax ("componentName//parameterName")date - PersistenceLayerExceptionpublic ConfigProfile getPrevious(ConfigProfile current) throws PersistenceLayerException
current - PersistenceLayerExceptionpublic ConfigProfile getNext(ConfigProfile current) throws PersistenceLayerException
current - PersistenceLayerExceptionpublic SubsystemDescription getPrevious(SubsystemDescription current) throws PersistenceLayerException
current - PersistenceLayerExceptionpublic List<?> simpleHQLRequest(String hqlString) throws PersistenceLayerException
hqlString - PersistenceLayerExceptionCopyright © 2017 LSST. All rights reserved.