Class RuleProxy

java.lang.Object
eu.europa.ec.taxud.validation.rules.api.RuleProxy

public class RuleProxy extends Object
Main class to create rule proxies for annotated JAVA rules.
  • Constructor Details

    • RuleProxy

      public RuleProxy(Object target)
      Constructor that initialize the target rule.
      Parameters:
      target - the target rule.
  • Method Details

    • validate

      public void validate(Object message, ValidationContext context) throws Exception
      Call the validation method of the target rule.
      Parameters:
      message - the message.
      context - the context.
      Throws:
      Exception - in case of exception
    • condition

      public boolean condition(Object message, ValidationContext context) throws Exception
      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

      public void logExecutionTime(ValidationContext context)
      Log execution time of the target rule.
      Parameters:
      context - the context.