Class RemoteDirectoryCacheRefresher
java.lang.Object
com.atlassian.crowd.directory.synchronisation.cache.AbstractCacheRefresher
com.atlassian.crowd.directory.ldap.cache.RemoteDirectoryCacheRefresher
- All Implemented Interfaces:
CacheRefresher
- Direct Known Subclasses:
UserFilterableNonDeltaQueryCacheRefresher
A simple implementation of CacheRefresher that will only do "Full Refresh".
This is used for all LDAP servers other than AD.
- Since:
- v2.1
-
Field Summary
Fields inherited from class com.atlassian.crowd.directory.synchronisation.cache.AbstractCacheRefresher
remoteDirectory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<GroupWithAttributes>
findAllRemoteGroups
(boolean withAttributes) protected List<UserWithAttributes>
findAllRemoteUsers
(boolean withAttributes) protected PartialSynchronisationResult<? extends GroupWithAttributes>
synchroniseAllGroups
(DirectoryCache directoryCache) This method is expected to fetch the groups to update (or all currently in the remote directory) and update the directory cache (call the appropriate method for deleting and then the appropriate method for updating/adding).protected PartialSynchronisationResult<? extends UserWithAttributes>
synchroniseAllUsers
(DirectoryCache directoryCache) This method is expected to fetch the users to update (or all currently in the remote directory) and update the directory cache (call the appropriate method for deleting and then the appropriate method for updating/adding).synchroniseChanges
(DirectoryCache directoryCache, String syncToken) Attempts to synchronise changes since the last refresh as opposed to performing a full synchronisation.Methods inherited from class com.atlassian.crowd.directory.synchronisation.cache.AbstractCacheRefresher
directoryDescription, getMemberships, isGroupAttributeSynchronisationEnabled, isIncrementalSyncEnabled, isUserAttributeSynchronisationEnabled, synchroniseAll, synchroniseAllGroupAttributes, synchroniseAllUserAttributes, synchroniseMemberships
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.synchronisation.cache.CacheRefresher
synchroniseAll
-
Constructor Details
-
RemoteDirectoryCacheRefresher
-
-
Method Details
-
synchroniseChanges
public CacheSynchronisationResult synchroniseChanges(DirectoryCache directoryCache, String syncToken) throws OperationFailedException Description copied from interface:CacheRefresher
Attempts to synchronise changes since the last refresh as opposed to performing a full synchronisation. Returns true if changes since the last refresh were synchronised successfully.- Specified by:
synchroniseChanges
in interfaceCacheRefresher
- Parameters:
directoryCache
- the DirectoryCache to update.- Returns:
- result of the synchronisation
- Throws:
OperationFailedException
- if there was an error processing the operation
-
findAllRemoteUsers
protected List<UserWithAttributes> findAllRemoteUsers(boolean withAttributes) throws OperationFailedException - Throws:
OperationFailedException
-
findAllRemoteGroups
protected List<GroupWithAttributes> findAllRemoteGroups(boolean withAttributes) throws OperationFailedException - Throws:
OperationFailedException
-
synchroniseAllUsers
protected PartialSynchronisationResult<? extends UserWithAttributes> synchroniseAllUsers(DirectoryCache directoryCache) throws OperationFailedException Description copied from class:AbstractCacheRefresher
This method is expected to fetch the users to update (or all currently in the remote directory) and update the directory cache (call the appropriate method for deleting and then the appropriate method for updating/adding). This will only fetch user attributes when user attribute synchronisation is enabled. User attributes will be updated if fetched inAbstractCacheRefresher.synchroniseAll(DirectoryCache)
if the directory allows that.- Specified by:
synchroniseAllUsers
in classAbstractCacheRefresher
- Parameters:
directoryCache
- the cache which this method should update- Returns:
- list of users that were passed into the directory cache and an optional sync token if the directory has separate sync tokens for users and groups
- Throws:
OperationFailedException
-
synchroniseAllGroups
protected PartialSynchronisationResult<? extends GroupWithAttributes> synchroniseAllGroups(DirectoryCache directoryCache) throws OperationFailedException Description copied from class:AbstractCacheRefresher
This method is expected to fetch the groups to update (or all currently in the remote directory) and update the directory cache (call the appropriate method for deleting and then the appropriate method for updating/adding). This will only fetch group attributes when group attribute synchronisation is enabled. Group attributes will be updated if fetched inAbstractCacheRefresher.synchroniseAll(DirectoryCache)
if the directory allows that.- Specified by:
synchroniseAllGroups
in classAbstractCacheRefresher
- Parameters:
directoryCache
- the cache which this method should update- Returns:
- list of groups that were passed into the directory cache and an optional sync token if the directory has separate sync tokens for users and groups
- Throws:
OperationFailedException
-