Class ValidIdentity.ValidIdentityValidatorForString

java.lang.Object
dev.orne.beans.ValidIdentity.ValidIdentityValidatorForString
All Implemented Interfaces:
javax.validation.ConstraintValidator<ValidIdentity,String>
Enclosing class:
ValidIdentity

@API(status=INTERNAL, since="0.4") public static class ValidIdentity.ValidIdentityValidatorForString extends Object implements javax.validation.ConstraintValidator<ValidIdentity,String>
Constraint validator for ValidBeanIdentity on String identity tokens.
See Also:
  • Constructor Details

    • ValidIdentityValidatorForString

      public ValidIdentityValidatorForString()
      Creates a new instance.
  • Method Details

    • initialize

      public void initialize(@NotNull @NotNull ValidIdentity annotation)
      Specified by:
      initialize in interface javax.validation.ConstraintValidator<ValidIdentity,String>
    • isValid

      public boolean isValid(String value, javax.validation.ConstraintValidatorContext context)
      Specified by:
      isValid in interface javax.validation.ConstraintValidator<ValidIdentity,String>
    • isValid

      public static boolean isValid(@NotNull @NotNull String value)
      Returns true if specified bean is valid reference to it's bean type.
      Parameters:
      value - The bean to validate
      Returns:
      If the bean is a valid bean reference
    • isValid

      public static boolean isValid(@NotNull @NotNull String value, @NotNull @NotNull Class<? extends Identity> expectedType)
      Returns true if specified bean is valid reference to it's bean type.
      Parameters:
      value - The bean to validate
      expectedType - The expected type of identity
      Returns:
      If the bean is a valid bean reference