|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.crowd.manager.directory.DirectorySynchroniserHelperImpl
@Transactional 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 | |
---|---|
Directory |
findDirectoryById(long directoryId)
Returns a Directory based on the passed in directoryId . |
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 |
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
DirectorySynchroniserHelper
SynchronisableDirectory
's current synchronisation start time.
updateSyncStartTime
in interface DirectorySynchroniserHelper
synchronisableDirectory
- directory to update
DirectoryNotFoundException
- if the directory could not be foundpublic void updateSyncEndTime(SynchronisableDirectory synchronisableDirectory) throws DirectoryNotFoundException
DirectorySynchroniserHelper
DirectorySynchroniserHelper.updateSyncStartTime(com.atlassian.crowd.directory.SynchronisableDirectory)
must have been invoked
before this method call.
updateSyncEndTime
in interface DirectorySynchroniserHelper
synchronisableDirectory
- directory to update
DirectoryNotFoundException
- If the directory could not be foundpublic boolean isSynchronising(long synchronisableDirectoryId) throws DirectoryNotFoundException
DirectorySynchroniserHelper
isSynchronising
in interface DirectorySynchroniserHelper
synchronisableDirectoryId
- synchronisable directory id
DirectoryNotFoundException
- if the directory could not be foundpublic Directory findDirectoryById(long directoryId) throws DirectoryNotFoundException
DirectorySynchroniserHelper
directoryId
.
Essentially equivalent to DirectoryManager.findDirectoryById(long)
, it exists to obtain the directory
configuration without introducing a dependency on the complex DirectoryManager
.
findDirectoryById
in interface DirectorySynchroniserHelper
directoryId
- the id of the directory to find
DirectoryNotFoundException
- is thrown if the Directory cannot 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 |