|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.unboundid.util.args.ArgumentValueValidator
com.unboundid.util.args.AttributeNameArgumentValueValidator
@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class AttributeNameArgumentValueValidator
This class provides an implementation of an argument value validator that is expected to be used with a string argument and ensures that all values for the argument are valid attribute type names (or numeric OIDs) or attribute descriptions (a name or OID with attribute options). It can optionally use a provided schema to verify that the specified attribute type is defined.
Constructor Summary | |
---|---|
AttributeNameArgumentValueValidator()
Creates a new instance of this attribute name argument value validator that will not permit attribute options and will not attempt to verify that the specified attribute type is defined in a schema. |
|
AttributeNameArgumentValueValidator(boolean allowOptions,
Schema schema)
Creates a new instance of this attribute name argument value validator with the provided information. |
Method Summary | |
---|---|
boolean |
allowOptions()
Indicates whether to allow values that include one or more attribute options. |
Schema |
getSchema()
Retrieves the schema that will be used to verify that attribute types specified in argument values are defined, if any. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AttributeNameArgumentValueValidator()
public AttributeNameArgumentValueValidator(boolean allowOptions, Schema schema)
allowOptions
- Indicates whether to allow values that include one or
more attribute options.schema
- An optional schema that can be used to verify that
the specified attribute type is defined.Method Detail |
---|
public boolean allowOptions()
true
if values will be allowed to include attribute
options, or false
if not.public Schema getSchema()
null
if no
such validation will be performed.public void validateArgumentValue(Argument argument, java.lang.String valueString) throws ArgumentException
validateArgumentValue
in class ArgumentValueValidator
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.
ArgumentException
- If the provided value is determined to be
unacceptable.public java.lang.String toString()
toString
in class java.lang.Object
public void toString(java.lang.StringBuilder buffer)
buffer
- The buffer to which the string representation should be
appended.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |