public class ConfigurationEnvironment extends Object implements Configurable.Environment
| Constructor and Description |
|---|
ConfigurationEnvironment(String name,
org.lsst.ccs.config.ConfigurationProxy configurationProxy,
ComponentLookupService lookupService,
org.lsst.ccs.config.ConfigurableSubsystem s)
Creates an Environment for a Configurable object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
change(String parameterName,
Object value)
performs a parameter change during an engineering session
|
void |
dropAllChanges()
All unsaved changes are dropped, each parameter goes back to the value specified
by the current configuration for this category.
|
void |
dropBulkChange() |
void |
dropChangesForCategories(String... categories)
Changes occurring for one of the mentioned categories in categories are dropped,
other categories are left untouched.
|
org.lsst.ccs.utilities.structs.ViewValue |
getCheckedValueFromConfiguration(String parameterName,
Object value)
Deprecated.
use isParameterConfigurable(String parameterName) instead, the return
value is irrelevant.
|
<T> LinkedHashMap<String,T> |
getChildren(Class<T> classFilter)
get the children of the
Configurable object that are assignable
to an instance of the class argument. |
Object |
getComponentByName(String name)
request a Component from a Description by its name.
|
org.lsst.ccs.utilities.structs.TreeBranch<String> |
getComponentTree() |
String |
getNameOfComponent() |
Map.Entry<String,Object> |
getParent()
returns the parent of the current component
|
Map<String,String> |
getSubmittedChanges() |
Optional<Subsystem> |
getSubsystem() |
Boolean |
isParameterConfigurable(String parameterName) |
void |
notifyChange(String parameterName,
String value)
to be used by "facade" commands that may set a value
the calling must have made a preliminary check with the configuration service. |
void |
notifyChangeWithoutPreliminaryChecks(String parameterName,
Object value)
to be used by "facade" commands that may set a value
then notify the configuration without going through the preliminary check
of the configuration service.
|
Map |
printConfigurableParameters(String[] categories) |
void |
saveAllChanges()
Saves all changes in their current configuration.
|
void |
saveChangesForCategories(String... categories)
Changes made in the specified categories are saved under the current configuration
for this category, changes on parameters that belong to other categories
are left unchanged.
|
void |
saveChangesForCategoriesAs(String... taggedCategories)
Changes made in the specified categories are saved under the newly specified
name for this category, changes on parameters that belong to other categories
are left unchanged.
|
void |
sendSignal(Signal signal) |
void |
submitChange(String parameterName,
Object value) |
public ConfigurationEnvironment(String name, org.lsst.ccs.config.ConfigurationProxy configurationProxy, ComponentLookupService lookupService, org.lsst.ccs.config.ConfigurableSubsystem s)
name - configurationProxy - lookupService - s - public void change(String parameterName, Object value) throws Exception
change in interface Configurable.EnvironmentparameterName - name of parameter for the current object.value - any object that is fit for the configuration system (see documentation)IllegalArgumentException - if parameter has a name unknown to the configurationException - that can be thrown by the ConfigurationProxy
(no connection, illegal format, constraints failure) or by the user's code
(preconditions)public void submitChange(String parameterName, Object value)
submitChange in interface Configurable.Environmentpublic void saveAllChanges()
throws ConfigurationServiceException
saveAllChanges in interface Configurable.EnvironmentConfigurationServiceExceptionpublic void saveChangesForCategories(String... categories) throws ConfigurationServiceException
saveChangesForCategories in interface Configurable.Environmentcategories - a list of categoriesConfigurationServiceExceptionpublic void saveChangesForCategoriesAs(String... taggedCategories) throws ConfigurationServiceException
saveChangesForCategoriesAs in interface Configurable.EnvironmenttaggedCategories - a list of pairs categoryName:configurationNameConfigurationServiceExceptionpublic void dropAllChanges()
throws Exception
dropAllChanges in interface Configurable.EnvironmentExceptionpublic void dropChangesForCategories(String... categories) throws Exception
dropChangesForCategories in interface Configurable.Environmentcategories - A list of categoriesException@Deprecated public org.lsst.ccs.utilities.structs.ViewValue getCheckedValueFromConfiguration(String parameterName, Object value) throws Exception
getCheckedValueFromConfiguration in interface Configurable.EnvironmentparameterName - value - can be a real Object or its String representationExceptionpublic Boolean isParameterConfigurable(String parameterName)
isParameterConfigurable in interface Configurable.Environmentpublic void notifyChangeWithoutPreliminaryChecks(String parameterName, Object value) throws Exception
notifyChangeWithoutPreliminaryChecks in interface Configurable.EnvironmentparameterName - value - Exceptionpublic void notifyChange(String parameterName, String value) throws Exception
notifyChange in interface Configurable.EnvironmentparameterName - value - Exceptionpublic Object getComponentByName(String name)
getComponentByName in interface Configurable.Environmentname - public <T> LinkedHashMap<String,T> getChildren(Class<T> classFilter)
Configurable object that are assignable
to an instance of the class argument.getChildren in interface Configurable.EnvironmentT - classFilter - public Map.Entry<String,Object> getParent()
getParent in interface Configurable.Environmentpublic String getNameOfComponent()
getNameOfComponent in interface Configurable.Environmentpublic Optional<Subsystem> getSubsystem()
getSubsystem in interface Configurable.Environmentpublic void dropBulkChange()
dropBulkChange in interface Configurable.Environmentpublic org.lsst.ccs.utilities.structs.TreeBranch<String> getComponentTree()
getComponentTree in interface Configurable.Environmentpublic void sendSignal(Signal signal)
sendSignal in interface Configurable.Environmentpublic Map printConfigurableParameters(String[] categories)
printConfigurableParameters in interface Configurable.Environmentpublic Map<String,String> getSubmittedChanges()
getSubmittedChanges in interface Configurable.EnvironmentCopyright © 2016 LSST. All rights reserved.