Class Ava

  • All Implemented Interfaces:
    Externalizable, Serializable, Cloneable, Comparable<Ava>

    public class Ava
    extends Object
    implements Externalizable, Cloneable, Comparable<Ava>

    A Attribute Type And Value, which is the basis of all Rdn. It contains a type, and a value. The type must not be case sensitive. Superfluous leading and trailing spaces MUST have been trimmed before. The value MUST be in UTF8 format, according to RFC 2253. If the type is in OID form, then the value must be a hexadecimal string prefixed by a '#' character. Otherwise, the string must respect the RC 2253 grammar.

    We will also keep a User Provided form of the AVA (Attribute Type And Value), called upName.

    This class is immutable

    Author:
    Apache Directory Project
    See Also:
    Serialized Form
    • Constructor Detail

      • Ava

        public Ava()
        Constructs an empty Ava
      • Ava

        public Ava​(SchemaManager schemaManager)
        Constructs an empty schema aware Ava.
        Parameters:
        schemaManager - The SchemaManager instance
      • Ava

        public Ava​(String upType,
                   byte[] upValue)
            throws LdapInvalidDnException
        Construct an Ava containing a binary value.

        Note that the upValue should not be null or empty, or resolve to an empty string after having trimmed it.

        Parameters:
        upType - The User Provided type
        upValue - The User Provided binary value
        Throws:
        LdapInvalidDnException - If the given type or value are invalid
      • Ava

        public Ava​(SchemaManager schemaManager,
                   String upType,
                   byte[] upValue)
            throws LdapInvalidDnException
        Construct a schema aware Ava containing a binary value. The AttributeType and value will be normalized accordingly to the given SchemaManager.

        Note that the upValue should not be null or empty, or resolve to an empty string after having trimmed it.

        Parameters:
        schemaManager - The SchemaManager instance
        upType - The User Provided type
        upValue - The User Provided binary value
        Throws:
        LdapInvalidDnException - If the given type or value are invalid
      • Ava

        public Ava​(SchemaManager schemaManager,
                   String upType,
                   String upName,
                   byte[] upValue)
            throws LdapInvalidDnException
        Construct a schema aware Ava containing a binary value. The AttributeType and value will be normalized accordingly to the given SchemaManager.

        Note that the upValue should not be null or empty, or resolve to an empty string after having trimmed it.

        Parameters:
        schemaManager - The SchemaManager instance
        upType - The User Provided type
        upName - the User Provided AVA
        upValue - The User Provided binary value
        Throws:
        LdapInvalidDnException - If the given type or value are invalid
      • Ava

        public Ava​(String upType,
                   String upValue)
            throws LdapInvalidDnException
        Construct an Ava with a String value.

        Note that the upValue should not be null or empty, or resolve to an empty string after having trimmed it.

        Parameters:
        upType - The User Provided type
        upValue - The User Provided String value
        Throws:
        LdapInvalidDnException - If the given type or value are invalid
      • Ava

        public Ava​(SchemaManager schemaManager,
                   String upType,
                   String upValue)
            throws LdapInvalidDnException
        Construct a schema aware Ava with a String value.

        Note that the upValue should not be null or empty, or resolve to an empty string after having trimmed it.

        Parameters:
        schemaManager - The SchemaManager instance
        upType - The User Provided type
        upValue - The User Provided String value
        Throws:
        LdapInvalidDnException - If the given type or value are invalid
      • Ava

        public Ava​(SchemaManager schemaManager,
                   String upType,
                   String upName,
                   String upValue)
            throws LdapInvalidDnException
        Construct a schema aware Ava with a String value.

        Note that the upValue should not be null or empty, or resolve to an empty string after having trimmed it.

        Parameters:
        schemaManager - The SchemaManager instance
        upType - The User Provided type
        upName - the User provided AVA
        upValue - The User Provided String value
        Throws:
        LdapInvalidDnException - If the given type or value are invalid