
public class ComponentConfigurationEnvironment extends Object
ConfigurationService
but dedicated to the component it extends.| Modifier and Type | Method and Description |
|---|---|
void |
change(String parameterName,
Object value)
Single change of parameter that belongs to this component.
|
void |
dropAllChanges()
All parameters are set back to the value defined by the current
configuration they are running.
|
void |
dropChangesForCategories(String... categories)
All parameters that belong to one of the specified categories are set
back to the value defined by the current running configuration for this
category.
|
void |
dropSubmittedChanges() |
String |
getConfigurationParameterValue(String parameterName)
Get the value of a parameter
|
Map<String,String> |
getSubmittedChanges()
Gets the submitted changes for the specified component
|
Boolean |
isParameterConfigurable(String parameterName)
Indicates whether their is a configuration parameter named
parameterName that belong to this component. |
Map<String,String> |
printConfigurableParameters(String[] categories)
Returns the current values of the configuration parameters that belong to
this component and to the specified categories.
|
void |
saveAllChanges()
Saves the current value of each parameter in the current running
configuration.
|
void |
saveChangesForCategories(String... categories)
Saves the current value of each parameter that belongs to one of the
specified categories in the current running configuration for this
category.
|
void |
saveChangesForCategoriesAs(String... taggedCategories)
Saves the current value of each parameter that belongs to one of the
specified categories in a new configuration for this category.
|
void |
submitChange(String parameterName,
Object value)
Submits a change.
|
void |
submitChanges(Map<String,Object> values)
Submit a collection of changes.
|
@Command(description="engineering mode change of parameter value", type=CONFIGURATION) public void change(@Argument(name="parameterName",description="Configuration parameter name") String parameterName, @Argument(name="value",description="Configuration parameter value") Object value)
parameterName - the name of the parameter.value - the new value to affect to this parameterConfigurationServiceException - if the change
has not been registered to the configuration service.BulkValidationException - if setting the
parameters fails at the validation step. The configuration state remains
unchanged.BulkSettingException - if setting the parameter
fails at the setting step, or if a suspicious change is detected at the
validation step, or if the final values of the parameters is not
consistent with the performed change. Existing submitted changes are
dropped and an alert is raised.IllegalStateException - if the subsystem is not in engineering mode
or if the subsystem is is INITIAL_SAFE configuration state.@Command(description="submit a potential change for a parameter", type=CONFIGURATION) public void submitChange(@Argument(name="parameterName",description="Configuration parameter name") String parameterName, @Argument(name="value",description="Configuration parameter value") Object value)
parameterName - a parameter that belongs to this componentvalue - the new value to submit for this component.IllegalArgumentException - if componentName does not have
a configurable parameter named parameterNameIllegalStateException - if the subsystem is not in engineering mode
or if the subsystem is is INITIAL_SAFE configuration state.@Command(description="submit potential changes for parameters", type=CONFIGURATION) public void submitChanges(Map<String,Object> values)
ConfigurableSubsystem#commitBulkChange()values - a map of parameter name and the new value to submit for this parameterpublic String getConfigurationParameterValue(String parameterName)
public void saveAllChanges()
ConfigurationServiceException - if the configuration service is
unavailable. The configuration state does not change and the run-time
changes are still considered unsaved. In addition, an alert is raised to
indicate the configuration service unavailability.public void saveChangesForCategories(String... categories)
categories - a list of categories to saveConfigurationServiceException - if the configuration service is
unavailable. The configuration state does not change and existing
run-time changes are still considered unsaved. In addition, an alert is
raised to indicate the configuration service unavailability.public void saveChangesForCategoriesAs(String... taggedCategories)
taggedCategories - a list of pairs
categoryName:configurationName. {ConfigurationServiceException - if the
configuration service is not available.public void dropAllChanges()
ConfigurationServiceException - if the configuration service is
unavailable.BulkValidationException - if setting the parameters back to their
configured value fails at the validation step.BulkSettingException - if setting the parameters back to their
configured value fails at the setting step. An alert is raised.public void dropChangesForCategories(String... categories)
categories - A list of categoriesConfigurationServiceException - if the configuration service is
unavailable.BulkValidationException - if setting the parameters back to their
configured value fails at the validation step.BulkSettingException - if setting the parameters back to their
configured value fails at the setting step. An alert is raised.@Command public Boolean isParameterConfigurable(String parameterName)
parameterName that belong to this component.parameterName - the parameter namename
which belong to the component {@Command(description="displays the current values of the parameters that belong to the given categories", type=CONFIGURATION) public Map<String,String> printConfigurableParameters(@Argument(defaultValue="[]") String[] categories)
categories - regardless of the category if null.IllegalArgumentException - if there is no component named
name@Command(description="prints the current state of the submitted changes", type=CONFIGURATION) public Map<String,String> getSubmittedChanges()
IllegalArgumentException - if there is no component named name@Command(description="drops the submitted changes for this component", type=CONFIGURATION) public void dropSubmittedChanges()
Copyright © 2018 LSST. All rights reserved.