Package org.springframework.ldap.core
Class ContextMapperCallbackHandler<T>
java.lang.Object
org.springframework.ldap.core.CollectingNameClassPairCallbackHandler<T>
org.springframework.ldap.core.ContextMapperCallbackHandler<T>
- All Implemented Interfaces:
NameClassPairCallbackHandler
- Direct Known Subclasses:
ContextMapperCallbackHandlerWithControls
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
-
Constructor Summary
ConstructorDescriptionContextMapperCallbackHandler
(ContextMapper<T> mapper) Constructs a new instance wrapping the suppliedContextMapper
. -
Method Summary
Modifier and TypeMethodDescriptiongetObjectFromNameClassPair
(NameClassPair nameClassPair) Cast the NameClassPair to aBinding
and pass its object to the ContextMapper.Methods inherited from class org.springframework.ldap.core.CollectingNameClassPairCallbackHandler
getList, handleNameClassPair
-
Constructor Details
-
ContextMapperCallbackHandler
Constructs a new instance wrapping the suppliedContextMapper
.- Parameters:
mapper
- the mapper to be called for each entry.
-
-
Method Details
-
getObjectFromNameClassPair
Cast the NameClassPair to aBinding
and pass its object to the ContextMapper.- Specified by:
getObjectFromNameClassPair
in classCollectingNameClassPairCallbackHandler<T>
- Parameters:
nameClassPair
- a Binding instance.- Returns:
- the Object returned from the mapper.
- Throws:
NamingException
- if an error occurs.ObjectRetrievalException
- if the object of the nameClassPair is null.
-