Class RuleProxy
java.lang.Object
eu.europa.ec.taxud.validation.rules.api.RuleProxy
Main class to create rule proxies for annotated JAVA rules.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancondition(Object message, ValidationContext context) Condition of execution of the target rule.voidlogExecutionTime(ValidationContext context) Log execution time of the target rule.voidvalidate(Object message, ValidationContext context) Call the validation method of the target rule.
-
Constructor Details
-
RuleProxy
Constructor that initialize the target rule.- Parameters:
target- the target rule.
-
-
Method Details
-
validate
Call the validation method of the target rule.- Parameters:
message- the message.context- the context.- Throws:
Exception- in case of exception
-
condition
Condition of execution of the target rule.- Parameters:
message- the message.context- the context.- Returns:
- Return true if the rule can be executed.
- Throws:
Exception- in case of exception
-
logExecutionTime
Log execution time of the target rule.- Parameters:
context- the context.
-