Package org.sakaiproject.unboundid
Class MultipleEmailLdapAttributeMapper
- java.lang.Object
-
- org.sakaiproject.unboundid.SimpleLdapAttributeMapper
-
- org.sakaiproject.unboundid.MultipleEmailLdapAttributeMapper
-
- All Implemented Interfaces:
LdapAttributeMapper
public class MultipleEmailLdapAttributeMapper extends SimpleLdapAttributeMapper
Adds support for finding users by email address where users may have email addresses stored across multiple LDAP attributes.Thanks to Erik Froese of NYU for the original patch
- Author:
- dmccallum@unicon.net
-
-
Constructor Summary
Constructors Constructor Description MultipleEmailLdapAttributeMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringBuilderappendSingleSearchPredicate(StringBuilder into, String physicalAttrName, String rawSearchTerm)StringgetFindUserByEmailFilter(String emailAddr)Builds a filter of the form <email-attr>=<emailAddr>List<String>getSearchableEmailAttributes()Access the list of logical attribute names searched when locating a user entry by email address.voidsetSearchableEmailAttributes(List<String> searchableEmailAttributes)Assign the list of logical attribute names to search when locating a user entry by email address.-
Methods inherited from class org.sakaiproject.unboundid.SimpleLdapAttributeMapper
escapeSearchFilterTerm, getAttributeMapping, getAttributeMappings, getFindUserByAidFilter, getFindUserByCrossAttributeSearchFilter, getFindUserByEidFilter, getManyUsersInOneSearch, getReverseAttributeMap, getReverseAttributeMappings, getSearchResultAttributes, getUserBindDn, getUserDataDn, getUserTypeMapper, getValueMappings, init, mapLdapAttributeOntoUserData, mapLdapAttributeOntoUserData, mapLdapEntryOntoUserData, mapLdapEntryToSakaiUserType, mapUserDataOntoUserEdit, reverseAttributeMap, setAttributeMappings, setUserDataDn, setUserTypeMapper, setValueMappings, usePreferredFirstName
-
-
-
-
Method Detail
-
getSearchableEmailAttributes
public List<String> getSearchableEmailAttributes()
Access the list of logical attribute names searched when locating a user entry by email address.- Returns:
- a list of logical LDAP attribute names. Will not
return
null
-
getFindUserByEmailFilter
public String getFindUserByEmailFilter(String emailAddr)
Description copied from class:SimpleLdapAttributeMapperBuilds a filter of the form <email-attr>=<emailAddr>- Specified by:
getFindUserByEmailFilterin interfaceLdapAttributeMapper- Overrides:
getFindUserByEmailFilterin classSimpleLdapAttributeMapper- Parameters:
emailAddr- an email address to search on- Returns:
- an LDAP search filter
-
appendSingleSearchPredicate
protected StringBuilder appendSingleSearchPredicate(StringBuilder into, String physicalAttrName, String rawSearchTerm)
-
setSearchableEmailAttributes
public void setSearchableEmailAttributes(List<String> searchableEmailAttributes)
Assign the list of logical attribute names to search when locating a user entry by email address. Ifnull, will have the effect of clearing the current attribute list. Note that this configuration option has no bearing on the email address which will be mapped toUserEdit.email- Parameters:
searchableEmailAttributes- a list of logical attribute names.nulltreated like an empty list.
-
-