Package com.onec.rules
Class BusinessRuleValidator
java.lang.Object
com.onec.rules.BusinessRuleValidator
Evaluates a
Validated entity's typed BusinessRules before write and before
posting. Collects all failures (a field-scoped rule attaches to its field; a
cross-field rule to the form) so the caller can report them together rather than one at a time.
No expression parsing — the rules are plain Java predicates.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcollect(Object target, ValidationErrors errors) Collect every failing rule intoerrors(field- or form-scoped).voidCollect failures and throw aValidationExceptionif any.
-
Constructor Details
-
BusinessRuleValidator
public BusinessRuleValidator()
-
-
Method Details
-
collect
Collect every failing rule intoerrors(field- or form-scoped). -
validate
Collect failures and throw aValidationExceptionif any.
-