com.atlassian.crowd.directory.ldap.mapper
Class UserContextMapper

java.lang.Object
  extended by com.atlassian.crowd.directory.ldap.mapper.ContextMapperWithCustomAttributes<LDAPUserWithAttributes>
      extended by com.atlassian.crowd.directory.ldap.mapper.UserContextMapper
All Implemented Interfaces:
ContextMapperWithRequiredAttributes<LDAPUserWithAttributes>, org.springframework.ldap.core.ContextMapper
Direct Known Subclasses:
ActiveDirectoryUserContextMapper

public class UserContextMapper
extends ContextMapperWithCustomAttributes<LDAPUserWithAttributes>

Translates information returned from an LDAP directory into a LDAPUserWithAttributes implementation of User.


Field Summary
protected  long directoryId
           
protected  LDAPPropertiesMapper ldapPropertiesMapper
           
 
Fields inherited from class com.atlassian.crowd.directory.ldap.mapper.ContextMapperWithCustomAttributes
customAttributeMappers
 
Constructor Summary
UserContextMapper(long directoryId, LDAPPropertiesMapper ldapPropertiesMapper, List<AttributeMapper> customAttributeMappers)
           
 
Method Summary
protected  LDAPUserAttributesMapper getAttributesMapper()
          Split out so it can be overriden.
protected  Set<String> getCoreRequiredLdapAttributes()
           
 LDAPUserWithAttributes mapFromContext(org.springframework.ldap.core.DirContextAdapter context)
          Called by Spring LDAP on every object fetched from the LDAP directory.
 
Methods inherited from class com.atlassian.crowd.directory.ldap.mapper.ContextMapperWithCustomAttributes
aggregate, getRequiredLdapAttributes, mapFromContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

directoryId

protected final long directoryId

ldapPropertiesMapper

protected final LDAPPropertiesMapper ldapPropertiesMapper
Constructor Detail

UserContextMapper

public UserContextMapper(long directoryId,
                         LDAPPropertiesMapper ldapPropertiesMapper,
                         List<AttributeMapper> customAttributeMappers)
Method Detail

getCoreRequiredLdapAttributes

protected Set<String> getCoreRequiredLdapAttributes()
Specified by:
getCoreRequiredLdapAttributes in class ContextMapperWithCustomAttributes<LDAPUserWithAttributes>

mapFromContext

public LDAPUserWithAttributes mapFromContext(org.springframework.ldap.core.DirContextAdapter context)
                                      throws org.springframework.ldap.NamingException
Called by Spring LDAP on every object fetched from the LDAP directory.

Specified by:
mapFromContext in class ContextMapperWithCustomAttributes<LDAPUserWithAttributes>
Parameters:
context - A DirContextAdapter containing information about the object
Returns:
LDAPUserWithAttributes.
Throws:
org.springframework.ldap.NamingException

getAttributesMapper

protected LDAPUserAttributesMapper getAttributesMapper()
Split out so it can be overriden.

Returns:


Copyright © 2013 Atlassian. All Rights Reserved.