
public class ConfigurationFacade extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ConfigurationFacade.Profiles
this class is used by methods that modify the state of the database:
the registration of a SubsystemDescription will create a new
"default" ConfigProfile and if there was a previous version of the same
description then all profiles pointing to this old version will be returned in the notRegistered field
the "repair" method will take such a Profiles object and
will try to create a result report with registered and unregistered profiles
|
| 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 name,
String tag)
Deprecates a ConfigProfile.
|
SubsystemDescription |
deprecateSubsystemDescription(String subsystemName,
String tag,
ConfigurationFacade.Profiles results)
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
|
ConfigProfile |
getActiveConfigProfile(String subsystemName,
String name,
String tag)
returns an active ConfigProfile with name and tag
|
SubsystemDescription |
getActiveSubsystemDescription(String name,
String tag)
returns the active subsystem description with name and tag.
|
String |
getActiveValueAt(String subsystemName,
String parameterPath,
long date)
returns the value of a parameter for a subsystem at a given date.
|
ConfigProfile |
getConfigRunningAt(String subsystemName,
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.
|
ParameterConfiguration |
modifyParmDuringEngineering(ConfigProfile profile,
String path,
long timeStamp,
String value)
changes a parameter value during engineering session
|
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,
ConfigurationFacade.Profiles results)
registers a new (and complete) SubsystemDescription to the persistence Layer.
|
ConfigurationFacade.Profiles |
repair(SubsystemDescription description,
ConfigurationFacade.Profiles requestedProfiles)
tries to repair automatically a set of ConfigProfiles that have been deprecated
as the result of a Description change.
|
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, ConfigurationFacade.Profiles results) 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)results - (side effect) a Profiles object to be populated by the invocationPersistenceLayerExceptionIllegalArgumentException - if argument not a "new" description (generated by the factories)public SubsystemDescription deprecateSubsystemDescription(String subsystemName, String tag, ConfigurationFacade.Profiles results) throws PersistenceLayerException
subsystemName - tag - use "" if there is no tagPersistenceLayerExceptionpublic SubsystemDescription getActiveSubsystemDescription(String name, String tag) throws PersistenceLayerException
name - tag - PersistenceLayerExceptionpublic ConfigProfile registerConfigProfile(ConfigProfile newProfile) throws PersistenceLayerException
newProfile - PersistenceLayerExceptionpublic ConfigProfile deprecateConfigProfile(String subsystemName, String name, String tag) throws PersistenceLayerException
name - tag - PersistenceLayerExceptionpublic ConfigProfile getActiveConfigProfile(String subsystemName, String name, String tag) throws PersistenceLayerException
name - tag - PersistenceLayerExceptionpublic ParameterConfiguration modifyParmDuringEngineering(ConfigProfile profile, String path, long timeStamp, String value) throws PersistenceLayerException
profile - the configuration profile the parameter belongs topath - the path of the parameter on which to perform the changetimeStamp - the timestamp of the changevalue - the new value to affect to the parameterParameterConfigurationPersistenceLayerExceptionpublic 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, long date) throws PersistenceLayerException
subsystemName - date - ConfigProfile 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 parameterPath, long date) throws PersistenceLayerException
subsystemName - 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 ConfigurationFacade.Profiles repair(SubsystemDescription description, ConfigurationFacade.Profiles requestedProfiles)
description - requestedProfiles - public List<?> simpleHQLRequest(String hqlString) throws PersistenceLayerException
hqlString - PersistenceLayerExceptionCopyright © 2016 LSST. All rights reserved.