@Extension(name="Validation Module",
description="Allows performing validations and throw an Exception if the validation fails")
@Operations(value={CommonValidationOperations.class,CustomValidatorOperation.class,ValidationStrategies.class,NumberValidationOperation.class})
@Extensible(alias="validator-message-processor")
@Export(resources="/META-INF/services/org/mule/runtime/core/i18n/validation-messages.properties")
public class ValidationExtension
extends AbstractAnnotatedObject
implements Config, org.mule.runtime.api.meta.NamedObject, org.mule.runtime.api.lifecycle.Initialisable, MuleContextAware
Validators as ExtensionModel
OperationModels
This class not only defines the extension but also acts as the only available ConfigurationModel for it. It allows
parametrizing the Validators with custom ExceptionFactory and i18n bundles (through a I18NConfig
THe configured ExceptionFactory (either user provided or default) is registered into the MuleRegistry allowing
it to participate on the mule lifecycle.| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_LOCALE |
| Constructor and Description |
|---|
ValidationExtension() |
| Modifier and Type | Method and Description |
|---|---|
ExceptionFactory |
getExceptionFactory() |
ValidationMessages |
getMessageFactory() |
String |
getName() |
void |
initialise() |
void |
setMuleContext(MuleContext muleContext) |
getAnnotation, getAnnotations, setAnnotationspublic static final String DEFAULT_LOCALE
public void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionpublic ValidationMessages getMessageFactory()
public void setMuleContext(MuleContext muleContext)
setMuleContext in interface MuleContextAwarepublic ExceptionFactory getExceptionFactory()
public String getName()
getName in interface org.mule.runtime.api.meta.NamedObjectCopyright © 2003–2016 MuleSoft, Inc.. All rights reserved.