Class DnAttributeEntryHandler

All Implemented Interfaces:
Function<LdapEntry,LdapEntry>, LdapEntryHandler

public class DnAttributeEntryHandler extends AbstractEntryHandler<LdapEntry> implements LdapEntryHandler
Adds the entry DN as an attribute to the result set. Provides a client side implementation of RFC 5020.
  • Field Details

    • HASH_CODE_SEED

      private static final int HASH_CODE_SEED
      hash code seed.
      See Also:
    • dnAttributeName

      private String dnAttributeName
      Attribute name for the entry dn.
    • addIfExists

      private boolean addIfExists
      Whether to add the entry dn if an attribute of the same name exists.
  • Constructor Details

    • DnAttributeEntryHandler

      public DnAttributeEntryHandler()
  • Method Details

    • getDnAttributeName

      public String getDnAttributeName()
      Returns the DN attribute name.
      Returns:
      DN attribute name
    • setDnAttributeName

      public void setDnAttributeName(String name)
      Sets the DN attribute name.
      Parameters:
      name - of the DN attribute
    • isAddIfExists

      public boolean isAddIfExists()
      Returns whether to add the entryDN if an attribute of the same name exists.
      Returns:
      whether to add the entryDN if an attribute of the same name exists
    • setAddIfExists

      public void setAddIfExists(boolean b)
      Sets whether to add the entryDN if an attribute of the same name exists.
      Parameters:
      b - whether to add the entryDN if an attribute of the same name exists
    • apply

      public LdapEntry apply(LdapEntry entry)
      Specified by:
      apply in interface Function<LdapEntry,LdapEntry>
    • handleAttributes

      protected void handleAttributes(LdapEntry entry)
      Description copied from class: AbstractEntryHandler
      Handle the attributes of a search entry.
      Overrides:
      handleAttributes in class AbstractEntryHandler<LdapEntry>
      Parameters:
      entry - search entry to extract the attributes from
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class AbstractEntryHandler<LdapEntry>
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in class AbstractEntryHandler<LdapEntry>
    • toString

      public String toString()
      Overrides:
      toString in class Object