
public class ConfigurationEnvironment extends Object implements Configurable.Environment
| Constructor and Description |
|---|
ConfigurationEnvironment(String name,
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.
|
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.
|
TreeBranch<String> |
getComponentTree()
Returns a tree of component names starting from the current component
|
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)
returns the current values for configurable parameters of this component
that belong to the given 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)
Sends a signal starting from the current component
|
void |
submitChange(String parameterName,
Object value) |
public ConfigurationEnvironment(String name, ConfigurationProxy configurationProxy, ComponentLookupService lookupService, ConfigurableSubsystem s)
name - configurationProxy - lookupService - s - public void change(String parameterName, Object value)
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 configurationpublic void submitChange(String parameterName, Object value)
submitChange in interface Configurable.Environmentpublic void saveAllChanges()
saveAllChanges in interface Configurable.EnvironmentConfigurationServiceExceptionpublic void saveChangesForCategories(String... categories)
saveChangesForCategories in interface Configurable.Environmentcategories - a list of categoriesConfigurationServiceExceptionpublic void saveChangesForCategoriesAs(String... taggedCategories)
saveChangesForCategoriesAs in interface Configurable.EnvironmenttaggedCategories - a list of pairs categoryName:configurationNameConfigurationServiceExceptionpublic void dropAllChanges()
dropAllChanges in interface Configurable.Environmentpublic void dropChangesForCategories(String... categories)
dropChangesForCategories in interface Configurable.Environmentcategories - A list of categories@Deprecated public 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)
notifyChangeWithoutPreliminaryChecks in interface Configurable.EnvironmentparameterName - value - public void notifyChange(String parameterName, String value)
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 TreeBranch<String> getComponentTree()
Configurable.EnvironmentgetComponentTree in interface Configurable.Environmentpublic void sendSignal(Signal signal)
Configurable.EnvironmentsendSignal in interface Configurable.Environmentpublic Map printConfigurableParameters(String[] categories)
Configurable.EnvironmentprintConfigurableParameters in interface Configurable.Environmentpublic Map<String,String> getSubmittedChanges()
getSubmittedChanges in interface Configurable.EnvironmentCopyright © 2016 LSST. All rights reserved.