org.ldaptive.handler
Class MergeAttributeEntryHandler

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

public class MergeAttributeEntryHandler
extends AbstractSearchEntryHandler

Merges the values of one or more attributes into a single attribute. The merged attribute may or may not already exist on the entry. If it does exist it's existing values will remain intact.

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
MergeAttributeEntryHandler()
           
 
Method Summary
 String[] getAttributeNames()
          Returns the attribute names.
 String getMergeAttributeName()
          Returns the merge attribute name.
protected  void handleAttributes(Connection conn, SearchRequest request, SearchEntry entry)
          Handle the attributes of a search entry.
 int hashCode()
          
 void setAttributeNames(String... names)
          Sets the attribute names.
 void setMergeAttributeName(String name)
          Sets the merge 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

MergeAttributeEntryHandler

public MergeAttributeEntryHandler()
Method Detail

getMergeAttributeName

public String getMergeAttributeName()
Returns the merge attribute name.

Returns:
merge attribute name

setMergeAttributeName

public void setMergeAttributeName(String name)
Sets the merge attribute name.

Parameters:
name - of the merge attribute

getAttributeNames

public String[] getAttributeNames()
Returns the attribute names.

Returns:
attribute names

setAttributeNames

public void setAttributeNames(String... names)
Sets the attribute names.

Parameters:
names - of the attributes

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.