Spring LDAP

org.springframework.ldap.core
Class CollectingNameClassPairCallbackHandler

java.lang.Object
  extended by org.springframework.ldap.core.CollectingNameClassPairCallbackHandler
All Implemented Interfaces:
NameClassPairCallbackHandler
Direct Known Subclasses:
AttributesMapperCallbackHandler, ContextMapperCallbackHandler, LdapTemplate.MappingCollectingNameClassPairCallbackHandler

public abstract class CollectingNameClassPairCallbackHandler
extends Object
implements NameClassPairCallbackHandler

A NameClassPairCallbackHandler to collect all results in an internal List.

Author:
Mattias Hellborg Arthursson
See Also:
LdapTemplate

Constructor Summary
CollectingNameClassPairCallbackHandler()
           
 
Method Summary
 List getList()
          Get the assembled list.
abstract  Object getObjectFromNameClassPair(NameClassPair nameClassPair)
          Handle a NameClassPair and transform it to an Object of the desired type and with data from the NameClassPair.
 void handleNameClassPair(NameClassPair nameClassPair)
          Pass on the supplied NameClassPair to getObjectFromNameClassPair(NameClassPair) and add the result to the internal list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectingNameClassPairCallbackHandler

public CollectingNameClassPairCallbackHandler()
Method Detail

getList

public List getList()
Get the assembled list.

Returns:
the list of all assembled objects.

handleNameClassPair

public void handleNameClassPair(NameClassPair nameClassPair)
Pass on the supplied NameClassPair to getObjectFromNameClassPair(NameClassPair) and add the result to the internal list.

Specified by:
handleNameClassPair in interface NameClassPairCallbackHandler
Parameters:
nameClassPair - the NameClassPair returned from the NamingEnumeration.

getObjectFromNameClassPair

public abstract Object getObjectFromNameClassPair(NameClassPair nameClassPair)
Handle a NameClassPair and transform it to an Object of the desired type and with data from the NameClassPair.

Parameters:
nameClassPair - a NameClassPair from a search operation.
Returns:
an object constructed from the data in the NameClassPair.

Spring LDAP