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.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.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 2010-2022 ForgeRock AS.