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 -
Method Summary
Modifier and TypeMethodDescriptionhandleErrors(eu.europa.ec.taxud.validation.ValidationContext context) Creates a string representation of the errors.booleaninitContext(eu.europa.ec.taxud.validation.ValidationContext context) Initialises the context. initialises the namespaces, XSDValidator and DroolsValidator and provides them to the context.booleaninitContext(eu.europa.ec.taxud.validation.ValidationContext context, eu.europa.ec.taxud.message.ValidationRequest validationRequest) booleaninitContext(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.ValidationInputCreates aValidationInputaccording 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, getConfigMethods inherited from class eu.europa.ec.taxud.handler.AbstractHandler
isApplicationDomainSupported, loadConfig, printHelp, validateContext
-
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:
initContextin classeu.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
Initialises the context for this validator according the provided arguments.- Specified by:
initContextin classeu.europa.ec.taxud.handler.AbstractHandler- Parameters:
context- the validation contextargs- 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:
initContextin classeu.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:
processin classeu.europa.ec.taxud.validation.ValidationHandler- Parameters:
input- The input message to validatecontext- The validation context- Throws:
eu.europa.ec.taxud.validation.ValidationException
-
initInput
Creates aValidationInputaccording to the arguments provided (i.e. filename of the xml to be validated).- Specified by:
initInputin classeu.europa.ec.taxud.validation.ValidationHandler- Parameters:
args- the arguments provided by the user- Returns:
- the validation input
-
handleErrors
Creates a string representation of the errors.- Specified by:
handleErrorsin classeu.europa.ec.taxud.validation.ValidationHandler- Parameters:
context- the Validation Context containing the errors
-