Package eu.europa.ec.taxud.validation
Class ValidationManager
java.lang.Object
eu.europa.ec.taxud.validation.ValidationManager
ValidationManager loads and executes all registered ValidationHandler.-
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new validation manager and load all registeredValidationHandlerusing service-provider loading facility. -
Method Summary
Modifier and TypeMethodDescriptionGets available business rules.process(ValidationRequest validationRequest, ValidationContext context) Executes all registered validation handlers on aValidationRequestcontent.process(ValidationInput source, ValidationContext context) Executes all registered validation handlers on aValidationInputcontent.process(ValidationContext context, String[] args) Triggers all the appropriate handlers for validation and returns the errors as string
-
Constructor Details
-
ValidationManager
public ValidationManager()Instantiates a new validation manager and load all registeredValidationHandlerusing service-provider loading facility.
-
-
Method Details
-
process
Executes all registered validation handlers on aValidationInputcontent. OnlyValidationHandlerthat can process the specific content type are executed.- Parameters:
source- Source's content and type.context- with all information related and stored during validation process.- Returns:
- the validation result
- Throws:
ValidationException- Validation exception.
-
process
Triggers all the appropriate handlers for validation and returns the errors as string- Parameters:
context- the validation context that will hold the errors of the validation and other validation propertiesargs- the arguments provided by the user (i,e path of the file to be validated)- Returns:
- the validation errors as string
- Throws:
ValidationException- if no handler is found or an internal validation error occurs
-
process
public ValidationResult process(ValidationRequest validationRequest, ValidationContext context) throws ValidationException Executes all registered validation handlers on aValidationRequestcontent. OnlyValidationHandlerthat can process the specific content type are executed.- Parameters:
validationRequest- Source's content and type.context- The validation context- Returns:
- the validation result
- Throws:
ValidationException- Validation exception.
-
getAvailableBusinessRules
Gets available business rules.- Parameters:
context- the context- Returns:
- the available business rules
- Throws:
ValidationException- the validation exception
-