Class DefaultLdapSearchService
java.lang.Object
io.micronaut.security.ldap.context.DefaultLdapSearchService
- All Implemented Interfaces:
- LdapSearchService
Default implementation of 
LdapSearchService.- Since:
- 1.0
- Author:
- James Kleeh
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected List<LdapSearchResult>createResults(NamingEnumeration<SearchResult> results) BuildsLdapSearchResultfrom the LDAP results.search(DirContext managerContext, SearchSettings settings) Searches LDAP with th e given settings and returns a list of results.searchFirst(DirContext managerContext, SearchSettings settings) Searches LDAP with the given settings and returns an optional result.
- 
Constructor Details- 
DefaultLdapSearchServicepublic DefaultLdapSearchService()
 
- 
- 
Method Details- 
searchFirstpublic Optional<LdapSearchResult> searchFirst(DirContext managerContext, SearchSettings settings) throws NamingException Description copied from interface:LdapSearchServiceSearches LDAP with the given settings and returns an optional result.- Specified by:
- searchFirstin interface- LdapSearchService
- Parameters:
- managerContext- The context to search with
- settings- The settings for searching
- Returns:
- An optional search result
- Throws:
- NamingException- If the search fails
 
- 
searchpublic List<LdapSearchResult> search(DirContext managerContext, SearchSettings settings) throws NamingException Description copied from interface:LdapSearchServiceSearches LDAP with th e given settings and returns a list of results.- Specified by:
- searchin interface- LdapSearchService
- Parameters:
- managerContext- The context to search with
- settings- The settings for searching
- Returns:
- A list of results, empty if none found
- Throws:
- NamingException- If the search fails
 
- 
createResultsprotected List<LdapSearchResult> createResults(NamingEnumeration<SearchResult> results) throws NamingException BuildsLdapSearchResultfrom the LDAP results.- Parameters:
- results- The LDAP results
- Returns:
- The list of LdapSearchResult
- Throws:
- NamingException- If an error occurs
 
 
-