Package com.vaadin.v7.data.validator
Class BeanValidator
- java.lang.Object
-
- com.vaadin.v7.data.validator.BeanValidator
-
- All Implemented Interfaces:
Validator,Serializable
@Deprecated public class BeanValidator extends Object implements Validator
Deprecated.SeeBeanValidationBinderandBeanValidatorVaadinValidatorusing the JSR-303 (javax.validation) annotation-based bean validation. The annotations of the fields of the beans are used to determine the validation to perform. Note that a JSR-303 implementation (e.g. Hibernate Validator or Apache Bean Validation - formerly agimatec validation) must be present on the project classpath when using bean validation.- Since:
- 7.0
- Author:
- Petri Hakala, Henri Sara
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classBeanValidator.SimpleContextDeprecated.-
Nested classes/interfaces inherited from interface com.vaadin.v7.data.Validator
Validator.EmptyValueException, Validator.InvalidValueException
-
-
Constructor Summary
Constructors Constructor Description BeanValidator(Class<?> beanClass, String propertyName)Deprecated.Creates a VaadinValidatorutilizing JSR-303 bean validation.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected javax.validation.ValidatorgetJavaxBeanValidator()Deprecated.Returns a shared Validator instance to use.protected static javax.validation.ValidatorFactorygetJavaxBeanValidatorFactory()Deprecated.Returns the underlying JSR-303 bean validator factory used.LocalegetLocale()Deprecated.Gets the locale used for validation error messages.voidsetLocale(Locale locale)Deprecated.Sets the locale used for validation error messages.voidvalidate(Object value)Deprecated.Checks the given value against this validator.
-
-
-
Method Detail
-
validate
public void validate(Object value) throws Validator.InvalidValueException
Deprecated.Description copied from interface:ValidatorChecks the given value against this validator. If the value is valid the method does nothing. If the value is invalid, anValidator.InvalidValueExceptionis thrown.- Specified by:
validatein interfaceValidator- Parameters:
value- the value to check- Throws:
Validator.InvalidValueException- if the value is invalid
-
setLocale
public void setLocale(Locale locale)
Deprecated.Sets the locale used for validation error messages. Revalidation is not automatically triggered by setting the locale.- Parameters:
locale-
-
getLocale
public Locale getLocale()
Deprecated.Gets the locale used for validation error messages.- Returns:
- locale used for validation
-
getJavaxBeanValidatorFactory
protected static javax.validation.ValidatorFactory getJavaxBeanValidatorFactory()
Deprecated.Returns the underlying JSR-303 bean validator factory used. A factory is created usingValidationif necessary.- Returns:
ValidatorFactoryto use
-
getJavaxBeanValidator
protected javax.validation.Validator getJavaxBeanValidator()
Deprecated.Returns a shared Validator instance to use. An instance is created using the validator factory if necessary and thereafter reused by theBeanValidatorinstance.- Returns:
- the JSR-303
Validatorto use
-
-