Interface LDAPEntry


public interface LDAPEntry

Represents an LDAP entry resulting from an LDAP search operation.

Since:
1.5
Author:
Jeremy Kuhn
  • Method Details

    • getDN

      String getDN()

      Returns the entry DN.

      Returns:
      a DN
    • get

      Optional<Object> get(String name) throws LDAPException

      Returns the value of the specified attribute.

      If multiple values are defined for that attribute, this method returns one of them in an non-deterministic way.

      Parameters:
      name - the name of the attribute
      Returns:
      an optional returning the attribute value or an empty optional if no attribute exists with that name
      Throws:
      LDAPException - if there was an error accessing the attribute
    • getAll

      List<Object> getAll(String name) throws LDAPException

      Returns all values defined for the specifies attribute.

      Parameters:
      name - the name of the attribute
      Returns:
      a list of values or an empty list if no attribute exists with that name
      Throws:
      LDAPException - if there was an error accessing the attribute
    • getAll

      Returns all the attributes defined in the entry.

      Returns:
      a list of entries with attribute name as key and attribute value as value
      Throws:
      LDAPException - if there was an error accessing the attributes
    • getAttribute

      Optional<LDAPAttribute> getAttribute(String name) throws LDAPException

      Returns the specified attribute.

      If multiple values are defined for that attribute, this method returns one of them in an non-deterministic way.

      Parameters:
      name - the name of the attribute
      Returns:
      an optional returning the attribute or an empty optional if no attribute exists with that name
      Throws:
      LDAPException - if there was an error accessing the attribute
    • getAllAttribute

      List<LDAPAttribute> getAllAttribute(String name) throws LDAPException

      Returns all attributes defined for the specifies name.

      Parameters:
      name - the name of the attribute
      Returns:
      a list of attributes or an empty list if no attribute exists with that name
      Throws:
      LDAPException - if there was an error accessing the attribute
    • getAllAttribute

      List<LDAPAttribute> getAllAttribute() throws LDAPException

      Returns all the attributes defined in the entry.

      Returns:
      a list attributes
      Throws:
      LDAPException - if there was an error accessing the attributes