public class MergeSearchResultHandler extends CopySearchResultHandler
MergeSearchResultHandler merges the attributes found in each
search result into the first search result.logger| Constructor and Description |
|---|
MergeSearchResultHandler() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getAllowDuplicates()
Returns whether to allow duplicate attribute values.
|
protected List<SearchResult> |
mergeResults(List<SearchResult> results)
Merges the search results in the supplied list into a single search result.
|
List<SearchResult> |
process(SearchCriteria sc,
List<? extends SearchResult> l)
This will enumerate through the supplied
List and return a
List of those results. |
List<SearchResult> |
process(SearchCriteria sc,
NamingEnumeration<? extends SearchResult> en,
Class<?>[] ignore)
This will enumerate through the supplied
NamingEnumeration and
return a List of those results. |
void |
setAllowDuplicates(boolean b)
Sets whether to allow duplicate attribute values.
|
getAttributeHandler, processAttributes, processDn, processResult, setAttributeHandlerprocessclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprocesspublic boolean getAllowDuplicates()
booleanpublic void setAllowDuplicates(boolean b)
b - booleanpublic List<SearchResult> process(SearchCriteria sc, NamingEnumeration<? extends SearchResult> en, Class<?>[] ignore) throws NamingException
NamingEnumeration and
return a List of those results. The results are unaltered and the dn is
ignored. Any exceptions passed into this method will be ignored and results
will be returned as if no exception occurred.process in interface ResultHandler<SearchResult,SearchResult>process in class AbstractResultHandler<SearchResult,SearchResult>sc - SearchCriteria used to find enumerationen - NamingEnumeration LDAP resultsignore - Class[] of exception types to ignoreList - LDAP resultsNamingException - if the LDAP returns an errorpublic List<SearchResult> process(SearchCriteria sc, List<? extends SearchResult> l) throws NamingException
List and return a
List of those results. The results are unaltered and the dn is ignored.process in interface ResultHandler<SearchResult,SearchResult>process in class AbstractResultHandler<SearchResult,SearchResult>sc - SearchCriteria used to find enumerationl - List LDAP resultsList - LDAP resultsNamingException - if the LDAP returns an errorprotected List<SearchResult> mergeResults(List<SearchResult> results) throws NamingException
results - List of search results to mergeList of merged search resultsNamingException - if an error occurs reading attribute valuesCopyright © 2014. All rights reserved.