Class SerLdapAttr

java.lang.Object
org.bremersee.ldaptive.serializable.SerLdapAttr
All Implemented Interfaces:
Serializable

public class SerLdapAttr extends Object implements Serializable
A serializable ldap attribute.
Author:
Christian Bremer
See Also:
  • Constructor Details

    • SerLdapAttr

      public SerLdapAttr(org.ldaptive.LdapAttribute ldapAttribute)
      Instantiates a new serializable ldap attribute.
      Parameters:
      ldapAttribute - the ldap attribute
    • SerLdapAttr

      public SerLdapAttr(String name, boolean binary, List<String> values)
      Instantiates a new Ser ldap attr.
      Parameters:
      name - the name
      binary - the binary
      values - the values
  • Method Details

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • size

      public int size()
      Returns the number of values in this ldap attribute.
      Returns:
      number of values in this ldap attribute
    • getStringValue

      public String getStringValue()
      Returns a single string value of this attribute.
      Returns:
      single string attribute value or null if this attribute is empty
    • getStringValues

      public Collection<String> getStringValues()
      Returns the values of this attribute as strings. Binary data is base64 encoded. The return collection cannot be modified.
      Returns:
      collection of string attribute values
    • getBinaryValue

      public byte[] getBinaryValue()
      Returns a single byte array value of this attribute.
      Returns:
      single byte array attribute value or null if this attribute is empty
    • getBinaryValues

      public Collection<byte[]> getBinaryValues()
      Returns the values of this attribute as byte arrays. The return collection cannot be modified.
      Returns:
      collection of string attribute values
    • hasValue

      public boolean hasValue(byte[] value)
      Returns whether the supplied value exists in this attribute.
      Parameters:
      value - to find
      Returns:
      whether value exists
    • hasValue

      public boolean hasValue(String value)
      Returns whether the supplied value exists in this attribute.
      Parameters:
      value - to find
      Returns:
      whether value exists
    • toLdapAttribute

      public org.ldaptive.LdapAttribute toLdapAttribute()
      To ldap attribute.
      Returns:
      the ldap attribute