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
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-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 newRecursiveAttributeHandler
with the supplied ldap and attribute name.RecursiveAttributeHandler(java.lang.String attrName)
Creates a newRecursiveAttributeHandler
with the supplied attribute name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAttributeName()
Returns the attribute name that will be recursively searched on.Ldap
getSearchResultLdap()
Gets theLdap
used by the search operation invoking this handler.protected javax.naming.directory.Attribute
processResult(SearchCriteria sc, javax.naming.directory.Attribute attr)
This will return a deep copy of the suppliedAttribute
.void
setAttributeName(java.lang.String s)
Sets the attribute name that will be recursively searched on.void
setSearchResultLdap(Ldap l)
Sets theLdap
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(java.lang.String attrName)
Creates a newRecursiveAttributeHandler
with the supplied attribute name.- Parameters:
attrName
-String
-
RecursiveAttributeHandler
public RecursiveAttributeHandler(Ldap l, java.lang.String attrName)
Creates a newRecursiveAttributeHandler
with the supplied ldap and attribute name.- Parameters:
l
-Ldap
attrName
-String
-
-
Method Detail
-
getSearchResultLdap
public Ldap getSearchResultLdap()
Gets theLdap
used by the search operation invoking this handler.- Specified by:
getSearchResultLdap
in interfaceExtendedAttributeHandler
- Returns:
Ldap
-
setSearchResultLdap
public void setSearchResultLdap(Ldap l)
Sets theLdap
used by the search operation invoking this handler.- Specified by:
setSearchResultLdap
in interfaceExtendedAttributeHandler
- Parameters:
l
-Ldap
-
getAttributeName
public java.lang.String getAttributeName()
Returns the attribute name that will be recursively searched on.- Returns:
String
attribute 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:
processResult
in classCopyAttributeHandler
- Parameters:
sc
-SearchCriteria
used to find enumerationattr
-Attribute
to copy- Returns:
Attribute
- Throws:
javax.naming.NamingException
- if the attribute values cannot be read
-
-