edu.vt.middleware.ldap.handler
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 java.util.List<javax.naming.directory.SearchResult> |
mergeResults(java.util.List<javax.naming.directory.SearchResult> results)
Merges the search results in the supplied list into a single search result.
|
java.util.List<javax.naming.directory.SearchResult> |
process(SearchCriteria sc,
java.util.List<? extends javax.naming.directory.SearchResult> l)
This will enumerate through the supplied
List and return a
List of those results. |
java.util.List<javax.naming.directory.SearchResult> |
process(SearchCriteria sc,
javax.naming.NamingEnumeration<? extends javax.naming.directory.SearchResult> en,
java.lang.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 java.util.List<javax.naming.directory.SearchResult> process(SearchCriteria sc, javax.naming.NamingEnumeration<? extends javax.naming.directory.SearchResult> en, java.lang.Class<?>[] ignore) throws javax.naming.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<javax.naming.directory.SearchResult,javax.naming.directory.SearchResult>process in class AbstractResultHandler<javax.naming.directory.SearchResult,javax.naming.directory.SearchResult>sc - SearchCriteria used to find enumerationen - NamingEnumeration LDAP resultsignore - Class[] of exception types to ignoreList - LDAP resultsjavax.naming.NamingException - if the LDAP returns an errorpublic java.util.List<javax.naming.directory.SearchResult> process(SearchCriteria sc, java.util.List<? extends javax.naming.directory.SearchResult> l) throws javax.naming.NamingException
List and return a
List of those results. The results are unaltered and the dn is ignored.process in interface ResultHandler<javax.naming.directory.SearchResult,javax.naming.directory.SearchResult>process in class AbstractResultHandler<javax.naming.directory.SearchResult,javax.naming.directory.SearchResult>sc - SearchCriteria used to find enumerationl - List LDAP resultsList - LDAP resultsjavax.naming.NamingException - if the LDAP returns an errorprotected java.util.List<javax.naming.directory.SearchResult> mergeResults(java.util.List<javax.naming.directory.SearchResult> results)
throws javax.naming.NamingException
results - List of search results to mergeList of merged search resultsjavax.naming.NamingException - if an error occurs reading attribute valuesCopyright © 2014. All Rights Reserved.