org.ldaptive.handler
Class DnAttributeEntryHandler

java.lang.Object
  extended by org.ldaptive.handler.AbstractSearchEntryHandler
      extended by org.ldaptive.handler.DnAttributeEntryHandler
All Implemented Interfaces:
Handler<SearchRequest,SearchEntry>, SearchEntryHandler

public class DnAttributeEntryHandler
extends AbstractSearchEntryHandler

Adds the entry DN as an attribute to the result set. Provides a client side implementation of RFC 5020.

Version:
$Revision: 2885 $ $Date: 2014-02-05 16:28:49 -0500 (Wed, 05 Feb 2014) $
Author:
Middleware Services

Field Summary
 
Fields inherited from class org.ldaptive.handler.AbstractSearchEntryHandler
logger
 
Constructor Summary
DnAttributeEntryHandler()
           
 
Method Summary
 String getDnAttributeName()
          Returns the DN attribute name.
protected  void handleAttributes(Connection conn, SearchRequest request, SearchEntry entry)
          Handle the attributes of a search entry.
 int hashCode()
          
 boolean isAddIfExists()
          Returns whether to add the entryDN if an attribute of the same name exists.
 void setAddIfExists(boolean b)
          Sets whether to add the entryDN if an attribute of the same name exists.
 void setDnAttributeName(String name)
          Sets the DN attribute name.
 String toString()
          
 
Methods inherited from class org.ldaptive.handler.AbstractSearchEntryHandler
equals, handle, handleAttribute, handleAttributeName, handleAttributeValue, handleAttributeValue, handleDn, initializeRequest
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DnAttributeEntryHandler

public DnAttributeEntryHandler()
Method Detail

getDnAttributeName

public String getDnAttributeName()
Returns the DN attribute name.

Returns:
DN attribute name

setDnAttributeName

public void setDnAttributeName(String name)
Sets the DN attribute name.

Parameters:
name - of the DN attribute

isAddIfExists

public boolean isAddIfExists()
Returns whether to add the entryDN if an attribute of the same name exists.

Returns:
whether to add the entryDN if an attribute of the same name exists

setAddIfExists

public void setAddIfExists(boolean b)
Sets whether to add the entryDN if an attribute of the same name exists.

Parameters:
b - whether to add the entryDN if an attribute of the same name exists

handleAttributes

protected void handleAttributes(Connection conn,
                                SearchRequest request,
                                SearchEntry entry)
                         throws LdapException
Handle the attributes of a search entry.

Overrides:
handleAttributes in class AbstractSearchEntryHandler
Parameters:
conn - the search was performed on
request - used to find the search entry
entry - search entry to extract the attributes from
Throws:
LdapException - if the LDAP returns an error

hashCode

public int hashCode()

Specified by:
hashCode in class AbstractSearchEntryHandler

toString

public String toString()

Overrides:
toString in class Object


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