Package edu.vt.middleware.ldap.handler
Class RecursiveAttributeHandler
- java.lang.Object
-
- edu.vt.middleware.ldap.handler.AbstractResultHandler<T,T>
-
- edu.vt.middleware.ldap.handler.CopyResultHandler<javax.naming.directory.Attribute>
-
- edu.vt.middleware.ldap.handler.CopyAttributeHandler
-
- edu.vt.middleware.ldap.handler.RecursiveAttributeHandler
-
- All Implemented Interfaces:
AttributeHandler,ExtendedAttributeHandler,ResultHandler<javax.naming.directory.Attribute,javax.naming.directory.Attribute>
public class RecursiveAttributeHandler extends CopyAttributeHandler implements ExtendedAttributeHandler
RecursiveAttributeHandlerwill 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-24 00:10:53 +0200 (Mon, 24 May 2010) $
- Author:
- Middleware Services
-
-
Field Summary
-
Fields inherited from class edu.vt.middleware.ldap.handler.AbstractResultHandler
logger
-
-
Constructor Summary
Constructors Constructor Description RecursiveAttributeHandler(Ldap l, java.lang.String attrName)Creates a newRecursiveAttributeHandlerwith the supplied ldap and attribute name.RecursiveAttributeHandler(java.lang.String attrName)Creates a newRecursiveAttributeHandlerwith the supplied attribute name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAttributeName()Returns the attribute name that will be recursively searched on.LdapgetSearchResultLdap()Gets theLdapused by the search operation invoking this handler.protected javax.naming.directory.AttributeprocessResult(SearchCriteria sc, javax.naming.directory.Attribute attr)This will return a deep copy of the suppliedAttribute.voidsetAttributeName(java.lang.String s)Sets the attribute name that will be recursively searched on.voidsetSearchResultLdap(Ldap l)Sets theLdapused 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(java.lang.String attrName)
Creates a newRecursiveAttributeHandlerwith the supplied attribute name.- Parameters:
attrName-String
-
RecursiveAttributeHandler
public RecursiveAttributeHandler(Ldap l, java.lang.String attrName)
Creates a newRecursiveAttributeHandlerwith the supplied ldap and attribute name.- Parameters:
l-LdapattrName-String
-
-
Method Detail
-
getSearchResultLdap
public Ldap getSearchResultLdap()
Gets theLdapused by the search operation invoking this handler.- Specified by:
getSearchResultLdapin interfaceExtendedAttributeHandler- Returns:
Ldap
-
setSearchResultLdap
public void setSearchResultLdap(Ldap l)
Sets theLdapused by the search operation invoking this handler.- Specified by:
setSearchResultLdapin interfaceExtendedAttributeHandler- Parameters:
l-Ldap
-
getAttributeName
public java.lang.String getAttributeName()
Returns the attribute name that will be recursively searched on.- Returns:
Stringattribute name
-
setAttributeName
public void setAttributeName(java.lang.String s)
Sets the attribute name that will be recursively searched on.- Parameters:
s-String
-
processResult
protected javax.naming.directory.Attribute processResult(SearchCriteria sc, javax.naming.directory.Attribute attr) throws javax.naming.NamingException
This will return a deep copy of the suppliedAttribute.- Overrides:
processResultin classCopyAttributeHandler- Parameters:
sc-SearchCriteriaused to find enumerationattr-Attributeto copy- Returns:
Attribute- Throws:
javax.naming.NamingException- if the attribute values cannot be read
-
-