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

java.lang.Object
  extended by com.atlassian.crowd.directory.ldap.mapper.ContextMapperWithCustomAttributes<LDAPGroupWithAttributes>
      extended by com.atlassian.crowd.directory.ldap.mapper.GroupContextMapper
All Implemented Interfaces:
ContextMapperWithRequiredAttributes<LDAPGroupWithAttributes>, org.springframework.ldap.core.ContextMapper

public class GroupContextMapper
extends ContextMapperWithCustomAttributes<LDAPGroupWithAttributes>

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


Field Summary
protected  long directoryId
           
protected  GroupType groupType
           
protected  LDAPPropertiesMapper ldapPropertiesMapper
           
 
Fields inherited from class com.atlassian.crowd.directory.ldap.mapper.ContextMapperWithCustomAttributes
customAttributeMappers
 
Constructor Summary
GroupContextMapper(long directoryId, GroupType groupType, LDAPPropertiesMapper ldapPropertiesMapper, List<AttributeMapper> customAttributeMappers)
           
 
Method Summary
protected  LDAPGroupAttributesMapper getAttributesMapper()
          Split out so it can be overridden.
protected  Set<String> getCoreRequiredLdapAttributes()
           
 LDAPGroupWithAttributes 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

groupType

protected final GroupType groupType

ldapPropertiesMapper

protected final LDAPPropertiesMapper ldapPropertiesMapper
Constructor Detail

GroupContextMapper

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

getCoreRequiredLdapAttributes

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

mapFromContext

public LDAPGroupWithAttributes 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<LDAPGroupWithAttributes>
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 © 2014 Atlassian. All Rights Reserved.