Class LdapSearcher


  • public class LdapSearcher
    extends Object
    Utility class providing LDAP search capabilities.
    • Constructor Detail

      • LdapSearcher

        public LdapSearcher​(Properties config)
        Parameters:
        config - LDAP connection properties
        See Also:
        Context
    • Method Detail

      • search

        public LdapSearcher.LdapResults search​(String context,
                                               String filterExpr,
                                               Object... filterArgs)
        Search LDAP and stores the results in searchResults field.
        Parameters:
        context - the name of the context where the search starts (the depth depends on ldap.search.scope)
        filterExpr - the filter expression to use for the search. The expression may contain variables of the form "{i}" where i is a non-negative integer. May not be null.
        filterArgs - the array of arguments to substitute for the variables in filterExpr. The value of filterArgs[i] will replace each occurrence of "{i}". If null, an equivalent of an empty array is used.
        Returns:
        this