public class LdapSearcher extends Object
Modifier and Type | Class and Description |
---|---|
static class |
LdapSearcher.SearchScope |
Modifier and Type | Field and Description |
---|---|
static String |
SEARCH_SCOPE |
Constructor and Description |
---|
LdapSearcher(Properties config) |
Modifier and Type | Method and Description |
---|---|
List<String> |
getAttributeResults(String attributeId) |
List<SearchResult> |
getSearchResults() |
String |
getSingleAttributeResult(String attributeId) |
SearchResult |
getSingleSearchResult() |
LdapSearcher |
search(String context,
String filterExpr,
Object... filterArgs)
Search LDAP and stores the results in searchResults field.
|
public static final String SEARCH_SCOPE
public LdapSearcher(Properties config)
config
- LDAP connection propertiesContext
public LdapSearcher search(String context, String filterExpr, Object... filterArgs)
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.public SearchResult getSingleSearchResult()
public List<SearchResult> getSearchResults()
Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.