|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.crowd.manager.directory.DirectorySynchroniserHelperImpl
public class DirectorySynchroniserHelperImpl
A DirectorySynchroniserHelper that requests a SynchronisableDirectory synchronises its cache, and
stores synchronisation information in the Directory's attributes.
| Constructor Summary | |
|---|---|
DirectorySynchroniserHelperImpl(DirectoryDao directoryDao,
com.atlassian.event.api.EventPublisher eventPublisher)
|
|
| Method Summary | |
|---|---|
void |
handleEvent(DirectoryUpdatedEvent event)
Removes SynchronisableDirectoryProperties.IS_SYNCHRONISING
attribute from the updated directory, so we can recognise when
a directory requires initial synchronisation. |
boolean |
isSynchronising(long synchronisableDirectoryId)
Returns true if the given directory is currently being synchronised. |
void |
synchronise(SynchronisableDirectory remoteDirectory,
SynchronisationMode mode,
SynchronisationStatusManager synchronisationStatusManager)
Calls synchronisableDirectory's
SynchronisableDirectory.synchroniseCache(com.atlassian.crowd.embedded.api.Directory, SynchronisationMode, SynchronisationStatusManager)
method. |
void |
updateSyncEndTime(SynchronisableDirectory synchronisableDirectory)
Updates information relevant to a directory's current synchronisation end time. |
void |
updateSyncStartTime(SynchronisableDirectory synchronisableDirectory)
Updates a SynchronisableDirectory's current synchronisation start time. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DirectorySynchroniserHelperImpl(DirectoryDao directoryDao,
com.atlassian.event.api.EventPublisher eventPublisher)
| Method Detail |
|---|
public void updateSyncStartTime(SynchronisableDirectory synchronisableDirectory)
throws DirectoryNotFoundException
DirectorySynchroniserHelperSynchronisableDirectory's current synchronisation start time.
updateSyncStartTime in interface DirectorySynchroniserHelpersynchronisableDirectory - directory to update
DirectoryNotFoundException - if the directory could not be found
public void updateSyncEndTime(SynchronisableDirectory synchronisableDirectory)
throws DirectoryNotFoundException
DirectorySynchroniserHelperDirectorySynchroniserHelper.updateSyncStartTime(com.atlassian.crowd.directory.SynchronisableDirectory) must have been invoked
before this method call.
updateSyncEndTime in interface DirectorySynchroniserHelpersynchronisableDirectory - directory to update
DirectoryNotFoundException - If the directory could not be found
public boolean isSynchronising(long synchronisableDirectoryId)
throws DirectoryNotFoundException
DirectorySynchroniserHelper
isSynchronising in interface DirectorySynchroniserHelpersynchronisableDirectoryId - synchronisable directory id
DirectoryNotFoundException - if the directory could not be found
public void synchronise(SynchronisableDirectory remoteDirectory,
SynchronisationMode mode,
SynchronisationStatusManager synchronisationStatusManager)
throws OperationFailedException,
DirectoryNotFoundException
DirectorySynchroniserHelpersynchronisableDirectory's
SynchronisableDirectory.synchroniseCache(com.atlassian.crowd.embedded.api.Directory, SynchronisationMode, SynchronisationStatusManager)
method.
synchronise in interface DirectorySynchroniserHelperremoteDirectory - the directory to synchronise.mode - synchronisation modesynchronisationStatusManager - listener for synchronisation status change notifications
OperationFailedException - If the synchronisation failed
DirectoryNotFoundException - if the directory could not be found@EventListener public void handleEvent(DirectoryUpdatedEvent event)
SynchronisableDirectoryProperties.IS_SYNCHRONISING
attribute from the updated directory, so we can recognise when
a directory requires initial synchronisation.
event - directory update event
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||