@ConfigurationProperties(value="micronaut.validator") public class DefaultValidatorConfiguration extends java.lang.Object implements ValidatorConfiguration, Toggleable, javax.validation.ValidatorContext
ENABLED, PREFIX
Constructor and Description |
---|
DefaultValidatorConfiguration() |
Modifier and Type | Method and Description |
---|---|
javax.validation.ValidatorContext |
addValueExtractor(javax.validation.valueextraction.ValueExtractor<?> extractor) |
javax.validation.ValidatorContext |
clockProvider(javax.validation.ClockProvider clockProvider) |
javax.validation.ValidatorContext |
constraintValidatorFactory(javax.validation.ConstraintValidatorFactory factory) |
javax.validation.ClockProvider |
getClockProvider() |
ConstraintValidatorRegistry |
getConstraintValidatorRegistry() |
ExecutionHandleLocator |
getExecutionHandleLocator()
The execution handler locator to use.
|
MessageSource |
getMessageSource() |
javax.validation.TraversableResolver |
getTraversableResolver() |
javax.validation.Validator |
getValidator() |
ValueExtractorRegistry |
getValueExtractorRegistry() |
boolean |
isEnabled() |
javax.validation.ValidatorContext |
messageInterpolator(javax.validation.MessageInterpolator messageInterpolator) |
javax.validation.ValidatorContext |
parameterNameProvider(javax.validation.ParameterNameProvider parameterNameProvider) |
DefaultValidatorConfiguration |
setClockProvider(javax.validation.ClockProvider clockProvider)
Sets the clock provider to use.
|
DefaultValidatorConfiguration |
setConstraintValidatorRegistry(ConstraintValidatorRegistry constraintValidatorRegistry)
Sets the constraint validator registry to use.
|
DefaultValidatorConfiguration |
setEnabled(boolean enabled)
Sets whether Micronaut's validator is enabled.
|
DefaultValidatorConfiguration |
setExecutionHandleLocator(ExecutionHandleLocator executionHandleLocator)
Sets the execution handler locator to use.
|
DefaultValidatorConfiguration |
setMessageSource(MessageSource messageSource)
Sets the message source to use.
|
DefaultValidatorConfiguration |
setTraversableResolver(javax.validation.TraversableResolver traversableResolver)
Sets the traversable resolver to use.
|
DefaultValidatorConfiguration |
setValueExtractorRegistry(ValueExtractorRegistry valueExtractorRegistry)
Sets the value extractor registry use.
|
javax.validation.ValidatorContext |
traversableResolver(javax.validation.TraversableResolver traversableResolver) |
@NonNull public ConstraintValidatorRegistry getConstraintValidatorRegistry()
getConstraintValidatorRegistry
in interface ValidatorConfiguration
public boolean isEnabled()
isEnabled
in interface Toggleable
public DefaultValidatorConfiguration setEnabled(boolean enabled)
enabled
- True if it is@Inject public DefaultValidatorConfiguration setConstraintValidatorRegistry(@Nullable ConstraintValidatorRegistry constraintValidatorRegistry)
constraintValidatorRegistry
- The registry to use@NonNull public ValueExtractorRegistry getValueExtractorRegistry()
getValueExtractorRegistry
in interface ValidatorConfiguration
@Inject public DefaultValidatorConfiguration setValueExtractorRegistry(@Nullable ValueExtractorRegistry valueExtractorRegistry)
valueExtractorRegistry
- The registry@NonNull public javax.validation.ClockProvider getClockProvider()
getClockProvider
in interface ValidatorConfiguration
@Inject public DefaultValidatorConfiguration setClockProvider(@Nullable javax.validation.ClockProvider clockProvider)
clockProvider
- The clock provider@NonNull public javax.validation.TraversableResolver getTraversableResolver()
getTraversableResolver
in interface ValidatorConfiguration
@Inject public DefaultValidatorConfiguration setTraversableResolver(@Nullable javax.validation.TraversableResolver traversableResolver)
traversableResolver
- The resolver@NonNull public MessageSource getMessageSource()
getMessageSource
in interface ValidatorConfiguration
@Inject public DefaultValidatorConfiguration setMessageSource(@Nullable MessageSource messageSource)
messageSource
- The message source@NonNull public ExecutionHandleLocator getExecutionHandleLocator()
ValidatorConfiguration
getExecutionHandleLocator
in interface ValidatorConfiguration
@Inject public DefaultValidatorConfiguration setExecutionHandleLocator(@Nullable ExecutionHandleLocator executionHandleLocator)
executionHandleLocator
- The locatorpublic javax.validation.ValidatorContext messageInterpolator(javax.validation.MessageInterpolator messageInterpolator)
messageInterpolator
in interface javax.validation.ValidatorContext
public javax.validation.ValidatorContext traversableResolver(javax.validation.TraversableResolver traversableResolver)
traversableResolver
in interface javax.validation.ValidatorContext
public javax.validation.ValidatorContext constraintValidatorFactory(javax.validation.ConstraintValidatorFactory factory)
constraintValidatorFactory
in interface javax.validation.ValidatorContext
public javax.validation.ValidatorContext parameterNameProvider(javax.validation.ParameterNameProvider parameterNameProvider)
parameterNameProvider
in interface javax.validation.ValidatorContext
public javax.validation.ValidatorContext clockProvider(javax.validation.ClockProvider clockProvider)
clockProvider
in interface javax.validation.ValidatorContext
public javax.validation.ValidatorContext addValueExtractor(javax.validation.valueextraction.ValueExtractor<?> extractor)
addValueExtractor
in interface javax.validation.ValidatorContext
public javax.validation.Validator getValidator()
getValidator
in interface javax.validation.ValidatorContext