org.ldaptive.handler
Class AbstractSearchEntryHandler

java.lang.Object
  extended by org.ldaptive.handler.AbstractSearchEntryHandler
All Implemented Interfaces:
Handler<SearchRequest,SearchEntry>, SearchEntryHandler
Direct Known Subclasses:
AbstractBinaryAttributeHandler, CaseChangeEntryHandler, DnAttributeEntryHandler, MergeAttributeEntryHandler, PrimaryGroupIdHandler, RangeEntryHandler, RecursiveEntryHandler

public abstract class AbstractSearchEntryHandler
extends Object
implements SearchEntryHandler

Base class for entry handlers which simply returns values unaltered.

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

Field Summary
protected  org.slf4j.Logger logger
          Log for this class.
 
Constructor Summary
AbstractSearchEntryHandler()
           
 
Method Summary
 boolean equals(Object o)
          
 HandlerResult<SearchEntry> handle(Connection conn, SearchRequest request, SearchEntry entry)
          Handle the supplied result.
protected  void handleAttribute(Connection conn, SearchRequest request, LdapAttribute attr)
          Handle a single attribute.
protected  String handleAttributeName(Connection conn, SearchRequest request, String name)
          Returns the supplied attribute name unaltered.
protected  void handleAttributes(Connection conn, SearchRequest request, SearchEntry entry)
          Handle the attributes of a search entry.
protected  byte[] handleAttributeValue(Connection conn, SearchRequest request, byte[] value)
          Returns the supplied attribute value unaltered.
protected  String handleAttributeValue(Connection conn, SearchRequest request, String value)
          Returns the supplied attribute value unaltered.
protected  String handleDn(Connection conn, SearchRequest request, SearchEntry entry)
          Handle the dn of a search entry.
abstract  int hashCode()
          
 void initializeRequest(SearchRequest request)
          Initialize the search request for use with this entry handler.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.slf4j.Logger logger
Log for this class.

Constructor Detail

AbstractSearchEntryHandler

public AbstractSearchEntryHandler()
Method Detail

handle

public HandlerResult<SearchEntry> handle(Connection conn,
                                         SearchRequest request,
                                         SearchEntry entry)
                                  throws LdapException
Handle the supplied result.

Specified by:
handle in interface Handler<SearchRequest,SearchEntry>
Specified by:
handle in interface SearchEntryHandler
Parameters:
conn - connection the operation was executed on
request - executed by the operation
entry - produced from the operation
Returns:
handler result
Throws:
LdapException - if handling fails

handleDn

protected String handleDn(Connection conn,
                          SearchRequest request,
                          SearchEntry entry)
Handle the dn of a search entry.

Parameters:
conn - the search was performed on
request - used to find the search entry
entry - search entry to extract the dn from
Returns:
handled dn

handleAttributes

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

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

handleAttribute

protected void handleAttribute(Connection conn,
                               SearchRequest request,
                               LdapAttribute attr)
                        throws LdapException
Handle a single attribute.

Parameters:
conn - the search was performed on
request - used to find the search entry
attr - to handle
Throws:
LdapException - if the LDAP returns an error

handleAttributeName

protected String handleAttributeName(Connection conn,
                                     SearchRequest request,
                                     String name)
Returns the supplied attribute name unaltered.

Parameters:
conn - the search was performed on
request - used to find the search entry
name - to handle
Returns:
handled name

handleAttributeValue

protected String handleAttributeValue(Connection conn,
                                      SearchRequest request,
                                      String value)
Returns the supplied attribute value unaltered.

Parameters:
conn - the search was performed on
request - used to find the search entry
value - to handle
Returns:
handled value

handleAttributeValue

protected byte[] handleAttributeValue(Connection conn,
                                      SearchRequest request,
                                      byte[] value)
Returns the supplied attribute value unaltered.

Parameters:
conn - the search was performed on
request - used to find the search entry
value - to handle
Returns:
handled value

initializeRequest

public void initializeRequest(SearchRequest request)
Initialize the search request for use with this entry handler.

Specified by:
initializeRequest in interface SearchEntryHandler
Parameters:
request - to initialize for this entry handler

equals

public boolean equals(Object o)

Overrides:
equals in class Object

hashCode

public abstract int hashCode()

Overrides:
hashCode in class Object


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