Package 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 anAttributesMapper. That is, the found object is extracted from theAttributesof eachSearchResult, and then passed to the specifiedAttributesMapperfor translation.- Since:
- 1.2
-
-
Constructor Summary
Constructors Constructor Description AttributesMapperCallbackHandler(AttributesMapper<T> mapper)Constructs a new instance around the specifiedAttributesMapper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TgetObjectFromNameClassPair(javax.naming.NameClassPair nameClassPair)Cast the NameClassPair to a SearchResult and pass its attributes to theAttributesMapper.-
Methods inherited from class org.springframework.ldap.core.CollectingNameClassPairCallbackHandler
getList, handleNameClassPair
-
-
-
-
Constructor Detail
-
AttributesMapperCallbackHandler
public AttributesMapperCallbackHandler(AttributesMapper<T> mapper)
Constructs a new instance around the specifiedAttributesMapper.- Parameters:
mapper- the target mapper.
-
-
Method Detail
-
getObjectFromNameClassPair
public T getObjectFromNameClassPair(javax.naming.NameClassPair nameClassPair)
Cast the NameClassPair to a SearchResult and pass its attributes to theAttributesMapper.- Specified by:
getObjectFromNameClassPairin classCollectingNameClassPairCallbackHandler<T>- Parameters:
nameClassPair- aSearchResultinstance.- Returns:
- the Object returned from the mapper.
-
-