Interface ConfigurationBulkChangeHandler
- All Known Implementing Classes:
CalcChannel,Channel,DerivedChannel
Bulk changes of configuration parameters happen anytime there is a configuration change :
- loading configurations
- dropping changes
- changing one parameter
- committing a set of submitted changes of configuration parameters.
The bulk validation step is intended to validate that all (or a subset) of the provided parameters full view is in a consistent state. If problems are detected an exception is meant to be thrown, in which case the bulk change process is interrupted and the configuration state is left unchanged. Please note that the provided Map will contain all parameters with their values, whether the parameter has been changed or not. If not changed the parameter's value is the current value.
The bulk parameter setting method is invoked after a successful validation step. Exceptions should normally not be thrown at this step. If it happens, the configuration state may have been modified. The provided Map will only contain the parameters that have changed and that need to be set.
- Author:
- The LSST CCS Team
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidsetParameterBulk(Map<String, Object> parametersView) Set one or more configuration parameters to a new value.default voidvalidateBulkChange(Map<String, Object> parametersView) Validate a set of proposed changes of configuration parameters of this component.
-
Method Details
-
validateBulkChange
Validate a set of proposed changes of configuration parameters of this component. This method is passed a map of all configuration parameter names that belong to this component, mapped to their value, where the value is either the new proposed value if it has been changed, or the current value of the parameter if it has not been changed. This method is meant to throw an exception when one or more parameters have a proposed value that is decided as not valid by the user. This method is called by the framework only when necessary.- Parameters:
parametersView- the whole set of parameters for this component with their value to be validated. it maps the parameter names to their value.
-
setParameterBulk
Set one or more configuration parameters to a new value. Configuration parameters that have been set by this method must have been set to the value defined in the passed map, otherwise the framework will detect it and throw aBulkSettingException. All parameters present in the passed map do not have to be handled by this method : the parameters that have not been set at this step will be set by the framework using an available setter method, or directly on the corresponding fields using introspection. This method is called by the framework only when necessary. Final configuration parameters will be involved in this step only during the initial safe or build step if they have been changed.- Parameters:
parametersView- a map of the parameters that have changed and need to be set. The map contains the name of the parameters that are to be set and their new value.
-