Package org.dspace.checker
Class ChecksumHistoryServiceImpl
java.lang.Object
org.dspace.checker.ChecksumHistoryServiceImpl
- All Implemented Interfaces:
ChecksumHistoryService
Service implementation for the ChecksumHistory object.
This class is responsible for all business logic calls for the ChecksumHistory object and is autowired by spring.
This class should never be accessed directly.
- Author:
- kevinvandevelde at atmire.com
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ChecksumHistoryDAOprotected ChecksumResultServiceprotected MostRecentChecksumService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddHistory(Context context, MostRecentChecksum mostRecentChecksum) voiddeleteByBitstream(Context context, Bitstream bitstream) intdeleteByDateAndCode(Context context, Instant retentionDate, ChecksumResultCode checksumResultCode) Delete the history records from the database.intprune(Context context, Map<ChecksumResultCode, Long> interests) Prune the history records from the database.voidupdateMissingBitstreams(Context context)
-
Field Details
-
checksumHistoryDAO
-
mostRecentChecksumService
-
checksumResultService
-
-
Constructor Details
-
ChecksumHistoryServiceImpl
protected ChecksumHistoryServiceImpl()
-
-
Method Details
-
updateMissingBitstreams
- Specified by:
updateMissingBitstreamsin interfaceChecksumHistoryService- Throws:
SQLException
-
addHistory
- Specified by:
addHistoryin interfaceChecksumHistoryService- Throws:
SQLException
-
deleteByDateAndCode
public int deleteByDateAndCode(Context context, Instant retentionDate, ChecksumResultCode checksumResultCode) throws SQLException Delete the history records from the database.- Specified by:
deleteByDateAndCodein interfaceChecksumHistoryService- Parameters:
context- ContextretentionDate- any records older than this data are deleted.checksumResultCode- result code records must have for them to be deleted.- Returns:
- number of records deleted.
- Throws:
SQLException- if database error occurs.
-
deleteByBitstream
- Specified by:
deleteByBitstreamin interfaceChecksumHistoryService- Throws:
SQLException
-
prune
Description copied from interface:ChecksumHistoryServicePrune the history records from the database.- Specified by:
prunein interfaceChecksumHistoryService- Parameters:
context- contextinterests- set of results and the duration of time before they are removed from the database- Returns:
- number of bitstreams deleted
- Throws:
SQLException- if database error
-