Package com.atlassian.crowd.embedded.spi
Interface DirectorySynchronisationStatusDao
- All Known Implementing Classes:
DirectorySynchronisationStatusDAOHibernate
@ExperimentalSpi
public interface DirectorySynchronisationStatusDao
A DAO to store synchronisation progress and results
-
Method Summary
Modifier and TypeMethodDescriptionadd
(DirectorySynchronisationStatus status) Saves a new synchronisation statusfindActiveForDirectory
(long directoryId) findActiveSyncsWhereNodeIdNotIn
(Set<String> nodesIds) findLastForDirectory
(long directoryId) long
Removes all stored status informationlong
removeAllExcept
(long directoryId, int statusId) Removes all stored status information for the directory except the indicated onelong
removeStatusesForDirectory
(Long directoryId) Removes all stored status information for the directory with the specified idupdate
(DirectorySynchronisationStatus status) Updates an existing directory status
-
Method Details
-
findActiveForDirectory
- Returns:
- the status of the latest active synchronization for the given directory if present
-
findLastForDirectory
- Returns:
- the status of the latest completed synchronization for the given directory if present
-
add
Saves a new synchronisation status- Returns:
- the newly saved status
-
update
DirectorySynchronisationStatus update(DirectorySynchronisationStatus status) throws ObjectNotFoundException Updates an existing directory status- Returns:
- the updated status. Must have an id set
- Throws:
ObjectNotFoundException
- if a status with the given id doesn't exist
-
removeStatusesForDirectory
Removes all stored status information for the directory with the specified id- Parameters:
directoryId
- the directory id to remove for- Returns:
- the number of entries removed
-
removeAll
long removeAll()Removes all stored status information- Returns:
- the number of entries removed
-
removeAllExcept
long removeAllExcept(long directoryId, int statusId) Removes all stored status information for the directory except the indicated one- Parameters:
directoryId
- the directory idstatusId
- the id of the status to keep- Returns:
- the number of entries removed
-
findActiveSyncsWhereNodeIdNotIn
- Parameters:
nodesIds
- the set of node ids to filter on- Returns:
- entries for synchronisations that are indicated as active but not owned by any of the nodes ids
-