Package edu.vt.middleware.ldap.handler
Class EntryDnSearchResultHandler
- 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
-
- edu.vt.middleware.ldap.handler.EntryDnSearchResultHandler
-
- All Implemented Interfaces:
ResultHandler<javax.naming.directory.SearchResult,javax.naming.directory.SearchResult>,SearchResultHandler
public class EntryDnSearchResultHandler extends CopySearchResultHandler
EntryDnSearchResultHandleradds the search result DN as an attribute to the result set. Provides a client side implementation of RFC 5020.- Version:
- $Revision: 1330 $ $Date: 2010-05-24 00:10:53 +0200 (Mon, 24 May 2010) $
- Author:
- Middleware Services
-
-
Field Summary
-
Fields inherited from class edu.vt.middleware.ldap.handler.AbstractResultHandler
logger
-
-
Constructor Summary
Constructors Constructor Description EntryDnSearchResultHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDnAttributeName()Returns the DN attribute name.booleanisAddIfExists()Returns whether to add the entryDN if an attribute of the same name exists.protected javax.naming.directory.AttributesprocessAttributes(SearchCriteria sc, javax.naming.directory.SearchResult sr)Process the attributes of an ldap search.voidsetAddIfExists(boolean b)Sets whether to add the entryDN if an attribute of the same name exists.voidsetDnAttributeName(java.lang.String s)Sets the DN attribute name.-
Methods inherited from class edu.vt.middleware.ldap.handler.CopySearchResultHandler
getAttributeHandler, processDn, processResult, setAttributeHandler
-
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
-
getDnAttributeName
public java.lang.String getDnAttributeName()
Returns the DN attribute name.- Returns:
String
-
setDnAttributeName
public void setDnAttributeName(java.lang.String s)
Sets the DN attribute name.- Parameters:
s-String
-
isAddIfExists
public boolean isAddIfExists()
Returns whether to add the entryDN if an attribute of the same name exists.- Returns:
boolean
-
setAddIfExists
public void setAddIfExists(boolean b)
Sets whether to add the entryDN if an attribute of the same name exists.- Parameters:
b-boolean
-
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.- Overrides:
processAttributesin classCopySearchResultHandler- 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
-
-