Class AbstractTmaPolicyStatementValidator

    • Constructor Detail

      • AbstractTmaPolicyStatementValidator

        public AbstractTmaPolicyStatementValidator()
    • Method Detail

      • validatePolicyStatement

        @Deprecated(since="1911",
                    forRemoval=true)
        public boolean validatePolicyStatement​(TmaPolicyStatementModel statement,
                                               java.util.List<TmaPolicyContext> contexts)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Validates a TmaPolicyStatementModel against a set of product offerings parameters.
        Parameters:
        statement - compatibility policy statement
        contexts - product offerings parameters considered for validation
        Returns:
        true if the statement is valid for the product offerings list, false otherwise
      • retrieveApplicableContexts

        public abstract java.util.List<TmaPolicyContext> retrieveApplicableContexts​(TmaPolicyStatementModel statement,
                                                                                    java.util.List<TmaPolicyContext> contexts)
        Returns the list of contexts for which the statement is valid against
        Parameters:
        statement - the statement to be validated
        contexts - the contexts to be validated against
        Returns:
        the list of contexts for which the statement is valid against
      • checkQuantity

        protected boolean checkQuantity​(java.lang.Integer quantity,
                                        java.lang.Integer min,
                                        java.lang.Integer max)
        Checks if the given quantity is between the min and max limits.
        Parameters:
        quantity - quantity to be verified
        min - minimum limit
        max - maximum limit
        Returns:
        true if the number is between min and max, false otherwise