Class 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 Detail

      • METADATA_FILENAMES

        protected static String[] METADATA_FILENAMES
    • Constructor Detail

      • SnapshotManagerImpl

        public SnapshotManagerImpl()
    • 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:
        addContentItem in interface org.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:
        addAlternateSnapshotIds in interface org.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:
        transferToStorageComplete in interface org.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:
        transferError in interface org.duracloud.snapshot.service.SnapshotManager
        Throws:
        org.duracloud.snapshot.SnapshotException
      • finalizeSnapshots

        @Transactional
        public void finalizeSnapshots()
        Specified by:
        finalizeSnapshots in interface org.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:
        updateHistory in interface org.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:
        deleteSnapshot in interface org.duracloud.snapshot.service.SnapshotManager
      • setSecondsBetweenCleanupFailureNotifications

        public void setSecondsBetweenCleanupFailureNotifications​(long secondsBetweenCleanupFailureNotifications)
        Parameters:
        secondsBetweenCleanupFailureNotifications - the secondsBetweenCleanupFailureNotifications to set