Package edu.vt.middleware.ldap.handler
Class CopySearchResultHandler
- java.lang.Object
-
- edu.vt.middleware.ldap.handler.AbstractResultHandler<T,T>
-
- edu.vt.middleware.ldap.handler.CopyResultHandler<javax.naming.directory.SearchResult>
-
- edu.vt.middleware.ldap.handler.CopySearchResultHandler
-
- All Implemented Interfaces:
ResultHandler<javax.naming.directory.SearchResult,javax.naming.directory.SearchResult>,SearchResultHandler
- Direct Known Subclasses:
BinarySearchResultHandler,CaseChangeSearchResultHandler,EntryDnSearchResultHandler,FqdnSearchResultHandler,MergeSearchResultHandler,RecursiveSearchResultHandler
public class CopySearchResultHandler extends CopyResultHandler<javax.naming.directory.SearchResult> implements SearchResultHandler
CopySearchResultHandlerconverts a NamingEnumeration of search results into a List of search results.- Version:
- $Revision: 1786 $ $Date: 2011-01-05 15:45:07 +0100 (Wed, 05 Jan 2011) $
- Author:
- Middleware Services
-
-
Field Summary
-
Fields inherited from class edu.vt.middleware.ldap.handler.AbstractResultHandler
logger
-
-
Constructor Summary
Constructors Constructor Description CopySearchResultHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeHandler[]getAttributeHandler()Gets the attribute handlers.protected javax.naming.directory.AttributesprocessAttributes(SearchCriteria sc, javax.naming.directory.SearchResult sr)Process the attributes of an ldap search.protected java.lang.StringprocessDn(SearchCriteria sc, javax.naming.directory.SearchResult sr)Process the dn of an ldap search result.protected javax.naming.directory.SearchResultprocessResult(SearchCriteria sc, javax.naming.directory.SearchResult sr)This will return a deep copy of the suppliedSearchResult.voidsetAttributeHandler(AttributeHandler[] ah)Sets the attribute handlers.-
Methods inherited from class edu.vt.middleware.ldap.handler.AbstractResultHandler
process, process, process
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface edu.vt.middleware.ldap.handler.ResultHandler
process, process, process
-
-
-
-
Method Detail
-
getAttributeHandler
public AttributeHandler[] getAttributeHandler()
Gets the attribute handlers.- Specified by:
getAttributeHandlerin interfaceSearchResultHandler- Returns:
AttributeHandler[]
-
setAttributeHandler
public void setAttributeHandler(AttributeHandler[] ah)
Sets the attribute handlers.- Specified by:
setAttributeHandlerin interfaceSearchResultHandler- Parameters:
ah-AttributeHandler[]
-
processResult
protected javax.naming.directory.SearchResult processResult(SearchCriteria sc, javax.naming.directory.SearchResult sr) throws javax.naming.NamingException
This will return a deep copy of the suppliedSearchResult.- Overrides:
processResultin classCopyResultHandler<javax.naming.directory.SearchResult>- Parameters:
sc-SearchCriteriaused to find enumerationsr-SearchResultto copy- Returns:
SearchResult- Throws:
javax.naming.NamingException- if the result cannot be read
-
processDn
protected java.lang.String processDn(SearchCriteria sc, javax.naming.directory.SearchResult sr)
Process the dn of an ldap search result.- Parameters:
sc-SearchCriteriaused to find search resultsr-SearchResultto extract the dn from- Returns:
Stringprocessed dn
-
processAttributes
protected javax.naming.directory.Attributes processAttributes(SearchCriteria sc, javax.naming.directory.SearchResult sr) throws javax.naming.NamingException
Process the attributes of an ldap search.- Parameters:
sc-SearchCriteriaused to find search resultsr-SearchResultto extract the attributes from- Returns:
Attributesprocessed attributes- Throws:
javax.naming.NamingException- if the LDAP returns an error
-
-