Class ValidationHandlerDAC8

java.lang.Object
eu.europa.ec.taxud.handler.AbstractHandler
eu.europa.ec.taxud.validation.ValidationHandler
eu.europa.ec.taxud.dac8.vm.validation.ValidationHandlerDAC8

public class ValidationHandlerDAC8 extends eu.europa.ec.taxud.validation.ValidationHandler
ValidationHandlerDAC8 handles the validation of a message.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    handleErrors(eu.europa.ec.taxud.validation.ValidationContext context)
    Creates a string representation of the errors.
    boolean
    initContext(eu.europa.ec.taxud.validation.ValidationContext context)
    Initialises the context. initialises the namespaces, XSDValidator and DroolsValidator and provides them to the context.
    boolean
    initContext(eu.europa.ec.taxud.validation.ValidationContext context, eu.europa.ec.taxud.message.ValidationRequest validationRequest)
     
    boolean
    initContext(eu.europa.ec.taxud.validation.ValidationContext context, String[] args)
    Initialises the context for this validator according the provided arguments.
    eu.europa.ec.taxud.validation.input.ValidationInput
    initInput(String[] args)
    Creates a ValidationInput according to the arguments provided (i.e. filename of the xml to be validated).
    process(eu.europa.ec.taxud.validation.input.ValidationInput input, eu.europa.ec.taxud.validation.ValidationContext context)
    Process a ValidationInput with a specific ValidationContext.

    Methods inherited from class eu.europa.ec.taxud.validation.ValidationHandler

    additionalAttributesProcess, getAvailableBusinessRules, getConfig

    Methods inherited from class eu.europa.ec.taxud.handler.AbstractHandler

    isApplicationDomainSupported, loadConfig, printHelp, validateContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ValidationHandlerDAC8

      public ValidationHandlerDAC8()
      Default constructor.
  • Method Details

    • initContext

      public boolean initContext(eu.europa.ec.taxud.validation.ValidationContext context) throws eu.europa.ec.taxud.validation.ValidationException
      Initialises the context. initialises the namespaces, XSDValidator and DroolsValidator and provides them to the context.
      Overrides:
      initContext in class eu.europa.ec.taxud.validation.ValidationHandler
      Returns:
      true if the handler can handle this validation which is when the messageType of the message (provided by the context) denotes a DAC8 initial , correction, Technical Error Message.
      Throws:
      eu.europa.ec.taxud.validation.ValidationException
    • initContext

      public boolean initContext(eu.europa.ec.taxud.validation.ValidationContext context, String[] args)
      Initialises the context for this validator according the provided arguments.
      Specified by:
      initContext in class eu.europa.ec.taxud.handler.AbstractHandler
      Parameters:
      context - the validation context
      args - the arguments provided by the user
      Returns:
      true if the context is successfully initialised
    • initContext

      public boolean initContext(eu.europa.ec.taxud.validation.ValidationContext context, eu.europa.ec.taxud.message.ValidationRequest validationRequest)
      Overrides:
      initContext in class eu.europa.ec.taxud.validation.ValidationHandler
    • process

      public String process(eu.europa.ec.taxud.validation.input.ValidationInput input, eu.europa.ec.taxud.validation.ValidationContext context) throws eu.europa.ec.taxud.validation.ValidationException
      Process a ValidationInput with a specific ValidationContext. In addition, it reports on log level trace the status (passed / failed / not applicable) for each rule.
      Overrides:
      process in class eu.europa.ec.taxud.validation.ValidationHandler
      Parameters:
      input - The input message to validate
      context - The validation context
      Throws:
      eu.europa.ec.taxud.validation.ValidationException
    • initInput

      public eu.europa.ec.taxud.validation.input.ValidationInput initInput(String[] args)
      Creates a ValidationInput according to the arguments provided (i.e. filename of the xml to be validated).
      Specified by:
      initInput in class eu.europa.ec.taxud.validation.ValidationHandler
      Parameters:
      args - the arguments provided by the user
      Returns:
      the validation input
    • handleErrors

      public String handleErrors(eu.europa.ec.taxud.validation.ValidationContext context)
      Creates a string representation of the errors.
      Specified by:
      handleErrors in class eu.europa.ec.taxud.validation.ValidationHandler
      Parameters:
      context - the Validation Context containing the errors