public class ConfigurationEnvironment extends Object implements Configurable.Environment
| Constructor and Description |
|---|
ConfigurationEnvironment(String name,
Configurable currentObject,
ConfigurationProxy configurationProxy,
ComponentLookupService lookupService,
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)
Checks if a value can be accepted by the Configuration system.
|
<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() |
Method |
getConfigMethodOfComponent(String parameterName) |
Map<String,Method> |
getConfigMethodsOfComponent()
Deprecated.
|
String |
getNameOfComponent() |
Map.Entry<String,Object> |
getParent()
returns the parent of the current component
|
Object |
getRelevantObject()
Deprecated.
there is no such thing as a proxy anymore.
|
Optional<Subsystem> |
getSubsystem() |
List<Configurable> |
listChildren()
Deprecated.
use getChildren(Configurable.class).values instead.
|
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.
|
void |
register(String configurationName)
Deprecated.
use saveChangesForCategoriesAs(configurationName) instead
|
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 |
saveConfiguration()
Deprecated.
use saveAllChanges instead
|
void |
saveConfiguration(String configName)
Deprecated.
use saveChangesForCategoriesAs(configName) instead
|
void |
sendSignal(Signal signal) |
void |
submitChange(String parameterName,
Object value) |
public ConfigurationEnvironment(String name, Configurable currentObject, ConfigurationProxy configurationProxy, ComponentLookupService lookupService, ConfigurableSubsystem s)
name - currentObject - 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.Environment@Deprecated public void register(String configurationName) throws ConfigurationServiceException
register in interface Configurable.EnvironmentconfigurationName - ConfigurationServiceException@Deprecated public void saveConfiguration() throws ConfigurationServiceException
saveConfiguration in interface Configurable.EnvironmentConfigurationServiceException@Deprecated public void saveConfiguration(String configName) throws ConfigurationServiceException
saveConfiguration in interface Configurable.EnvironmentconfigName - ConfigurationServiceExceptionpublic 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 categoriesExceptionpublic 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 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 - @Deprecated public List<Configurable> listChildren()
Configurable objectlistChildren in interface Configurable.EnvironmentConfigurablepublic Map.Entry<String,Object> getParent()
getParent in interface Configurable.Environmentpublic String getNameOfComponent()
getNameOfComponent in interface Configurable.Environment@Deprecated public Object getRelevantObject()
getRelevantObject in interface Configurable.Environment@Deprecated public Map<String,Method> getConfigMethodsOfComponent()
getConfigMethodsOfComponent in interface Configurable.Environmentpublic Method getConfigMethodOfComponent(String parameterName)
getConfigMethodOfComponent 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.EnvironmentCopyright © 2015 LSST. All rights reserved.