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

java.lang.Object
  extended by com.atlassian.crowd.directory.ldap.mapper.GroupContextMapper
All Implemented Interfaces:
org.springframework.ldap.core.ContextMapper

public class GroupContextMapper
extends java.lang.Object
implements org.springframework.ldap.core.ContextMapper

Translates information returned from an LDAP directory into a LDAPGroupWithAttributes implementation of Group.


Field Summary
protected  java.util.List<AttributeMapper> customAttributeMappers
           
protected  long directoryId
           
protected  GroupType groupType
           
protected  LDAPPropertiesMapper ldapPropertiesMapper
           
 
Constructor Summary
GroupContextMapper(long directoryId, GroupType groupType, LDAPPropertiesMapper ldapPropertiesMapper, java.util.List<AttributeMapper> customAttributeMappers)
           
 
Method Summary
protected  LDAPGroupAttributesMapper getAttributesMapper()
          Split out so it can be overridden.
 java.lang.Object mapFromContext(java.lang.Object ctx)
          Called by Spring LDAP on every object fetched from the LDAP directory.
 
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

groupType

protected final GroupType groupType

ldapPropertiesMapper

protected final LDAPPropertiesMapper ldapPropertiesMapper

customAttributeMappers

protected final java.util.List<AttributeMapper> customAttributeMappers
Constructor Detail

GroupContextMapper

public GroupContextMapper(long directoryId,
                          GroupType groupType,
                          LDAPPropertiesMapper ldapPropertiesMapper,
                          java.util.List<AttributeMapper> customAttributeMappers)
Method Detail

mapFromContext

public java.lang.Object mapFromContext(java.lang.Object ctx)
                                throws org.springframework.ldap.NamingException
Called by Spring LDAP on every object fetched from the LDAP directory.

Specified by:
mapFromContext in interface org.springframework.ldap.core.ContextMapper
Parameters:
ctx - A DirContextAdapter containing information about the object
Returns:
LDAPUserWithAttributes.
Throws:
org.springframework.ldap.NamingException

getAttributesMapper

protected LDAPGroupAttributesMapper getAttributesMapper()
Split out so it can be overridden.

Returns:


Copyright © 2010 Atlassian. All Rights Reserved.