com.atlassian.crowd.directory.ldap.mapper
Class EntityContextMapper
java.lang.Object
com.atlassian.crowd.directory.ldap.mapper.EntityContextMapper
- All Implemented Interfaces:
- org.springframework.ldap.core.ContextMapper
public class EntityContextMapper
- extends Object
- implements org.springframework.ldap.core.ContextMapper
Maps either a RemotePrincipal, RemoteGroup or RemoteRole.
If a context can be mapped to either a RemoteGroup or a
RemoteRole, the RemoteGroup is given preference.
Constructor Summary |
EntityContextMapper(LDAPPropertiesMapper ldapPropertiesMapper,
org.springframework.ldap.core.ContextMapper principalContextMapper,
org.springframework.ldap.core.ContextMapper groupContextMapper,
org.springframework.ldap.core.ContextMapper roleContextMapper,
org.springframework.ldap.core.DistinguishedName principalDN,
org.springframework.ldap.core.DistinguishedName groupDN,
org.springframework.ldap.core.DistinguishedName roleDN)
|
Method Summary |
protected boolean |
isGroup(org.springframework.ldap.core.DirContextAdapter ctx)
|
protected boolean |
isInSubtreeScope(org.springframework.ldap.core.DirContextAdapter ctx,
org.springframework.ldap.core.DistinguishedName baseDN)
|
protected boolean |
isOfObjectClass(org.springframework.ldap.core.DirContextAdapter ctx,
String objectClassToMatch)
Returns true if member is of the LDAP objectclass objectClassToMatch . |
protected boolean |
isPrincipal(org.springframework.ldap.core.DirContextAdapter ctx)
|
protected boolean |
isRole(org.springframework.ldap.core.DirContextAdapter ctx)
|
Object |
mapFromContext(Object ctx)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EntityContextMapper
public EntityContextMapper(LDAPPropertiesMapper ldapPropertiesMapper,
org.springframework.ldap.core.ContextMapper principalContextMapper,
org.springframework.ldap.core.ContextMapper groupContextMapper,
org.springframework.ldap.core.ContextMapper roleContextMapper,
org.springframework.ldap.core.DistinguishedName principalDN,
org.springframework.ldap.core.DistinguishedName groupDN,
org.springframework.ldap.core.DistinguishedName roleDN)
mapFromContext
public Object mapFromContext(Object ctx)
- Specified by:
mapFromContext
in interface org.springframework.ldap.core.ContextMapper
isPrincipal
protected boolean isPrincipal(org.springframework.ldap.core.DirContextAdapter ctx)
isGroup
protected boolean isGroup(org.springframework.ldap.core.DirContextAdapter ctx)
isRole
protected boolean isRole(org.springframework.ldap.core.DirContextAdapter ctx)
isOfObjectClass
protected boolean isOfObjectClass(org.springframework.ldap.core.DirContextAdapter ctx,
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:
ctx
- objectClassToMatch
-
- Returns:
isInSubtreeScope
protected boolean isInSubtreeScope(org.springframework.ldap.core.DirContextAdapter ctx,
org.springframework.ldap.core.DistinguishedName baseDN)
Copyright © 2012 Atlassian. All Rights Reserved.