Package com.unboundid.util.args
Class ProhibitDNInSubtreeArgumentValueValidator
- java.lang.Object
-
- com.unboundid.util.args.ArgumentValueValidator
-
- com.unboundid.util.args.ProhibitDNInSubtreeArgumentValueValidator
-
- All Implemented Interfaces:
java.io.Serializable
@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class ProhibitDNInSubtreeArgumentValueValidator extends ArgumentValueValidator implements java.io.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 not within one or more specified subtrees.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ProhibitDNInSubtreeArgumentValueValidator(DN... baseDNs)
Creates a new instance of this argument value validator with the provided information.ProhibitDNInSubtreeArgumentValueValidator(java.util.Collection<DN> baseDNs)
Creates a new instance of this argument value validator with the provided information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<DN>
getBaseDNs()
Retrieves a list of the prohibited base DNs for this argument value validator.java.lang.String
toString()
Retrieves a string representation of this argument value validator.void
toString(java.lang.StringBuilder buffer)
Appends a string representation of this argument value validator to the provided buffer.void
validateArgumentValue(Argument argument, java.lang.String valueString)
Examines the value(s) assigned to the provided argument to determine whether they are acceptable.
-
-
-
Constructor Detail
-
ProhibitDNInSubtreeArgumentValueValidator
public ProhibitDNInSubtreeArgumentValueValidator(@NotNull DN... baseDNs)
Creates a new instance of this argument value validator with the provided information.- Parameters:
baseDNs
- The set of prohibited base DNs for values of the associated argument. It must not benull
or empty.
-
ProhibitDNInSubtreeArgumentValueValidator
public ProhibitDNInSubtreeArgumentValueValidator(@NotNull java.util.Collection<DN> baseDNs)
Creates a new instance of this argument value validator with the provided information.- Parameters:
baseDNs
- The set of prohibited base DNs for values of the associated argument. It must not benull
or empty.
-
-
Method Detail
-
getBaseDNs
@NotNull public java.util.List<DN> getBaseDNs()
Retrieves a list of the prohibited base DNs for this argument value validator.- Returns:
- A list of the prohibited base DNs for this argument value validator.
-
validateArgumentValue
public void validateArgumentValue(@NotNull Argument argument, @NotNull java.lang.String valueString) throws ArgumentException
Examines the value(s) assigned to the provided argument to determine whether they are acceptable.- Specified by:
validateArgumentValue
in 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
@NotNull public java.lang.String toString()
Retrieves a string representation of this argument value validator.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of this argument value validator.
-
-