Spring LDAP

org.springframework.ldap.core
Class ContextMapperCallbackHandler

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

public class ContextMapperCallbackHandler
extends CollectingNameClassPairCallbackHandler

A CollectingNameClassPairCallbackHandler to wrap a ContextMapper. That is, the found object is extracted from each Binding, and then passed to the specified ContextMapper for translation.

Since:
1.2
Author:
Mattias Hellborg Arthursson, Ulrik Sandberg

Constructor Summary
ContextMapperCallbackHandler(ContextMapper mapper)
          Constructs a new instance wrapping the supplied ContextMapper.
 
Method Summary
 Object getObjectFromNameClassPair(NameClassPair nameClassPair)
          Cast the NameClassPair to a Binding and pass its object to the ContextMapper.
 
Methods inherited from class org.springframework.ldap.core.CollectingNameClassPairCallbackHandler
getList, handleNameClassPair
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextMapperCallbackHandler

public ContextMapperCallbackHandler(ContextMapper mapper)
Constructs a new instance wrapping the supplied ContextMapper.

Parameters:
mapper - the mapper to be called for each entry.
Method Detail

getObjectFromNameClassPair

public Object getObjectFromNameClassPair(NameClassPair nameClassPair)
Cast the NameClassPair to a Binding and pass its object to the ContextMapper.

Specified by:
getObjectFromNameClassPair in class CollectingNameClassPairCallbackHandler
Parameters:
nameClassPair - a Binding instance.
Returns:
the Object returned from the mapper.

Spring LDAP