@Extension(name="Validation",
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/org/mule/runtime/core/i18n/validation-messages.properties")
@ErrorTypes(value=ValidationErrorTypes.class)
@OnException(value=ValidationExceptionEnricher.class)
@Throws(value=ValidationErrorTypeProvider.class)
public class ValidationExtension
extends Object
implements org.mule.runtime.core.api.config.Config, org.mule.runtime.api.meta.NamedObject, org.mule.runtime.api.lifecycle.Initialisable
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 i18n bundles (through a I18NConfig| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_LOCALE |
| Constructor and Description |
|---|
ValidationExtension() |
| Modifier and Type | Method and Description |
|---|---|
ValidationMessages |
getMessageFactory() |
org.mule.runtime.core.api.MuleContext |
getMuleContext() |
String |
getName() |
void |
initialise() |
public 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 String getName()
getName in interface org.mule.runtime.api.meta.NamedObjectpublic org.mule.runtime.core.api.MuleContext getMuleContext()
Copyright © 2017 MuleSoft, Inc.. All rights reserved.