@Singleton public class DefaultLdapSearchService extends Object implements LdapSearchService
LdapSearchService
.Constructor and Description |
---|
DefaultLdapSearchService() |
Modifier and Type | Method and Description |
---|---|
protected List<LdapSearchResult> |
createResults(NamingEnumeration<SearchResult> results)
Builds
LdapSearchResult from the LDAP results. |
List<LdapSearchResult> |
search(DirContext managerContext,
SearchSettings settings)
Searches LDAP with th e given settings and returns a list of results.
|
Optional<LdapSearchResult> |
searchFirst(DirContext managerContext,
SearchSettings settings)
Searches LDAP with the given settings and returns an optional result.
|
public Optional<LdapSearchResult> searchFirst(DirContext managerContext, SearchSettings settings) throws NamingException
LdapSearchService
searchFirst
in interface LdapSearchService
managerContext
- The context to search withsettings
- The settings for searchingNamingException
- If the search failspublic List<LdapSearchResult> search(DirContext managerContext, SearchSettings settings) throws NamingException
LdapSearchService
search
in interface LdapSearchService
managerContext
- The context to search withsettings
- The settings for searchingNamingException
- If the search failsprotected List<LdapSearchResult> createResults(NamingEnumeration<SearchResult> results) throws NamingException
LdapSearchResult
from the LDAP results.results
- The LDAP resultsLdapSearchResult
NamingException
- If an error occurs