Class AbstractTmaPolicyStatementValidator
java.lang.Object
de.hybris.platform.b2ctelcoservices.compatibility.validators.AbstractTmaPolicyStatementValidator
- Direct Known Subclasses:
TmaConfigurablePscvPolicyStatementValidator,TmaPoChecklistPolicyStatementValidator,TmaPoGroupStatementValidator,TmaPoStatementValidator,TmaProcessTypesStatementValidator,TmaProductSpecificationStatementValidator,TmaProductStatusPolicyStatementValidator,TmaPsChecklistPolicyStatementValidator,TmaPscvStatementValidator,TmaRemainingCommittedPeriodStatementValidator,TmaSubscribedPoStatementValidator
Validator responsible for validating
TmaPolicyStatementModel.- Since:
- 6.7
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancheckQuantity(Integer quantity, Integer min, Integer max) Checks if the given quantity is between the min and max limits.abstract List<TmaPolicyContext>retrieveApplicableContexts(TmaPolicyStatementModel statement, List<TmaPolicyContext> contexts) Returns the list of contexts for which the statement is valid againstbooleanvalidatePolicyStatement(TmaPolicyStatementModel statement, List<TmaPolicyContext> contexts) Deprecated, for removal: This API element is subject to removal in a future version.since 1911.
-
Constructor Details
-
AbstractTmaPolicyStatementValidator
public AbstractTmaPolicyStatementValidator()
-
-
Method Details
-
validatePolicyStatement
@Deprecated(since="1911", forRemoval=true) public boolean validatePolicyStatement(TmaPolicyStatementModel statement, List<TmaPolicyContext> contexts) Deprecated, for removal: This API element is subject to removal in a future version.since 1911. Use insteadretrieveApplicableContexts(TmaPolicyStatementModel, List)Validates aTmaPolicyStatementModelagainst a set of product offerings parameters.- Parameters:
statement- compatibility policy statementcontexts- product offerings parameters considered for validation- Returns:
- true if the statement is valid for the product offerings list, false otherwise
-
retrieveApplicableContexts
public abstract List<TmaPolicyContext> retrieveApplicableContexts(TmaPolicyStatementModel statement, List<TmaPolicyContext> contexts) Returns the list of contexts for which the statement is valid against- Parameters:
statement- the statement to be validatedcontexts- the contexts to be validated against- Returns:
- the list of contexts for which the statement is valid against
-
checkQuantity
Checks if the given quantity is between the min and max limits.- Parameters:
quantity- quantity to be verifiedmin- minimum limitmax- maximum limit- Returns:
- true if the number is between min and max, false otherwise
-