Class AbstractValidatorForLocalizedValue<A extends Annotation>
- java.lang.Object
-
- de.knightsoftnet.validators.shared.impl.AbstractValidatorForLocalizedValue<A>
-
- Type Parameters:
A- annotation interface for check
- All Implemented Interfaces:
javax.validation.ConstraintValidator<A,LocalizedValue<?,?>>
- Direct Known Subclasses:
NotBlankValidatorForLocalizedValue,NotEmptyValidatorForLocalizedValue,PatternValidatorForLocalizedValue
public abstract class AbstractValidatorForLocalizedValue<A extends Annotation> extends Object implements javax.validation.ConstraintValidator<A,LocalizedValue<?,?>>
abstract validatior for localized value.- Author:
- Manfred Tremmel
-
-
Constructor Summary
Constructors Constructor Description AbstractValidatorForLocalizedValue()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract booleancheckEntryValue(Object value)check single localized value.protected booleancheckValue(Map.Entry<?,?> entry, javax.validation.ConstraintValidatorContext constraintValidatorContext)protected voidextendValidationContext(javax.validation.ConstraintValidatorContext constraintValidatorContext)booleanisValid(LocalizedValue<?,?> localizedValue, javax.validation.ConstraintValidatorContext constraintValidatorContext)Checks that the localized value.
-
-
-
Field Detail
-
message
protected String message
-
-
Method Detail
-
isValid
public boolean isValid(LocalizedValue<?,?> localizedValue, javax.validation.ConstraintValidatorContext constraintValidatorContext)
Checks that the localized value.- Specified by:
isValidin interfacejavax.validation.ConstraintValidator<A extends Annotation,LocalizedValue<?,?>>- Parameters:
localizedValue- the localized value to validateconstraintValidatorContext- context in which the constraint is evaluated- Returns:
- returns
trueif the string is notnulland the length of the trimmedcharSequenceis strictly superior to 0,falseotherwise
-
checkValue
protected boolean checkValue(Map.Entry<?,?> entry, javax.validation.ConstraintValidatorContext constraintValidatorContext)
-
extendValidationContext
protected void extendValidationContext(javax.validation.ConstraintValidatorContext constraintValidatorContext)
-
checkEntryValue
protected abstract boolean checkEntryValue(Object value)
check single localized value.- Parameters:
value- object to check- Returns:
- true if it's valid
-
-