Package org.jbpm.services.task.utils
Class LdapSearcher
- java.lang.Object
-
- org.jbpm.services.task.utils.LdapSearcher
-
public class LdapSearcher extends Object
Utility class providing LDAP search capabilities.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLdapSearcher.SearchScope
-
Field Summary
Fields Modifier and Type Field Description static StringSEARCH_SCOPE
-
Constructor Summary
Constructors Constructor Description LdapSearcher(Properties config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getAttributeResults(String attributeId)List<SearchResult>getSearchResults()StringgetSingleAttributeResult(String attributeId)SearchResultgetSingleSearchResult()LdapSearchersearch(String context, String filterExpr, Object... filterArgs)Search LDAP and stores the results in searchResults field.
-
-
-
Field Detail
-
SEARCH_SCOPE
public static final String SEARCH_SCOPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LdapSearcher
public LdapSearcher(Properties config)
- Parameters:
config- LDAP connection properties- See Also:
Context
-
-
Method Detail
-
search
public LdapSearcher 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}" whereiis a non-negative integer. May not be null.filterArgs- the array of arguments to substitute for the variables infilterExpr. The value offilterArgs[i]will replace each occurrence of "{i}". If null, an equivalent of an empty array is used.- Returns:
- this
-
getSingleSearchResult
public SearchResult getSingleSearchResult()
-
getSearchResults
public List<SearchResult> getSearchResults()
-
-