Spring LDAP

org.springframework.ldap.core
Class AttributesMapperCallbackHandler

java.lang.Object
  extended by org.springframework.ldap.core.CollectingNameClassPairCallbackHandler
      extended by org.springframework.ldap.core.AttributesMapperCallbackHandler
All Implemented Interfaces:
NameClassPairCallbackHandler

public class AttributesMapperCallbackHandler
extends CollectingNameClassPairCallbackHandler

A CollectingNameClassPairCallbackHandler to wrap an AttributesMapper. That is, the found object is extracted from the Attributes of each SearchResult, and then passed to the specified AttributesMapper for translation.

Since:
1.2
Author:
Mattias Hellborg Arthursson, Ulrik Sandberg

Constructor Summary
AttributesMapperCallbackHandler(AttributesMapper mapper)
          Constructs a new instance around the specified AttributesMapper.
 
Method Summary
 Object getObjectFromNameClassPair(NameClassPair nameClassPair)
          Cast the NameClassPair to a SearchResult and pass its attributes to the AttributesMapper.
 
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

AttributesMapperCallbackHandler

public AttributesMapperCallbackHandler(AttributesMapper mapper)
Constructs a new instance around the specified AttributesMapper.

Parameters:
mapper - the target mapper.
Method Detail

getObjectFromNameClassPair

public Object getObjectFromNameClassPair(NameClassPair nameClassPair)
Cast the NameClassPair to a SearchResult and pass its attributes to the AttributesMapper.

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

Spring LDAP