Interface IConstraint

All Superinterfaces:
IBusinessRule, Serializable
All Known Implementing Classes:
ConstraintRule, FailedConstraint, XmlConstraint, XmlConstraint

public interface IConstraint extends IBusinessRule
Interface for a constraint type business rule. A constraint is used to determine the sub-set of values that are valid within the context.
Since:
5.0
Author:
O. Kerpershoek
  • Method Details

    • narrow

      List<IPrimitiveValue> narrow(InferenceContext context, List<IPrimitiveValue> currentValues)
      This method should narrow the current set of values and return a new set containing only the values that are valid for this constraint. This method is not allowed to add any value that is not present in the original set of current values.
      Parameters:
      context - InferenceContext
      currentValues - Collection
      Returns:
      List containing the subset of current values that are valid for this constraint.
      Throws:
      RuleEngineException - This exception is thrown when the rule failed due to an error.