Class SynchronisationStatusManagerImpl
java.lang.Object
com.atlassian.crowd.manager.directory.SynchronisationStatusManagerImpl
- All Implemented Interfaces:
InternalSynchronisationStatusManager
,SynchronisationStatusManager
public class SynchronisationStatusManagerImpl
extends Object
implements InternalSynchronisationStatusManager
-
Constructor Summary
ConstructorDescriptionSynchronisationStatusManagerImpl
(DirectorySynchronisationInformationStore store, com.atlassian.event.api.EventPublisher eventPublisher, DirectoryDao directoryDao, Clock clock, DirectorySynchronisationTokenStore directorySynchronisationTokenStore, ClusterService clusterService) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clearSynchronisationTokenForDirectory
(long directoryId) Clears the synchronisation token for the given directorygetDirectorySynchronisationInformation
(long directoryId) Returns directory synchronisation information.getDirectorySynchronisationInformation
(Directory directory) Returns directory synchronisation information.getLastSynchronisationTokenForDirectory
(long directoryId) Returns the last stored synchronisation token for the directoryvoid
void
removeStatusesForDirectory
(long directoryId) Removes statuses for the given directoryvoid
storeSynchronisationTokenForDirectory
(long directoryId, String synchronisationToken) Store a new synchronisation token for the given directory.void
syncFailure
(long directoryId, SynchronisationMode syncMode, Throwable throwable) Notify about a failure that occurs during synchronisation.void
syncFinished
(long directoryId) Notify that directory synchronisation has finished.void
syncFinished
(long directoryId, SynchronisationStatusKey statusKey, List<Serializable> parameters) Notify that directory synchronisation has finished.void
syncStarted
(Directory directory) Notify that directory synchronisation has started.void
syncStatus
(long directoryId, SynchronisationStatusKey statusKey, List<Serializable> parameters) Notify that directory synchronisation status has changed.void
syncStatus
(long directoryId, String key, Serializable... parameters) Notify that directory synchronisation status has changed.
-
Constructor Details
-
SynchronisationStatusManagerImpl
public SynchronisationStatusManagerImpl(DirectorySynchronisationInformationStore store, com.atlassian.event.api.EventPublisher eventPublisher, DirectoryDao directoryDao, Clock clock, DirectorySynchronisationTokenStore directorySynchronisationTokenStore, ClusterService clusterService)
-
-
Method Details
-
syncStarted
Description copied from interface:SynchronisationStatusManager
Notify that directory synchronisation has started.- Specified by:
syncStarted
in interfaceSynchronisationStatusManager
- Parameters:
directory
- directory
-
syncStatus
Description copied from interface:SynchronisationStatusManager
Notify that directory synchronisation status has changed.- Specified by:
syncStatus
in interfaceSynchronisationStatusManager
- Parameters:
directoryId
- directory idkey
- synchronisation status message keyparameters
- synchronisation status message parameters
-
syncStatus
public void syncStatus(long directoryId, SynchronisationStatusKey statusKey, List<Serializable> parameters) Description copied from interface:SynchronisationStatusManager
Notify that directory synchronisation status has changed.- Specified by:
syncStatus
in interfaceSynchronisationStatusManager
- Parameters:
directoryId
- directory idstatusKey
- synchronisation status message keyparameters
- synchronisation status message parameters
-
syncFinished
public void syncFinished(long directoryId) Description copied from interface:SynchronisationStatusManager
Notify that directory synchronisation has finished.- Specified by:
syncFinished
in interfaceSynchronisationStatusManager
- Parameters:
directoryId
- directory id
-
syncFailure
Description copied from interface:SynchronisationStatusManager
Notify about a failure that occurs during synchronisation.- Specified by:
syncFailure
in interfaceSynchronisationStatusManager
- Parameters:
directoryId
- directory idsyncMode
- synchronisation modethrowable
- throwable that carries information about the failure
-
syncFinished
public void syncFinished(long directoryId, SynchronisationStatusKey statusKey, List<Serializable> parameters) Description copied from interface:SynchronisationStatusManager
Notify that directory synchronisation has finished.- Specified by:
syncFinished
in interfaceSynchronisationStatusManager
- Parameters:
directoryId
- directory idstatusKey
- synchronisation statusparameters
- parameters for statusKey
-
getDirectorySynchronisationInformation
public DirectorySynchronisationInformation getDirectorySynchronisationInformation(Directory directory) Description copied from interface:SynchronisationStatusManager
Returns directory synchronisation information. The returned value is never be null.- Specified by:
getDirectorySynchronisationInformation
in interfaceSynchronisationStatusManager
- Parameters:
directory
- directory to retrieve information from- Returns:
- directory synchronisation information
-
getDirectorySynchronisationInformation
@Transactional public DirectorySynchronisationInformation getDirectorySynchronisationInformation(long directoryId) throws DirectoryNotFoundException Description copied from interface:SynchronisationStatusManager
Returns directory synchronisation information. The returned value is never be null.- Specified by:
getDirectorySynchronisationInformation
in interfaceSynchronisationStatusManager
- Parameters:
directoryId
- directory id to retrieve information from- Returns:
- directory synchronisation information
- Throws:
DirectoryNotFoundException
-
getLastSynchronisationTokenForDirectory
Description copied from interface:SynchronisationStatusManager
Returns the last stored synchronisation token for the directory- Specified by:
getLastSynchronisationTokenForDirectory
in interfaceSynchronisationStatusManager
- Parameters:
directoryId
- the id of the directory- Returns:
- the last stored synchronisation token or null if there is no token stored in the database
-
storeSynchronisationTokenForDirectory
@Transactional public void storeSynchronisationTokenForDirectory(long directoryId, String synchronisationToken) Description copied from interface:SynchronisationStatusManager
Store a new synchronisation token for the given directory. This will overwrite the old token.- Specified by:
storeSynchronisationTokenForDirectory
in interfaceSynchronisationStatusManager
- Parameters:
directoryId
- the id of the directorysynchronisationToken
- the new token to store
-
removeStatusesForDirectory
public void removeStatusesForDirectory(long directoryId) Description copied from interface:SynchronisationStatusManager
Removes statuses for the given directory- Specified by:
removeStatusesForDirectory
in interfaceSynchronisationStatusManager
- Parameters:
directoryId
- directory id
-
getStalledSynchronizations
- Specified by:
getStalledSynchronizations
in interfaceInternalSynchronisationStatusManager
-
clearSynchronisationTokenForDirectory
@Transactional public void clearSynchronisationTokenForDirectory(long directoryId) Description copied from interface:SynchronisationStatusManager
Clears the synchronisation token for the given directory- Specified by:
clearSynchronisationTokenForDirectory
in interfaceSynchronisationStatusManager
- Parameters:
directoryId
- directory id
-
handleEvent
-