Class LdifSearch


  • public class LdifSearch
    extends LdapSearch
    LdifSearch queries an LDAP and returns the result as an LDIF. Each instance of LdifSearch maintains it's own pool of LDAP connections.
    Version:
    $Revision: 1330 $ $Date: 2010-05-24 00:10:53 +0200 (Mon, 24 May 2010) $
    Author:
    Middleware Services
    • Constructor Detail

      • LdifSearch

        public LdifSearch​(LdapPool<Ldap> pool)
        This creates a new LdifSearch with the supplied pool.
        Parameters:
        pool - LdapPool
    • Method Detail

      • search

        public void search​(java.lang.String query,
                           java.lang.String[] attrs,
                           java.io.Writer writer)
                    throws javax.naming.NamingException,
                           java.io.IOException
        This will perform an LDAP search with the supplied query and return attributes. The results will be written to the supplied Writer.
        Overrides:
        search in class LdapSearch
        Parameters:
        query - String to search for
        attrs - String[] to return
        writer - Writer to write to
        Throws:
        javax.naming.NamingException - if an error occurs while searching
        java.io.IOException - if an error occurs while writing search results