com.atlassian.crowd.directory.ldap.cache
Class AbstractCacheRefresher

java.lang.Object
  extended by com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher
All Implemented Interfaces:
CacheRefresher
Direct Known Subclasses:
EventTokenChangedCacheRefresher, RemoteDirectoryCacheRefresher, UsnChangedCacheRefresher

public abstract class AbstractCacheRefresher
extends Object
implements CacheRefresher

Since:
v2.1

Field Summary
protected  RemoteDirectory remoteDirectory
           
 
Constructor Summary
AbstractCacheRefresher(RemoteDirectory remoteDirectory)
           
 
Method Summary
protected  String directoryDescription()
           
protected static
<T extends Group>
List<T>
filterOutDuplicateGroups(List<T> remoteGroups)
          Remove the duplicate groups from the passed list.
 void synchroniseAll(DirectoryCache directoryCache)
          Will visit all Users and Groups in the external directory in order to do a Full refresh.
protected abstract  List<? extends Group> synchroniseAllGroups(DirectoryCache directoryCache)
           
protected abstract  void synchroniseAllUsers(DirectoryCache directoryCache)
           
protected  void synchroniseMemberships(List<? extends Group> remoteGroups, DirectoryCache directoryCache)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.crowd.directory.ldap.cache.CacheRefresher
synchroniseChanges
 

Field Detail

remoteDirectory

protected final RemoteDirectory remoteDirectory
Constructor Detail

AbstractCacheRefresher

public AbstractCacheRefresher(RemoteDirectory remoteDirectory)
Method Detail

filterOutDuplicateGroups

protected static <T extends Group> List<T> filterOutDuplicateGroups(List<T> remoteGroups)
Remove the duplicate groups from the passed list.

Type Parameters:
T - the type of group to filter.
Parameters:
remoteGroups - the groups to filter.
Returns:
the list of groups with duplicates removed.

synchroniseAll

public void synchroniseAll(DirectoryCache directoryCache)
                    throws OperationFailedException
Description copied from interface: CacheRefresher
Will visit all Users and Groups in the external directory in order to do a Full refresh.

Specified by:
synchroniseAll in interface CacheRefresher
Parameters:
directoryCache - the DirectoryCache to update.
Throws:
OperationFailedException - if there was an error processing the operation

synchroniseAllUsers

protected abstract void synchroniseAllUsers(DirectoryCache directoryCache)
                                     throws OperationFailedException
Throws:
OperationFailedException

synchroniseAllGroups

protected abstract List<? extends Group> synchroniseAllGroups(DirectoryCache directoryCache)
                                                       throws OperationFailedException
Throws:
OperationFailedException

synchroniseMemberships

protected void synchroniseMemberships(List<? extends Group> remoteGroups,
                                      DirectoryCache directoryCache)
                               throws OperationFailedException
Throws:
OperationFailedException

directoryDescription

protected String directoryDescription()


Copyright © 2013 Atlassian. All Rights Reserved.