Package org.forgerock.opendj.ldap
Class AVA
java.lang.Object
org.forgerock.opendj.ldap.AVA
- All Implemented Interfaces:
Comparable<AVA>
An attribute value assertion (AVA) as defined in RFC 4512 section 2.3
consists of an attribute description with zero options and an attribute
value.
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.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new attribute value assertion (AVA) using the provided attribute type and value decoded using the default schema.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. -
Method Summary
Modifier and TypeMethodDescriptionintbooleanReturns the attribute name associated with this AVA.Returns the attribute type associated with this AVA.Returns the attribute value associated with this AVA.inthashCode()Returns a single valued attribute having the same attribute type and value as this AVA.toString()static AVAParses the provided LDAP string representation of an AVA using the default schema.static AVAParses the provided LDAP string representation of an AVA using the provided schema.
-
Constructor Details
-
AVA
Creates a new attribute value assertion (AVA) using the provided attribute type and value.If
attributeValueis not an instance ofByteStringthen it will be converted using theByteString.valueOfObject(Object)method.- Parameters:
attributeType- The attribute type.attributeValue- The attribute value.- Throws:
NullPointerException- IfattributeTypeorattributeValuewasnull.
-
AVA
Creates a new attribute value assertion (AVA) using the provided attribute type, name and value.If
attributeValueis not an instance ofByteStringthen it will be converted using theByteString.valueOfObject(Object)method.- Parameters:
attributeType- The attribute type.attributeName- The user provided attribute name.attributeValue- The attribute value.- Throws:
NullPointerException- IfattributeType,attributeNameorattributeValuewasnull.
-
AVA
Creates a new attribute value assertion (AVA) using the provided attribute type and value decoded using the default schema.If
attributeValueis not an instance ofByteStringthen it will be converted using theByteString.valueOfObject(Object)method.- Parameters:
attributeType- The attribute type.attributeValue- The attribute value.- Throws:
UnknownSchemaElementException- IfattributeTypewas not found in the default schema.NullPointerException- IfattributeTypeorattributeValuewasnull.
-
-
Method Details
-
valueOf
Parses the provided LDAP string representation of an AVA using the default schema.- Parameters:
ava- The LDAP string representation of an AVA.- Returns:
- The parsed RDN.
- Throws:
org.forgerock.i18n.LocalizedIllegalArgumentException- Ifavais not a valid LDAP string representation of a AVA.NullPointerException- Ifavawasnull.
-
valueOf
Parses the provided LDAP string representation of an AVA using the provided schema.- Parameters:
ava- The LDAP string representation of a AVA.schema- The schema to use when parsing the AVA.- Returns:
- The parsed AVA.
- Throws:
org.forgerock.i18n.LocalizedIllegalArgumentException- Ifavais not a valid LDAP string representation of a AVA.NullPointerException- Ifavaorschemawasnull.
-
compareTo
- Specified by:
compareToin interfaceComparable<AVA>
-
equals
-
getAttributeType
Returns the attribute type associated with this AVA.- Returns:
- The attribute type associated with this AVA.
-
getAttributeName
Returns the attribute name associated with this AVA.- Returns:
- The attribute name associated with this AVA.
-
getAttributeValue
Returns the attribute value associated with this AVA.- Returns:
- The attribute value associated with this AVA.
-
hashCode
-
toAttribute
Returns a single valued attribute having the same attribute type and value as this AVA.- Returns:
- A single valued attribute having the same attribute type and value as this AVA.
-
toString
-