Package eu.europa.ec.taxud.validation
Class ValidationHandler
java.lang.Object
eu.europa.ec.taxud.handler.AbstractHandler
eu.europa.ec.taxud.validation.ValidationHandler
ValidationHandler is dedicated validation handler for content type. A handler specifies how to validate a
message type it can handle.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidadditionalAttributesProcess(ValidationContext context, ValidationRequest validationRequest) Process the information contains in Additional Attributes of the request.Gets available business rules.Return the configuration.abstract StringhandleErrors(ValidationContext context) Generic method that creates a string representation of the errorsbooleaninitContext(ValidationContext context) Generic Init method to initialize the ValidationContext component (such as Validator, Reader).booleaninitContext(ValidationContext context, ValidationRequest validationRequest) Initialise ValidationContext based on ValidationRequest of the EVM interfaces.abstract ValidationInputCreates aValidationInputaccording to the arguments provided (i.e.process(ValidationInput input, ValidationContext context) Process a ValidationInput with a specific ValidationContext.Methods inherited from class eu.europa.ec.taxud.handler.AbstractHandler
initContext, isApplicationDomainSupported, loadConfig, printHelp, validateContext
-
Constructor Details
-
ValidationHandler
public ValidationHandler()
-
-
Method Details
-
initContext
Generic Init method to initialize the ValidationContext component (such as Validator, Reader).- Overrides:
initContextin classAbstractHandler- Parameters:
context- Validation context- Returns:
- boolean Is the handler applicable for input message
- Throws:
ValidationException- Initialisation exception
-
process
Process a ValidationInput with a specific ValidationContext.- Parameters:
input- The input message to validatecontext- The validation context- Returns:
- the validation result
- Throws:
ValidationException- Validation exception
-
handleErrors
Generic method that creates a string representation of the errors- Parameters:
context- the validation context containing the errors- Returns:
- the errors as string
-
getConfig
Return the configuration.- Returns:
- Properties The handler configuration.
-
initInput
Creates aValidationInputaccording to the arguments provided (i.e. filename of the xml to be validated)- Parameters:
args- the arguments provided by the user- Returns:
- the validation input
-
initContext
Initialise ValidationContext based on ValidationRequest of the EVM interfaces. Initialises the context for this validator according the provided arguments.- Parameters:
context- The validation contextvalidationRequest- the request- Returns:
- true if the context is initialized
-
additionalAttributesProcess
protected void additionalAttributesProcess(ValidationContext context, ValidationRequest validationRequest) Process the information contains in Additional Attributes of the request.- Parameters:
context- the contextvalidationRequest- the request
-
getAvailableBusinessRules
Gets available business rules.- Parameters:
context- the context- Returns:
- the available business rules
-