org.springframework.ldap.core
Class ContextMapperCallbackHandler
java.lang.Object
org.springframework.ldap.core.CollectingNameClassPairCallbackHandler
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ContextMapperCallbackHandler
public ContextMapperCallbackHandler(ContextMapper mapper)
- Constructs a new instance wrapping the supplied
ContextMapper
.
- Parameters:
mapper
- the mapper to be called for each entry.
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.