org.jasig.portlet.search.ldap
Class PersonAttributesMapper

java.lang.Object
  extended by org.jasig.portlet.search.ldap.PersonAttributesMapper
All Implemented Interfaces:
org.springframework.ldap.core.AttributesMapper

public class PersonAttributesMapper
extends java.lang.Object
implements org.springframework.ldap.core.AttributesMapper

PersonAttributesMapper constructs a Person object from an Attributes object returned from LDAP. The mapper requires an attribute name that represents the LDAP attribute for a full display name, as well as a map of attribute names and keys. In this provided map, keys should equal more consistent, useful names for Person attributes, while the values should be LDAP attribute names.

Version:
$Revision: 44239 $
Author:
Jen Bourey

Constructor Summary
PersonAttributesMapper(java.lang.String fullNameAttribute, java.util.LinkedHashMap<java.lang.String,java.lang.String> attributesMap)
          Construct a new PersonAttributesMapper
 
Method Summary
 java.util.LinkedHashMap<java.lang.String,java.lang.String> getAttributesMap()
          Return the map of attribute key/value pairs.
 java.lang.String getFullNameAttribute()
          Get the key that maps the full name attribute
 java.lang.Object mapFromAttributes(javax.naming.directory.Attributes attrs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersonAttributesMapper

public PersonAttributesMapper(java.lang.String fullNameAttribute,
                              java.util.LinkedHashMap<java.lang.String,java.lang.String> attributesMap)
Construct a new PersonAttributesMapper

Parameters:
fullNameAttribute - key for the full name attribute
attributesMap - map of key/value attribute pairs
Method Detail

mapFromAttributes

public java.lang.Object mapFromAttributes(javax.naming.directory.Attributes attrs)
                                   throws javax.naming.NamingException
Specified by:
mapFromAttributes in interface org.springframework.ldap.core.AttributesMapper
Throws:
javax.naming.NamingException

getFullNameAttribute

public java.lang.String getFullNameAttribute()
Get the key that maps the full name attribute

Returns:

getAttributesMap

public java.util.LinkedHashMap<java.lang.String,java.lang.String> getAttributesMap()
Return the map of attribute key/value pairs.

Returns:


Copyright © 2009 Jasig. All Rights Reserved.