Package org.springframework.ldap.core
Interface AttributesMapper<T>
-
- All Known Subinterfaces:
IncrementalAttributesMapper<T>
- All Known Implementing Classes:
AttributeCheckAttributesMapper,DefaultIncrementalAttributesMapper
public interface AttributesMapper<T>An interface used by LdapTemplate for mapping LDAP Attributes to beans. Implementions of this interface perform the actual work of extracting results, but need not worry about exception handling.NamingExceptionswill be caught and handled correctly by theLdapTemplateclass.Typically used in search methods of
LdapTemplate.AttributeMapperobjects are normally stateless and thus reusable; they are ideal for implementing attribute-mapping logic in one place.Alternatively, consider using a
ContextMapperin stead.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TmapFromAttributes(javax.naming.directory.Attributes attributes)Map Attributes to an object.
-
-
-
Method Detail
-
mapFromAttributes
T mapFromAttributes(javax.naming.directory.Attributes attributes) throws javax.naming.NamingException
Map Attributes to an object. The supplied attributes are the attributes from a single SearchResult.- Parameters:
attributes- attributes from a SearchResult.- Returns:
- an object built from the attributes.
- Throws:
javax.naming.NamingException- if any error occurs mapping the attributes
-
-