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:
jakarta.validation.ConstraintValidator<A,LocalizedValue<?,?>>
Direct Known Subclasses:
NotBlankValidatorForLocalizedValue, NotEmptyValidatorForLocalizedValue, PatternValidatorForLocalizedValue

public abstract class AbstractValidatorForLocalizedValue<A extends Annotation> extends Object implements jakarta.validation.ConstraintValidator<A,LocalizedValue<?,?>>
abstract validatior for localized value.
Author:
Manfred Tremmel
  • Field Details

    • message

      protected String message
  • Constructor Details

    • AbstractValidatorForLocalizedValue

      public AbstractValidatorForLocalizedValue()
  • Method Details

    • isValid

      public boolean isValid(LocalizedValue<?,?> localizedValue, jakarta.validation.ConstraintValidatorContext constraintValidatorContext)
      Checks that the localized value.
      Specified by:
      isValid in interface jakarta.validation.ConstraintValidator<A extends Annotation,LocalizedValue<?,?>>
      Parameters:
      localizedValue - the localized value to validate
      constraintValidatorContext - context in which the constraint is evaluated
      Returns:
      returns true if the string is not null and the length of the trimmed charSequence is strictly superior to 0, false otherwise
    • checkValue

      protected boolean checkValue(Map.Entry<?,?> entry, jakarta.validation.ConstraintValidatorContext constraintValidatorContext)
    • extendValidationContext

      protected void extendValidationContext(jakarta.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