org.springframework.ldap.core
Class AttributesMapperCallbackHandler<T>
java.lang.Object
org.springframework.ldap.core.CollectingNameClassPairCallbackHandler<T>
org.springframework.ldap.core.AttributesMapperCallbackHandler<T>
- All Implemented Interfaces:
- NameClassPairCallbackHandler
public class AttributesMapperCallbackHandler<T>
- extends CollectingNameClassPairCallbackHandler<T>
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AttributesMapperCallbackHandler
public AttributesMapperCallbackHandler(AttributesMapper<T> mapper)
- Constructs a new instance around the specified
AttributesMapper.
- Parameters:
mapper - the target mapper.
getObjectFromNameClassPair
public T getObjectFromNameClassPair(NameClassPair nameClassPair)
- Cast the NameClassPair to a SearchResult and pass its attributes to the
AttributesMapper.
- Specified by:
getObjectFromNameClassPair in class CollectingNameClassPairCallbackHandler<T>
- Parameters:
nameClassPair - a SearchResult instance.
- Returns:
- the Object returned from the mapper.