Package com.unboundid.util.args
Class RequireDNInSubtreeArgumentValueValidator
java.lang.Object
com.unboundid.util.args.ArgumentValueValidator
com.unboundid.util.args.RequireDNInSubtreeArgumentValueValidator
- All Implemented Interfaces:
Serializable
@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class RequireDNInSubtreeArgumentValueValidator
extends ArgumentValueValidator
implements Serializable
This class provides an implementation of an argument value validator that is
expected to be used with string or DN arguments and ensures that all values
for the argument are valid DNs that are within one or more specified
subtrees.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRequireDNInSubtreeArgumentValueValidator(DN... baseDNs) Creates a new instance of this argument value validator with the provided information.Creates a new instance of this argument value validator with the provided information. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves a list of the permitted base DNs for this argument value validator.toString()Retrieves a string representation of this argument value validator.voidtoString(StringBuilder buffer) Appends a string representation of this argument value validator to the provided buffer.voidvalidateArgumentValue(Argument argument, String valueString) Examines the value(s) assigned to the provided argument to determine whether they are acceptable.
-
Constructor Details
-
RequireDNInSubtreeArgumentValueValidator
Creates a new instance of this argument value validator with the provided information.- Parameters:
baseDNs- The set of permitted base DNs for values of the associated argument. It must not benullor empty.
-
RequireDNInSubtreeArgumentValueValidator
Creates a new instance of this argument value validator with the provided information.- Parameters:
baseDNs- The set of permitted base DNs for values of the associated argument. It must not benullor empty.
-
-
Method Details
-
getBaseDNs
Retrieves a list of the permitted base DNs for this argument value validator.- Returns:
- A list of the permitted base DNs for this argument value validator.
-
validateArgumentValue
public void validateArgumentValue(@NotNull Argument argument, @NotNull String valueString) throws ArgumentException Examines the value(s) assigned to the provided argument to determine whether they are acceptable.- Specified by:
validateArgumentValuein classArgumentValueValidator- Parameters:
argument- The argument to which the value is being provided.valueString- The string representation of the value to be validated. This value will have already passed any normal validation performed by the argument.- Throws:
ArgumentException- If the provided value is determined to be unacceptable.
-
toString
Retrieves a string representation of this argument value validator. -
toString
Appends a string representation of this argument value validator to the provided buffer.- Parameters:
buffer- The buffer to which the string representation should be appended.
-