@Validator public final class CustomValidatorOperation extends Object
ValidationExtension which is capable of executing custom validators provided by a third
party. The Validator can be provided via a CustomValidatorFactory which means that the user could have specified either a
classname or a named reference to it.
If the user provided a classname, then the Class that it represents is expected to have a default public constructor
which can be used to instantiate it.
If the Validator is provided via a reference, then a lookup to the MuleRegistry will be performed.
In either case, the referenced Validator is expected to be reusable and thread-safe. If you used a reference, then that
reference will most likely always point to the same instance. If you use a class, then an instance will be created and reused.| Modifier and Type | Field and Description |
|---|---|
protected static String |
ERROR_GROUP |
protected static org.slf4j.Logger |
LOGGER |
| Constructor and Description |
|---|
CustomValidatorOperation() |
| Modifier and Type | Method and Description |
|---|---|
protected ValidationContext |
createContext(ValidationOptions options,
ValidationExtension config) |
void |
customValidator(CustomValidatorFactory source,
ValidationOptions options,
ValidationExtension config) |
protected void |
logSuccessfulValidation(Validator validator) |
protected Locale |
parseLocale(String locale) |
protected void |
validateWith(Validator validator,
ValidationContext validationContext) |
protected static final String ERROR_GROUP
protected static final org.slf4j.Logger LOGGER
@Throws(value=BasicValidationErrorType.class) public void customValidator(@Placement(order=0) @ParameterGroup(name="Validator") CustomValidatorFactory source, @Placement(order=1) @ParameterGroup(name="Error options") ValidationOptions options, @Config ValidationExtension config) throws Exception
Exceptionprotected void logSuccessfulValidation(Validator validator)
protected void validateWith(Validator validator, ValidationContext validationContext) throws Exception
Exceptionprotected ValidationContext createContext(ValidationOptions options, ValidationExtension config)
Copyright © 2017 MuleSoft, Inc.. All rights reserved.