com.atlassian.crowd.manager.directory
Interface DirectorySynchroniserHelper

All Known Implementing Classes:
DirectorySynchroniserHelperImpl

public interface DirectorySynchroniserHelper

Helper class for performing a synchronisation on the SynchronisableDirectory's cache. Implementations of this interface are responsible for ensuring that database operations are wrapped in a transaction where applicable.


Method Summary
 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.
 

Method Detail

updateSyncStartTime

void updateSyncStartTime(SynchronisableDirectory synchronisableDirectory)
                         throws DirectoryNotFoundException
Updates a SynchronisableDirectory's current synchronisation start time.

Parameters:
synchronisableDirectory - directory to update
Throws:
DirectoryNotFoundException - if the directory could not be found

updateSyncEndTime

void updateSyncEndTime(SynchronisableDirectory synchronisableDirectory)
                       throws DirectoryNotFoundException
Updates information relevant to a directory's current synchronisation end time. The duration, last sync start time and current sync start time will be updated.

updateSyncStartTime(com.atlassian.crowd.directory.SynchronisableDirectory) must have been invoked before this method call.

Parameters:
synchronisableDirectory - directory to update
Throws:
IllegalStateException - if the directory is not currently synchronising.
DirectoryNotFoundException - If the directory could not be found

isSynchronising

boolean isSynchronising(long synchronisableDirectoryId)
                        throws DirectoryNotFoundException
Returns true if the given directory is currently being synchronised.

Parameters:
synchronisableDirectoryId - synchronisable directory id
Returns:
true if the given directory is currently being synchronised
Throws:
DirectoryNotFoundException - if the directory could not be found


Copyright © 2012 Atlassian. All Rights Reserved.