@Extension(name="validation", description="Mule Validation Extension", version="3.7") @Operations(value={CommonValidationOperations.class,CustomValidatorOperation.class,ValidationStrategies.class,NumberValidationOperation.class}) @Xml(schemaLocation="http://www.mulesoft.org/schema/mule/validation", namespace="validation", schemaVersion="3.7") @Extensible(alias="validator-message-processor") public class ValidationExtension extends Object implements Config, Initialisable, MuleContextAware
Validator
s as Extension
Operation
s
This class not only defines the extension but also acts as the only available Configuration
for it. It allows parametrizing the Validator
s 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 |
PHASE_NAME
Constructor and Description |
---|
ValidationExtension() |
Modifier and Type | Method and Description |
---|---|
ExceptionFactory |
getExceptionFactory() |
ValidationMessages |
getMessageFactory() |
void |
initialise()
Method used to perform any initialisation work.
|
void |
setMuleContext(MuleContext muleContext) |
public static final String DEFAULT_LOCALE
public void initialise() throws InitialisationException
Initialisable
InitialisationException
should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException
should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.initialise
in interface Initialisable
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdownRecoverableException
- if an error occurs that can be recovered frompublic ValidationMessages getMessageFactory()
public void setMuleContext(MuleContext muleContext)
setMuleContext
in interface MuleContextAware
public ExceptionFactory getExceptionFactory()
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.