Package com.unboundid.ldap.matchingrules
Enum TelephoneNumberValidationPolicy
java.lang.Object
java.lang.Enum<TelephoneNumberValidationPolicy>
com.unboundid.ldap.matchingrules.TelephoneNumberValidationPolicy
- All Implemented Interfaces:
Serializable,Comparable<TelephoneNumberValidationPolicy>,java.lang.constant.Constable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public enum TelephoneNumberValidationPolicy
extends Enum<TelephoneNumberValidationPolicy>
This enum defines the policy that the
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.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA policy that indicates that any non-empty printable string will be accepted.A policy that indicates that any non-empty printable string will be accepted, as long as it contains at least one digit.A policy that indicates that only values that strictly adhere to the X.520 specification will be accepted. -
Method Summary
Modifier and TypeMethodDescriptionvoidvalidateValue(ASN1OctetString value, boolean isSubstring) Validates the provided value to ensure that it satisfies this validation policy.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.
-
Enum Constant Details
-
ALLOW_NON_EMPTY_PRINTABLE_STRING
A policy that indicates that any non-empty printable string will be accepted. Neither empty strings nor strings that contain characters from outside the set of printable characters will be accepted. -
ALLOW_NON_EMPTY_PRINTABLE_STRING_WITH_AT_LEAST_ONE_DIGIT
public static final TelephoneNumberValidationPolicy ALLOW_NON_EMPTY_PRINTABLE_STRING_WITH_AT_LEAST_ONE_DIGITA policy that indicates that any non-empty printable string will be accepted, as long as it contains at least one digit. Neither empty strings, strings nor strings that contain characters from outside the set of printable characters, nor strings without any digits will be accepted. -
ENFORCE_STRICT_X520_COMPLIANCE
A policy that indicates that only values that strictly adhere to the X.520 specification will be accepted. Only values that start with a plus sign, contain at least one digit, and contain only digits, spaces, and hyphens will be accepted.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
validateValue
Validates the provided value to ensure that it satisfies this validation policy.- Parameters:
value- The value to be validated. It must not benull.isSubstring- Indicates whether the provided value represents a substring rather than a complete value.- Throws:
LDAPException- If the provided value is not acceptable as per the constraints of this policy.
-