Class EntryDnSearchResultHandler

  • All Implemented Interfaces:
    ResultHandler<javax.naming.directory.SearchResult,​javax.naming.directory.SearchResult>, SearchResultHandler

    public class EntryDnSearchResultHandler
    extends CopySearchResultHandler
    EntryDnSearchResultHandler adds the search result DN as an attribute to the result set. Provides a client side implementation of RFC 5020.
    Version:
    $Revision: 1330 $ $Date: 2010-05-24 00:10:53 +0200 (Mon, 24 May 2010) $
    Author:
    Middleware Services
    • Constructor Detail

      • EntryDnSearchResultHandler

        public EntryDnSearchResultHandler()
    • Method Detail

      • getDnAttributeName

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

        public void setDnAttributeName​(java.lang.String s)
        Sets the DN attribute name.
        Parameters:
        s - String
      • isAddIfExists

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

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

        protected javax.naming.directory.Attributes processAttributes​(SearchCriteria sc,
                                                                      javax.naming.directory.SearchResult sr)
                                                               throws javax.naming.NamingException
        Process the attributes of an ldap search.
        Overrides:
        processAttributes in class CopySearchResultHandler
        Parameters:
        sc - SearchCriteria used to find search result
        sr - SearchResult to extract the attributes from
        Returns:
        Attributes processed attributes
        Throws:
        javax.naming.NamingException - if the LDAP returns an error