org.springframework.ldap
Class LdapTemplate.AttributesMapperCallbackHandler

java.lang.Object
  extended byorg.springframework.ldap.CollectingNameClassPairCallbackHandler
      extended byorg.springframework.ldap.LdapTemplate.AttributesMapperCallbackHandler
All Implemented Interfaces:
NameClassPairCallbackHandler
Enclosing class:
LdapTemplate

public class LdapTemplate.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. This class needs to be nested, since we want to be able to get hold of the exception translator of this instance.

Author:
Mattias Arthursson, Ulrik Sandberg

Constructor Summary
LdapTemplate.AttributesMapperCallbackHandler(AttributesMapper mapper)
           
 
Method Summary
 java.lang.Object getObjectFromNameClassPair(javax.naming.NameClassPair nameClassPair)
          Cast the NameClassPair to a SearchResult and pass its attributes to the AttributesMapper.
 
Methods inherited from class org.springframework.ldap.CollectingNameClassPairCallbackHandler
getList, handleNameClassPair
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LdapTemplate.AttributesMapperCallbackHandler

public LdapTemplate.AttributesMapperCallbackHandler(AttributesMapper mapper)
Method Detail

getObjectFromNameClassPair

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


Copyright � 2002-2006. All Rights Reserved.