edu.vt.middleware.ldap.handler
Class RecursiveAttributeHandler

java.lang.Object
  extended by edu.vt.middleware.ldap.handler.AbstractResultHandler<T,T>
      extended by edu.vt.middleware.ldap.handler.CopyResultHandler<Attribute>
          extended by edu.vt.middleware.ldap.handler.CopyAttributeHandler
              extended by edu.vt.middleware.ldap.handler.RecursiveAttributeHandler
All Implemented Interfaces:
AttributeHandler, ExtendedAttributeHandler, ResultHandler<Attribute,Attribute>

public class RecursiveAttributeHandler
extends CopyAttributeHandler
implements ExtendedAttributeHandler

RecursiveAttributeHandler will recursively search for attributes of the same name and combine them into one attribute. Attribute values must represent DNs in the LDAP.

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
RecursiveAttributeHandler(Ldap l, String attrName)
          Creates a new RecursiveAttributeHandler with the supplied ldap and attribute name.
RecursiveAttributeHandler(String attrName)
          Creates a new RecursiveAttributeHandler with the supplied attribute name.
 
Method Summary
 String getAttributeName()
          Returns the attribute name that will be recursively searched on.
 Ldap getSearchResultLdap()
          Gets the Ldap used by the search operation invoking this handler.
protected  Attribute processResult(SearchCriteria sc, Attribute attr)
          This will return a deep copy of the supplied Attribute.
 void setAttributeName(String s)
          Sets the attribute name that will be recursively searched on.
 void setSearchResultLdap(Ldap l)
          Sets the Ldap used by the search operation invoking this handler.
 
Methods inherited from class edu.vt.middleware.ldap.handler.CopyAttributeHandler
processValue
 
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

RecursiveAttributeHandler

public RecursiveAttributeHandler(String attrName)
Creates a new RecursiveAttributeHandler with the supplied attribute name.

Parameters:
attrName - String

RecursiveAttributeHandler

public RecursiveAttributeHandler(Ldap l,
                                 String attrName)
Creates a new RecursiveAttributeHandler with the supplied ldap and attribute name.

Parameters:
l - Ldap
attrName - String
Method Detail

getSearchResultLdap

public Ldap getSearchResultLdap()
Gets the Ldap used by the search operation invoking this handler.

Specified by:
getSearchResultLdap in interface ExtendedAttributeHandler
Returns:
Ldap

setSearchResultLdap

public void setSearchResultLdap(Ldap l)
Sets the Ldap used by the search operation invoking this handler.

Specified by:
setSearchResultLdap in interface ExtendedAttributeHandler
Parameters:
l - Ldap

getAttributeName

public String getAttributeName()
Returns the attribute name that will be recursively searched on.

Returns:
String attribute name

setAttributeName

public void setAttributeName(String s)
Sets the attribute name that will be recursively searched on.

Parameters:
s - String

processResult

protected Attribute processResult(SearchCriteria sc,
                                  Attribute attr)
                           throws NamingException
This will return a deep copy of the supplied Attribute.

Overrides:
processResult in class CopyAttributeHandler
Parameters:
sc - SearchCriteria used to find enumeration
attr - Attribute to copy
Returns:
Attribute
Throws:
NamingException - if the attribute values cannot be read


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