@ThreadSafety(level=COMPLETELY_THREADSAFE) public enum TelephoneNumberValidationPolicy extends java.lang.Enum<TelephoneNumberValidationPolicy>
TelephoneNumberMatchingRule
should use when validating values in accordance with the syntax. Regardless
of the validation policy, the normalized representation of a value will be
the provided value, converted to lowercase, with only spaces and hyphens
removed.| Enum Constant and Description |
|---|
ALLOW_NON_EMPTY_PRINTABLE_STRING
A policy that indicates that any non-empty printable string will be
accepted.
|
ALLOW_NON_EMPTY_PRINTABLE_STRING_WITH_AT_LEAST_ONE_DIGIT
A policy that indicates that any non-empty printable string will be
accepted, as long as it contains at least one digit.
|
ENFORCE_STRICT_X520_COMPLIANCE
A policy that indicates that only values that strictly adhere to the
X.520 specification will be accepted.
|
| Modifier and Type | Method and Description |
|---|---|
void |
validateValue(ASN1OctetString value,
boolean isSubstring)
Validates the provided value to ensure that it satisfies this validation
policy.
|
static TelephoneNumberValidationPolicy |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static TelephoneNumberValidationPolicy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TelephoneNumberValidationPolicy ALLOW_NON_EMPTY_PRINTABLE_STRING
public static final TelephoneNumberValidationPolicy ALLOW_NON_EMPTY_PRINTABLE_STRING_WITH_AT_LEAST_ONE_DIGIT
public static final TelephoneNumberValidationPolicy ENFORCE_STRICT_X520_COMPLIANCE
public static TelephoneNumberValidationPolicy[] values()
for (TelephoneNumberValidationPolicy c : TelephoneNumberValidationPolicy.values()) System.out.println(c);
public static TelephoneNumberValidationPolicy valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic void validateValue(@NotNull ASN1OctetString value, boolean isSubstring) throws LDAPException
value - The value to be validated. It must not be
null.isSubstring - Indicates whether the provided value represents a
substring rather than a complete value.LDAPException - If the provided value is not acceptable as per the
constraints of this policy.