Package org.deltafi.common.rules
Class RuleEvaluator
java.lang.Object
org.deltafi.common.rules.RuleEvaluator
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordHolds a copy of the DeltaFile metadata and content list to prevent SpEL expressions from modifying the original DeltaFile -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanevaluateCondition(String condition, DeltaFile deltaFile) Evaluate the condition against the given DeltaFile.voidvalidateCondition(String condition) Validate the condition loads and can be evaluated against a sample DeltaFile
-
Constructor Details
-
RuleEvaluator
public RuleEvaluator()
-
-
Method Details
-
validateCondition
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
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 evaluatedeltaFile- used in the evaluation- Returns:
- the result of evaluating the condition
-