Class RestoreManagerImpl
java.lang.Object
org.duracloud.snapshot.service.impl.RestoreManagerImpl
- All Implemented Interfaces:
RestoreManager
- Author:
- Daniel Bernstein Date: Jul 15, 2014
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancelRestore(String restoreId) protected StringextractAccountId(String host) voidgetBySnapshotId(String snapshotId) getRestoration(String restorationId) voidinit(RestoreManagerConfig config, SnapshotJobManager jobManager) requestRestoreSnapshot(String snapshotId, DuracloudEndPointConfig destination, String userEmail) restartRestore(String restoreId) restoreCompleted(String restorationId) restoreSnapshot(String snapshotId, DuracloudEndPointConfig destination, String userEmail) protected voidsetBridgeConfig(BridgeConfiguration bridgeConfig) For testing purposes onlyprotected voidsetEventLog(EventLog eventLog) For testing purposes onlyprotected voidsetNotificationManager(org.duracloud.common.notification.NotificationManager notificationManager) For testing purposes onlyprotected voidsetRestoreRepo(RestoreRepo restoreRepo) For testing purposes onlyprotected voidsetSnapshotManager(SnapshotManager snapshotManager) For testing purposes onlyprotected voidsetSnapshotRepo(SnapshotRepo snapshotRepo) For testing purposes onlyprotected voidsetStoreClientHelper(StoreClientHelper storeClientHelper) For testing purposes onlytransitionRestoreStatus(String restorationId, org.duracloud.snapshot.dto.RestoreStatus status, String message)
-
Constructor Details
-
RestoreManagerImpl
public RestoreManagerImpl()
-
-
Method Details
-
setSnapshotRepo
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
-
setRestoreRepo
For testing purposes only- Parameters:
restoreRepo- the restoreRepo to set
-
setStoreClientHelper
For testing purposes only- Parameters:
storeClientHelper- the storeClientHelper to set
-
setEventLog
For testing purposes only- Parameters:
eventLog- the event log to set
-
setBridgeConfig
For testing purposes only- Parameters:
bridgeConfig- the bridgeConfig to set
-
setSnapshotManager
For testing purposes only- Parameters:
snapshotManager- The snapshot manager
-
restoreSnapshot
public Restoration restoreSnapshot(String snapshotId, DuracloudEndPointConfig destination, String userEmail) throws SnapshotNotFoundException, SnapshotInProcessException, SnapshotException - Specified by:
restoreSnapshotin interfaceRestoreManager- Throws:
SnapshotNotFoundExceptionSnapshotInProcessExceptionSnapshotException
-
requestRestoreSnapshot
public Snapshot requestRestoreSnapshot(String snapshotId, DuracloudEndPointConfig destination, String userEmail) throws SnapshotException - Specified by:
requestRestoreSnapshotin interfaceRestoreManager- Throws:
SnapshotException
-
extractAccountId
-
getRestoration
- Parameters:
restorationId- of the restore object- Returns:
- the restoration
- Throws:
RestorationNotFoundException- if the restoration is not found
-
restoreCompleted
public Restoration restoreCompleted(String restorationId) throws SnapshotNotFoundException, SnapshotInProcessException, NoRestorationInProcessException, SnapshotException - Specified by:
restoreCompletedin interfaceRestoreManager- Throws:
SnapshotNotFoundExceptionSnapshotInProcessExceptionNoRestorationInProcessExceptionSnapshotException
-
init
- Specified by:
initin interfaceRestoreManager
-
get
- Specified by:
getin interfaceRestoreManager- Throws:
RestorationNotFoundException
-
getBySnapshotId
- Specified by:
getBySnapshotIdin interfaceRestoreManager- Throws:
RestorationNotFoundException
-
transitionRestoreStatus
@Transactional public Restoration transitionRestoreStatus(String restorationId, org.duracloud.snapshot.dto.RestoreStatus status, String message) throws InvalidStateTransitionException, RestorationNotFoundException - Specified by:
transitionRestoreStatusin interfaceRestoreManager- Throws:
InvalidStateTransitionExceptionRestorationNotFoundException
-
finalizeRestores
@Transactional public void finalizeRestores()- Specified by:
finalizeRestoresin interfaceRestoreManager
-
cancelRestore
- Specified by:
cancelRestorein interfaceRestoreManager- Throws:
SnapshotException
-
restartRestore
- Specified by:
restartRestorein interfaceRestoreManager- Throws:
SnapshotException
-