Class RuleEvaluator

java.lang.Object
org.deltafi.common.rules.RuleEvaluator

@Service public class RuleEvaluator extends Object
  • Constructor Details

    • RuleEvaluator

      public RuleEvaluator()
  • Method Details

    • validateCondition

      public void validateCondition(String condition) throws IllegalArgumentException
      Validate the condition loads and can be evaluated against a sample DeltaFile
      Parameters:
      condition - to validate
      Throws:
      IllegalArgumentException - if the condition results in an exception
    • evaluateCondition

      public boolean evaluateCondition(String condition, org.deltafi.common.types.DeltaFile deltaFile)
      Evaluate the condition against the given DeltaFile. A null condition will result in true. An invalid condition results in false.
      Parameters:
      condition - SPeL expression to evaluate
      deltaFile - used in the evaluation
      Returns:
      the result of evaluating the condition