public final class AVA extends Object implements Comparable<AVA>
The following are examples of string representations of AVAs:
uid=12345 ou=Engineering cn=Kurt ZeilengaNote: The name AVA is historical, coming from X500/LDAPv2. However, in LDAP context, this class actually represents an
AttributeTypeAndValue.| Constructor and Description |
|---|
AVA(AttributeType attributeType,
Object attributeValue)
Creates a new attribute value assertion (AVA) using the provided
attribute type and value.
|
AVA(AttributeType attributeType,
String attributeName,
Object attributeValue)
Creates a new attribute value assertion (AVA) using the provided
attribute type, name and value.
|
AVA(String attributeType,
Object attributeValue)
Creates a new attribute value assertion (AVA) using the provided
attribute type and value decoded using the default schema.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(AVA ava) |
boolean |
equals(Object obj) |
String |
getAttributeName()
Returns the attribute name associated with this AVA.
|
AttributeType |
getAttributeType()
Returns the attribute type associated with this AVA.
|
ByteString |
getAttributeValue()
Returns the attribute value associated with this AVA.
|
int |
hashCode() |
Attribute |
toAttribute()
Returns a single valued attribute having the same attribute type and
value as this AVA.
|
String |
toString() |
static AVA |
valueOf(String ava)
Parses the provided LDAP string representation of an AVA using the
default schema.
|
static AVA |
valueOf(String ava,
Schema schema)
Parses the provided LDAP string representation of an AVA using the
provided schema.
|
public AVA(AttributeType attributeType, Object attributeValue)
If attributeValue is not an instance of ByteString then
it will be converted using the ByteString.valueOfObject(Object) method.
attributeType - The attribute type.attributeValue - The attribute value.NullPointerException - If attributeType or attributeValue was
null.public AVA(AttributeType attributeType, String attributeName, Object attributeValue)
If attributeValue is not an instance of ByteString then
it will be converted using the ByteString.valueOfObject(Object) method.
attributeType - The attribute type.attributeName - The user provided attribute name.attributeValue - The attribute value.NullPointerException - If attributeType, attributeName or attributeValue was null.public AVA(String attributeType, Object attributeValue)
If attributeValue is not an instance of ByteString then
it will be converted using the ByteString.valueOfObject(Object) method.
attributeType - The attribute type.attributeValue - The attribute value.UnknownSchemaElementException - If attributeType was not found in the default schema.NullPointerException - If attributeType or attributeValue was
null.public static AVA valueOf(String ava)
ava - The LDAP string representation of an AVA.org.forgerock.i18n.LocalizedIllegalArgumentException - If ava is not a valid LDAP string representation of a
AVA.NullPointerException - If ava was null.public static AVA valueOf(String ava, Schema schema)
ava - The LDAP string representation of a AVA.schema - The schema to use when parsing the AVA.org.forgerock.i18n.LocalizedIllegalArgumentException - If ava is not a valid LDAP string representation of a
AVA.NullPointerException - If ava or schema was null.public int compareTo(AVA ava)
compareTo in interface Comparable<AVA>public AttributeType getAttributeType()
public String getAttributeName()
public ByteString getAttributeValue()
public Attribute toAttribute()
Copyright © 2017-2020 Wren Security. All Rights Reserved.