com.atlassian.crowd.integration.directory.connector.mapper.fetcher
Class SubGroupFetcher

java.lang.Object
  extended by com.atlassian.crowd.integration.directory.connector.mapper.fetcher.SubGroupFetcher
All Implemented Interfaces:
MemberFetcher

public class SubGroupFetcher
extends java.lang.Object
implements MemberFetcher

Obtains the direct members of a container. Does not recurse through subgroups - will instead return a mix of users and groups/roles.


Field Summary
protected static org.apache.log4j.Logger logger
           
 
Constructor Summary
SubGroupFetcher(org.springframework.ldap.core.LdapTemplate ldapTemplate, LDAPPropertiesMapper ldapPropertiesMapper, MemberAttributeParser memberParser, ContainerContextMapper containerMapper)
           
 
Method Summary
 void addMembers(org.springframework.ldap.core.DirContextAdapter parentContainer, DirectoryContainer container)
          Obtains a list of principal and container members and adds them to the specified DirectoryContainer.
protected  RemotePrincipal getPrincipal(org.springframework.ldap.core.DirContextAdapter member)
          Turns a suitable DirContextAdapter into a RemotePrincipal object.
protected  boolean isContainer(org.springframework.ldap.core.DirContextAdapter member)
          Returns true if the object represents a container that contains users (eg group, role)
protected  boolean isOfObjectClass(org.springframework.ldap.core.DirContextAdapter member, java.lang.String objectClassToMatch)
          Returns true if member is of the LDAP objectclass objectClassToMatch.
protected  boolean isPrincipal(org.springframework.ldap.core.DirContextAdapter member)
          Returns true if the object represents a user
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.apache.log4j.Logger logger
Constructor Detail

SubGroupFetcher

public SubGroupFetcher(org.springframework.ldap.core.LdapTemplate ldapTemplate,
                       LDAPPropertiesMapper ldapPropertiesMapper,
                       MemberAttributeParser memberParser,
                       ContainerContextMapper containerMapper)
Method Detail

addMembers

public void addMembers(org.springframework.ldap.core.DirContextAdapter parentContainer,
                       DirectoryContainer container)
Obtains a list of principal and container members and adds them to the specified DirectoryContainer.

Specified by:
addMembers in interface MemberFetcher
Parameters:
parentContainer -

isPrincipal

protected boolean isPrincipal(org.springframework.ldap.core.DirContextAdapter member)
Returns true if the object represents a user

Parameters:
member -
Returns:

isContainer

protected boolean isContainer(org.springframework.ldap.core.DirContextAdapter member)
Returns true if the object represents a container that contains users (eg group, role)

Parameters:
member -
Returns:

isOfObjectClass

protected boolean isOfObjectClass(org.springframework.ldap.core.DirContextAdapter member,
                                  java.lang.String objectClassToMatch)
Returns true if member is of the LDAP objectclass objectClassToMatch. Will match on superclasses as well, so matching on top would/should match every object.

Parameters:
member -
objectClassToMatch -
Returns:

getPrincipal

protected RemotePrincipal getPrincipal(org.springframework.ldap.core.DirContextAdapter member)
Turns a suitable DirContextAdapter into a RemotePrincipal object.

Returns:


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.