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 |
commitSubmittedChangesForComponent() |
void |
dropSubmittedChanges() |
Map<String,String> |
getSubmittedChanges()
Gets the submitted changes for the specified component
|
String |
printComponentConfigurationParameters(Options options,
String... categories)
Returns the current values of the configuration parameters that belong to
this component and to the specified categories.
|
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, category=CORE, level=1) 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.@Command(description="submit a potential change for a parameter", type=CONFIGURATION, category=CORE, level=1) 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.@Command(description="submit potential changes for parameters", type=CONFIGURATION, category=CORE, level=1) public void submitChanges(Map<String,Object> values)
ConfigurableSubsystem#commitBulkChange()values - a map of parameter name and the new value to submit for this parameter@Command(description="displays the current values of the parameters that belong to the given categories", type=QUERY, category=CORE, level=1) @Option(name="dirtyOnly",description="Only print information about dirty configuration parameters") @Option(name="originTag",description="Show in which tag the parameter is defined") public String printComponentConfigurationParameters(Options options, String... categories)
options - The provided command optionscategories - The categories to print. If empty or null, all categories are displayed.@Command(description="prints the current state of the submitted changes", type=CONFIGURATION, category=CORE, level=1) public Map<String,String> getSubmittedChanges()
IllegalArgumentException - if there is no component named name@Command(name="cancelSubmittedChanges", description="drops the submitted changes for this component", type=CONFIGURATION, category=CORE, level=1) public void dropSubmittedChanges()
@Command(name="applySubmittedChangesForComponent", description="commit the submitted changes for this component", type=CONFIGURATION, category=CORE, level=1) public void commitSubmittedChangesForComponent()
Copyright © 2022 LSST. All rights reserved.