@Component(value="cuba_BeanValidation") public class BeanValidationImpl extends java.lang.Object implements BeanValidation
Modifier and Type | Class and Description |
---|---|
protected static class |
BeanValidationImpl.CubaFutureOrPresentValidatorForDate |
protected static class |
BeanValidationImpl.CubaFutureValidatorForDate |
protected static class |
BeanValidationImpl.CubaPastOrPresentValidatorForDate |
protected static class |
BeanValidationImpl.CubaPastValidatorForDate |
BeanValidation.ValidationOptions
Modifier and Type | Field and Description |
---|---|
protected EntityStates |
entityStates |
protected Messages |
messages |
protected Metadata |
metadata |
static BeanValidation.ValidationOptions |
NO_VALIDATION_OPTIONS |
protected TimeSource |
timeSource |
protected UserSessionSource |
userSessionSource |
protected java.util.concurrent.ConcurrentHashMap<java.util.Locale,javax.validation.ValidatorFactory> |
validatorFactoriesCache |
NAME
Constructor and Description |
---|
BeanValidationImpl() |
Modifier and Type | Method and Description |
---|---|
protected java.util.Locale |
getCurrentLocale() |
javax.validation.Validator |
getValidator()
Get default validator for current locale if there is current UserSession or with default locale.
|
javax.validation.Validator |
getValidator(org.hibernate.validator.cfg.ConstraintMapping constraintMapping)
Get validator with custom constraint mapping and current locale if there is current UserSession or with default locale.
|
javax.validation.Validator |
getValidator(org.hibernate.validator.cfg.ConstraintMapping constraintMapping,
BeanValidation.ValidationOptions options)
Get validator with custom constraint mapping and additional validation options.
|
protected org.hibernate.validator.HibernateValidatorConfiguration |
getValidatorFactoryConfiguration(java.util.Locale locale) |
protected javax.validation.Validator |
getValidatorWithDefaultFactory(java.util.Locale locale) |
protected void |
registerFutureOrPresentValidators(org.hibernate.validator.cfg.context.ConstraintDefinitionContext<javax.validation.constraints.FutureOrPresent> context) |
protected void |
registerFutureValidators(org.hibernate.validator.cfg.context.ConstraintDefinitionContext<javax.validation.constraints.Future> context) |
protected void |
registerPastOrPresentValidators(org.hibernate.validator.cfg.context.ConstraintDefinitionContext<javax.validation.constraints.PastOrPresent> context) |
protected void |
registerPastValidators(org.hibernate.validator.cfg.context.ConstraintDefinitionContext<javax.validation.constraints.Past> context) |
public static final BeanValidation.ValidationOptions NO_VALIDATION_OPTIONS
@Inject protected Messages messages
@Inject protected Metadata metadata
@Inject protected TimeSource timeSource
@Inject protected UserSessionSource userSessionSource
@Inject protected EntityStates entityStates
protected java.util.concurrent.ConcurrentHashMap<java.util.Locale,javax.validation.ValidatorFactory> validatorFactoriesCache
public javax.validation.Validator getValidator()
BeanValidation
getValidator
in interface BeanValidation
public javax.validation.Validator getValidator(org.hibernate.validator.cfg.ConstraintMapping constraintMapping)
BeanValidation
getValidator
in interface BeanValidation
constraintMapping
- constraint mappingpublic javax.validation.Validator getValidator(@Nullable org.hibernate.validator.cfg.ConstraintMapping constraintMapping, BeanValidation.ValidationOptions options)
BeanValidation
getValidator
in interface BeanValidation
constraintMapping
- constraint mappingoptions
- optionsprotected javax.validation.Validator getValidatorWithDefaultFactory(java.util.Locale locale)
protected org.hibernate.validator.HibernateValidatorConfiguration getValidatorFactoryConfiguration(java.util.Locale locale)
protected java.util.Locale getCurrentLocale()
protected void registerPastValidators(org.hibernate.validator.cfg.context.ConstraintDefinitionContext<javax.validation.constraints.Past> context)
protected void registerPastOrPresentValidators(org.hibernate.validator.cfg.context.ConstraintDefinitionContext<javax.validation.constraints.PastOrPresent> context)
protected void registerFutureValidators(org.hibernate.validator.cfg.context.ConstraintDefinitionContext<javax.validation.constraints.Future> context)
protected void registerFutureOrPresentValidators(org.hibernate.validator.cfg.context.ConstraintDefinitionContext<javax.validation.constraints.FutureOrPresent> context)