Spring LDAP

Interface AttributesMapper

All Known Subinterfaces:
All Known Implementing Classes:
AttributeCheckAttributesMapper, DefaultIncrementalAttributesMapper

public interface AttributesMapper

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. NamingExceptions will be caught and handled correctly by the LdapTemplate class.

Typically used in search methods of LdapTemplate. AttributeMapper objects are normally stateless and thus reusable; they are ideal for implementing attribute-mapping logic in one place.

Alternatively, consider using a ContextMapper in stead.

Mattias Hellborg Arthursson
See Also:
LdapTemplate.search(Name, String, AttributesMapper), LdapTemplate.lookup(Name, AttributesMapper), ContextMapper

Method Summary
 Object mapFromAttributes(Attributes attributes)
          Map Attributes to an object.

Method Detail


Object mapFromAttributes(Attributes attributes)
                         throws NamingException
Map Attributes to an object. The supplied attributes are the attributes from a single SearchResult.

attributes - attributes from a SearchResult.
an object built from the attributes.
NamingException - if any error occurs mapping the attributes

Spring LDAP