public class MacroComponentValidator
extends com.highdeal.pnr.domain.RateComponentValidator
validator for macro component.
Very light validation in order not to break compatibility with previous models.
Assumption: Validation is called first, maybe model is invalid, maybe pricing macro does not exist, but it must not lead to an error
As a consequence, some validation can be done only if objects exists or are valid, otherwise validator does nothing and we expect another
java class to do the validation later on.| Constructor and Description |
|---|
MacroComponentValidator() |
| Modifier and Type | Method and Description |
|---|---|
void |
validateRateComponent(RateComponentModel e,
com.highdeal.util.validation.UniqueNamesListContext c)
Performs specific validation on the
RateComponentModel.Basic validation (such as name, description, number of children) is already performed when this method is called. |
void |
validateRateComponentStrict(RateComponentModel rcm,
com.highdeal.util.validation.UniqueNamesListContext context)
Performs specific validation on the
RateComponentModel in a stricter way.Basic validation (such as name, description, number of children) is already performed when this method is called. |
public void validateRateComponent(RateComponentModel e, com.highdeal.util.validation.UniqueNamesListContext c) throws com.highdeal.util.validation.ValidationErrorException
com.highdeal.pnr.domain.RateComponentValidator
Performs specific validation on the RateComponentModel.
Basic validation (such as name, description, number of children) is already performed when this method is called.
This method must contain all validations performed on components introduced after CC 5.0 SP 2.
validateRateComponent in class com.highdeal.pnr.domain.RateComponentValidatore - the rate component to validatec - the context used during the validation of the object. Anything could be store inside in order to ease the validation or to share data.com.highdeal.util.validation.ValidationErrorException - the exception is thrown when the object isn't validate by the Validator, it isn't thrown if the object is valid.public void validateRateComponentStrict(RateComponentModel rcm, com.highdeal.util.validation.UniqueNamesListContext context) throws com.highdeal.util.validation.ValidationErrorException
com.highdeal.pnr.domain.RateComponentValidator
Performs specific validation on the RateComponentModel in a stricter way.
Basic validation (such as name, description, number of children) is already performed when this method is called.
This method is called only if the system parameter PRICING_LOGIC_STRICT_VALIDATION_ENABLED is set to "true".
As such, the implementation of the corresponding RateComponentEntity.rate(RatingContext, ILineItem) method must properly handle
the case when the validations of this method were not performed.
>
This method must follow these rules:
This method is called after RateComponentValidator.validateRateComponent(RateComponentModel, UniqueNamesListContext).
validateRateComponentStrict in class com.highdeal.pnr.domain.RateComponentValidatorrcm - the rate component to validatecontext - the context used during the validation of the object. Anything could be store inside in order to ease the validation or to share data.com.highdeal.util.validation.ValidationErrorException - the exception is thrown when the object isn't validate by the Validator, it isn't thrown if the object is valid.