org.springframework.ldap
Class CollectingNameClassPairCallbackHandler

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

public abstract class CollectingNameClassPairCallbackHandler
extends java.lang.Object
implements NameClassPairCallbackHandler

A NameClassPairCallbackHandler to collect all results in an internal List.

Author:
Mattias Arthursson
See Also:
LdapTemplate

Constructor Summary
CollectingNameClassPairCallbackHandler()
           
 
Method Summary
 java.util.List getList()
          Get the assembled list.
abstract  java.lang.Object getObjectFromNameClassPair(javax.naming.NameClassPair nameClassPair)
          Handle a NameClassPair and transform it to an Object of the desired type and with data from the NameClassPair.
 void handleNameClassPair(javax.naming.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 java.util.List getList()
Get the assembled list.

Returns:
the list of all assembled objects.

handleNameClassPair

public void handleNameClassPair(javax.naming.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 java.lang.Object getObjectFromNameClassPair(javax.naming.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.


Copyright 2002-2006. All Rights Reserved.