com.atlassian.crowd.integration.directory.cache
Class MicrosoftActiveDirectoryCache

java.lang.Object
  extended by com.atlassian.crowd.integration.directory.cache.DefaultDirectoryCache
      extended by com.atlassian.crowd.integration.directory.cache.LDAPDirectoryCache
          extended by com.atlassian.crowd.integration.directory.cache.MicrosoftActiveDirectoryCache
All Implemented Interfaces:
DirectoryCache, com.atlassian.event.EventListener

public class MicrosoftActiveDirectoryCache
extends LDAPDirectoryCache


Field Summary
 
Fields inherited from class com.atlassian.crowd.integration.directory.cache.LDAPDirectoryCache
dnToEntityIdentifier, entityIdentifierToDn
 
Fields inherited from class com.atlassian.crowd.integration.directory.cache.DefaultDirectoryCache
cacheManager, directoryID, groupCache, groupChildGroupsCache, groupGroupMembershipExistsCache, groupNamesCache, groupParentGroupsCache, groupPrincipalsCache, logger, maxElementsInMemoryPerSubCache, principalCache, principalGroupMembershipExistsCache, principalGroupsCache, principalNamesCache, principalRoleMembershipExistsCache, principalRolesCache, roleCache, roleNamesCache, rolePrincipalsCache
 
Constructor Summary
MicrosoftActiveDirectoryCache(long directoryID, net.sf.ehcache.CacheManager ehcacheManager, int maxElementsInMemoryPerSubCache)
           
 
Method Summary
protected  void doClear()
           
protected  void doClose()
           
protected  boolean doHandleEvent(com.atlassian.event.Event evt)
           
protected  java.lang.String getAttributeFromEntity(DirectoryEntity entity, java.lang.String key)
           
protected  EntityIdentifier getEntityIdentifier(java.lang.String guid)
           
protected  java.lang.String getGUID(EntityIdentifier identifier)
           
protected  java.lang.String getGuidFromEntity(DirectoryEntity entity)
           
protected  java.lang.Long getUSNChanged(EntityIdentifier identifier)
           
protected  java.lang.Long getUsnChangedFromEntity(DirectoryEntity entity)
           
protected  boolean isNewerThanCache(EntityIdentifier identifier, java.lang.Long usnChanged)
           
protected  void removeEntityByGUID(java.lang.String guid)
           
 void removeEntityByTombstone(Tombstone tombstone)
           
 void removeGroup(java.lang.String groupName)
          Removes a group (if it exists in the cache), along with any existing relationships of the group to principals or groups.
protected  void removeGUIDMapping(EntityType type, java.lang.String name)
           
protected  void removeGUIDMapping(java.lang.String guid)
           
 void removePrincipal(java.lang.String principalName)
          Removes a principal (if it exists in the cache), along with any existing relationships of the principal to groups or roles.
 void removeRole(java.lang.String roleName)
          Removes a role (if it exists in the cache), along with any existing relationships of the role to principals or roles.
 void storeGroup(RemoteGroup group)
          Stores a clone of the supplied group object in the cache.
protected  void storeGUIDMapping(java.lang.String guid, EntityIdentifier identifier)
           
 void storePrincipal(RemotePrincipal principal)
          Stores a clone of the supplied principal object in the cache.
 void storeRole(RemoteRole role)
          Stores a clone of the supplied group object in the cache.
protected  void storeUSNChanged(EntityIdentifier identifier, java.lang.Long usnChanged)
           
 
Methods inherited from class com.atlassian.crowd.integration.directory.cache.LDAPDirectoryCache
getDnForEntityIdentifier, getEntityIdentifierForDn, removeDnMapping, removeDnMapping, storeDnMapping, updateGroupMembersFromMemberDNs, updateRoleMembersFromMemberDNs
 
Methods inherited from class com.atlassian.crowd.integration.directory.cache.DefaultDirectoryCache
addMembership, addRelationship, clear, close, createAndConfigureCache, getAllEntityNames, getAllEntityNamesAsList, getAllGroupNames, getAllPrincipalNames, getAllRoleNames, getCompleteRelationshipsAsList, getEntity, getFromCache, getGroup, getGroupMembershipsOfGroup, getGroupMembershipsOfPrincipal, getGroupMembersOfGroup, getHandledEventClasses, getPartialSetOfGroupMembersOfGroup, getPartialSetOfPrincipalMembersOfGroup, getPartialSetOfPrincipalMembersOfRole, getPrincipal, getPrincipalMembersOfGroup, getPrincipalMembersOfRole, getRelationships, getRelationshipsAsList, getRole, getRoleMembershipsOfPrincipal, getStatistics, handleEvent, isEventForThisCache, isGroupGroupMember, isMember, isPrincipalGroupMember, isPrincipalRoleMember, lockRead, lockWrite, removeAllRelations, removeCache, removeEntity, removeGroupAsGroupMember, removeMembership, removePrincipalAsGroupMember, removePrincipalAsRoleMember, removeRelationship, setGroupAsGroupMember, setMembershipFlag, setPrincipalAsGroupMember, setPrincipalAsRoleMember, storeAllEntityNames, storeAllGroupNames, storeAllPrincipalNames, storeAllRoleNames, storeEntity, storeGroupMembershipsOfGroup, storeGroupMembershipsOfPrincipal, storeGroupMembersOfGroup, storeMembers, storeMemberships, storePrincipalMembersOfGroup, storePrincipalMembersOfRole, storeRoleMembershipsOfPrincipal, unlockRead, unlockWrite
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MicrosoftActiveDirectoryCache

public MicrosoftActiveDirectoryCache(long directoryID,
                                     net.sf.ehcache.CacheManager ehcacheManager,
                                     int maxElementsInMemoryPerSubCache)
Method Detail

doClear

protected void doClear()
Overrides:
doClear in class LDAPDirectoryCache

doClose

protected void doClose()
Overrides:
doClose in class LDAPDirectoryCache

getGuidFromEntity

protected java.lang.String getGuidFromEntity(DirectoryEntity entity)

getUsnChangedFromEntity

protected java.lang.Long getUsnChangedFromEntity(DirectoryEntity entity)

getAttributeFromEntity

protected java.lang.String getAttributeFromEntity(DirectoryEntity entity,
                                                  java.lang.String key)

isNewerThanCache

protected boolean isNewerThanCache(EntityIdentifier identifier,
                                   java.lang.Long usnChanged)

storePrincipal

public void storePrincipal(RemotePrincipal principal)
Description copied from interface: DirectoryCache
Stores a clone of the supplied principal object in the cache. If a principal with the same name already exists in the cache, then it is silently replaced.

Specified by:
storePrincipal in interface DirectoryCache
Overrides:
storePrincipal in class LDAPDirectoryCache
Parameters:
principal - principal to cache.

storeGroup

public void storeGroup(RemoteGroup group)
Description copied from interface: DirectoryCache
Stores a clone of the supplied group object in the cache. If a group with the same name already exists in the cache, then it is silently replaced.

Specified by:
storeGroup in interface DirectoryCache
Overrides:
storeGroup in class LDAPDirectoryCache
Parameters:
group - group to cache.

storeRole

public void storeRole(RemoteRole role)
Description copied from interface: DirectoryCache
Stores a clone of the supplied group object in the cache. If a group with the same name already exists in the cache, then it is silently replaced.

Specified by:
storeRole in interface DirectoryCache
Overrides:
storeRole in class LDAPDirectoryCache

removePrincipal

public void removePrincipal(java.lang.String principalName)
Description copied from interface: DirectoryCache
Removes a principal (if it exists in the cache), along with any existing relationships of the principal to groups or roles. The cache entry will be marked so that subsequent calls to getPrincipal(principalName) will throw an ObjectNotFoundException.

Specified by:
removePrincipal in interface DirectoryCache
Overrides:
removePrincipal in class LDAPDirectoryCache
Parameters:
principalName - name of principal to remove from cache.

removeGroup

public void removeGroup(java.lang.String groupName)
Description copied from interface: DirectoryCache
Removes a group (if it exists in the cache), along with any existing relationships of the group to principals or groups. The cache entry will be marked so that subsequent calls to getGroup(groupName) will throw an ObjectNotFoundException.

Specified by:
removeGroup in interface DirectoryCache
Overrides:
removeGroup in class LDAPDirectoryCache
Parameters:
groupName - name of group to remove from cache.

removeRole

public void removeRole(java.lang.String roleName)
Description copied from interface: DirectoryCache
Removes a role (if it exists in the cache), along with any existing relationships of the role to principals or roles. The cache entry will be marked so that subsequent calls to getRole(roleName) will throw an ObjectNotFoundException.

Specified by:
removeRole in interface DirectoryCache
Overrides:
removeRole in class LDAPDirectoryCache
Parameters:
roleName - name of role to remove from cache.

removeEntityByTombstone

public void removeEntityByTombstone(Tombstone tombstone)

removeEntityByGUID

protected void removeEntityByGUID(java.lang.String guid)

storeGUIDMapping

protected void storeGUIDMapping(java.lang.String guid,
                                EntityIdentifier identifier)

removeGUIDMapping

protected void removeGUIDMapping(EntityType type,
                                 java.lang.String name)

removeGUIDMapping

protected void removeGUIDMapping(java.lang.String guid)

getGUID

protected java.lang.String getGUID(EntityIdentifier identifier)

getEntityIdentifier

protected EntityIdentifier getEntityIdentifier(java.lang.String guid)

storeUSNChanged

protected void storeUSNChanged(EntityIdentifier identifier,
                               java.lang.Long usnChanged)

getUSNChanged

protected java.lang.Long getUSNChanged(EntityIdentifier identifier)

doHandleEvent

protected boolean doHandleEvent(com.atlassian.event.Event evt)
Overrides:
doHandleEvent in class DefaultDirectoryCache


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.