edu.vt.middleware.ldap.handler
Class EntryDnSearchResultHandler

java.lang.Object
  extended by edu.vt.middleware.ldap.handler.AbstractResultHandler<T,T>
      extended by edu.vt.middleware.ldap.handler.CopyResultHandler<SearchResult>
          extended by edu.vt.middleware.ldap.handler.CopySearchResultHandler
              extended by edu.vt.middleware.ldap.handler.EntryDnSearchResultHandler
All Implemented Interfaces:
ResultHandler<SearchResult,SearchResult>, SearchResultHandler

public class EntryDnSearchResultHandler
extends CopySearchResultHandler

EntryDnSearchResultHandler adds 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-23 18:10:53 -0400 (Sun, 23 May 2010) $
Author:
Middleware Services

Field Summary
 
Fields inherited from class edu.vt.middleware.ldap.handler.AbstractResultHandler
logger
 
Constructor Summary
EntryDnSearchResultHandler()
           
 
Method Summary
 String getDnAttributeName()
          Returns the DN attribute name.
 boolean isAddIfExists()
          Returns whether to add the entryDN if an attribute of the same name exists.
protected  Attributes processAttributes(SearchCriteria sc, SearchResult sr)
          Process the attributes of an ldap search.
 void setAddIfExists(boolean b)
          Sets whether to add the entryDN if an attribute of the same name exists.
 void setDnAttributeName(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
 

Constructor Detail

EntryDnSearchResultHandler

public EntryDnSearchResultHandler()
Method Detail

getDnAttributeName

public String getDnAttributeName()
Returns the DN attribute name.

Returns:
String

setDnAttributeName

public void setDnAttributeName(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 Attributes processAttributes(SearchCriteria sc,
                                       SearchResult sr)
                                throws NamingException
Process the attributes of an ldap search.

Overrides:
processAttributes in class CopySearchResultHandler
Parameters:
sc - SearchCriteria used to find search result
sr - SearchResult to extract the attributes from
Returns:
Attributes processed attributes
Throws:
NamingException - if the LDAP returns an error


Copyright © 2003-2010 Virginia Tech. All Rights Reserved.