org.springframework.ldap.core
Class AttributesMapperCallbackHandler
java.lang.Object
org.springframework.ldap.core.CollectingNameClassPairCallbackHandler
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AttributesMapperCallbackHandler
public AttributesMapperCallbackHandler(AttributesMapper mapper)
- Constructs a new instance around the specified
AttributesMapper
.
- Parameters:
mapper
- the target mapper.
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.