- java.lang.Object
-
- org.duracloud.snapshot.service.impl.SnapshotManagerImpl
-
- All Implemented Interfaces:
org.duracloud.snapshot.service.SnapshotManager
@Component public class SnapshotManagerImpl extends Object implements org.duracloud.snapshot.service.SnapshotManager
- Author:
- Daniel Bernstein Date: Jul 31, 2014
-
-
Field Summary
Fields Modifier and Type Field Description static intMAX_DAYS_IN_CLEANUPprotected static String[]METADATA_FILENAMES
-
Constructor Summary
Constructors Constructor Description SnapshotManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.duracloud.snapshot.db.model.SnapshotaddAlternateSnapshotIds(org.duracloud.snapshot.db.model.Snapshot snapshot, List<String> alternateIds)voidaddContentItem(org.duracloud.snapshot.db.model.Snapshot snapshot, String contentId, Map<String,String> props)voiddeleteSnapshot(String snapshotId)voidfinalizeSnapshots()protected voidsetBridgeConfig(BridgeConfiguration bridgeConfig)protected voidsetEventLog(org.duracloud.snapshot.service.EventLog eventLog)For testing purposes onlyprotected voidsetNotificationManager(org.duracloud.common.notification.NotificationManager notificationManager)For testing purposes onlyvoidsetSecondsBetweenCleanupFailureNotifications(long secondsBetweenCleanupFailureNotifications)protected voidsetSnapshotContentItemRepo(org.duracloud.snapshot.db.repo.SnapshotContentItemRepo snapshotContentItemRepo)For testing purposes onlyprotected voidsetSnapshotRepo(org.duracloud.snapshot.db.repo.SnapshotRepo snapshotRepo)For testing purposes onlyprotected voidsetSnapshotTaskClientHelper(SnapshotTaskClientHelper snapshotTaskClientHelper)For testing purposes onlyvoidsetStoreClientHelper(StoreClientHelper storeClientHelper)org.duracloud.snapshot.db.model.SnapshottransferError(String snapshotId, String errorDetails)org.duracloud.snapshot.db.model.SnapshottransferToStorageComplete(String snapshotId)org.duracloud.snapshot.db.model.SnapshotupdateHistory(org.duracloud.snapshot.db.model.Snapshot snapshot, String history)
-
-
-
Field Detail
-
MAX_DAYS_IN_CLEANUP
public static final int MAX_DAYS_IN_CLEANUP
- See Also:
- Constant Field Values
-
METADATA_FILENAMES
protected static String[] METADATA_FILENAMES
-
-
Method Detail
-
setSnapshotContentItemRepo
protected void setSnapshotContentItemRepo(org.duracloud.snapshot.db.repo.SnapshotContentItemRepo snapshotContentItemRepo)
For testing purposes only- Parameters:
snapshotContentItemRepo- the snapshotContentItemRepo to set
-
setSnapshotRepo
protected void setSnapshotRepo(org.duracloud.snapshot.db.repo.SnapshotRepo snapshotRepo)
For testing purposes only- Parameters:
snapshotRepo- the snapshotRepo to set
-
setNotificationManager
protected void setNotificationManager(org.duracloud.common.notification.NotificationManager notificationManager)
For testing purposes only- Parameters:
notificationManager- the notificationManager to set
-
setSnapshotTaskClientHelper
protected void setSnapshotTaskClientHelper(SnapshotTaskClientHelper snapshotTaskClientHelper)
For testing purposes only- Parameters:
snapshotTaskClientHelper- the snapshotTaskClientHelper to set
-
setBridgeConfig
protected void setBridgeConfig(BridgeConfiguration bridgeConfig)
- Parameters:
bridgeConfig- the bridgeConfig to set
-
setEventLog
protected void setEventLog(org.duracloud.snapshot.service.EventLog eventLog)
For testing purposes only- Parameters:
eventLog- the event log
-
addContentItem
@Transactional public void addContentItem(org.duracloud.snapshot.db.model.Snapshot snapshot, String contentId, Map<String,String> props) throws org.duracloud.snapshot.SnapshotException- Specified by:
addContentItemin interfaceorg.duracloud.snapshot.service.SnapshotManager- Throws:
org.duracloud.snapshot.SnapshotException
-
addAlternateSnapshotIds
@Transactional public org.duracloud.snapshot.db.model.Snapshot addAlternateSnapshotIds(org.duracloud.snapshot.db.model.Snapshot snapshot, List<String> alternateIds) throws org.duracloud.snapshot.service.AlternateIdAlreadyExistsException- Specified by:
addAlternateSnapshotIdsin interfaceorg.duracloud.snapshot.service.SnapshotManager- Throws:
org.duracloud.snapshot.service.AlternateIdAlreadyExistsException
-
transferToStorageComplete
@Transactional public org.duracloud.snapshot.db.model.Snapshot transferToStorageComplete(String snapshotId) throws org.duracloud.snapshot.SnapshotException
- Specified by:
transferToStorageCompletein interfaceorg.duracloud.snapshot.service.SnapshotManager- Throws:
org.duracloud.snapshot.SnapshotException
-
transferError
@Transactional public org.duracloud.snapshot.db.model.Snapshot transferError(String snapshotId, String errorDetails) throws org.duracloud.snapshot.SnapshotException
- Specified by:
transferErrorin interfaceorg.duracloud.snapshot.service.SnapshotManager- Throws:
org.duracloud.snapshot.SnapshotException
-
finalizeSnapshots
@Transactional public void finalizeSnapshots()
- Specified by:
finalizeSnapshotsin interfaceorg.duracloud.snapshot.service.SnapshotManager
-
updateHistory
@Transactional public org.duracloud.snapshot.db.model.Snapshot updateHistory(org.duracloud.snapshot.db.model.Snapshot snapshot, String history)- Specified by:
updateHistoryin interfaceorg.duracloud.snapshot.service.SnapshotManager
-
setStoreClientHelper
public void setStoreClientHelper(StoreClientHelper storeClientHelper)
- Parameters:
storeClientHelper- the storeClientHelper to set
-
deleteSnapshot
@Transactional public void deleteSnapshot(String snapshotId)
- Specified by:
deleteSnapshotin interfaceorg.duracloud.snapshot.service.SnapshotManager
-
setSecondsBetweenCleanupFailureNotifications
public void setSecondsBetweenCleanupFailureNotifications(long secondsBetweenCleanupFailureNotifications)
- Parameters:
secondsBetweenCleanupFailureNotifications- the secondsBetweenCleanupFailureNotifications to set
-
-