Package org.springframework.ldap.core
Class CollectingNameClassPairCallbackHandler<T>
java.lang.Object
org.springframework.ldap.core.CollectingNameClassPairCallbackHandler<T>
- All Implemented Interfaces:
NameClassPairCallbackHandler
- Direct Known Subclasses:
AttributesMapperCallbackHandler
,ContextMapperCallbackHandler
,LdapTemplate.MappingCollectingNameClassPairCallbackHandler
public abstract class CollectingNameClassPairCallbackHandler<T>
extends Object
implements NameClassPairCallbackHandler
A NameClassPairCallbackHandler to collect all results in an internal List.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetList()
Get the assembled list.abstract T
getObjectFromNameClassPair
(NameClassPair nameClassPair) Handle a NameClassPair and transform it to an Object of the desired type and with data from the NameClassPair.final void
handleNameClassPair
(NameClassPair nameClassPair) Pass on the supplied NameClassPair togetObjectFromNameClassPair(NameClassPair)
and add the result to the internal list.
-
Constructor Details
-
CollectingNameClassPairCallbackHandler
public CollectingNameClassPairCallbackHandler()
-
-
Method Details
-
getList
Get the assembled list.- Returns:
- the list of all assembled objects.
-
handleNameClassPair
Pass on the supplied NameClassPair togetObjectFromNameClassPair(NameClassPair)
and add the result to the internal list.- Specified by:
handleNameClassPair
in interfaceNameClassPairCallbackHandler
- Parameters:
nameClassPair
- the NameClassPair returned from theNamingEnumeration
.- Throws:
NamingException
- if an error occurs.
-
getObjectFromNameClassPair
Handle a NameClassPair and transform it to an Object of the desired type and with data from the NameClassPair.- Parameters:
nameClassPair
- a NameClassPair from a search operation.- Returns:
- an object constructed from the data in the NameClassPair.
- Throws:
NamingException
- if an error occurs.
-