Class SnapshotContentItemVerifier

  • All Implemented Interfaces:
    org.springframework.batch.core.ItemWriteListener<org.duracloud.snapshot.db.model.SnapshotContentItem>, org.springframework.batch.core.StepExecutionListener, org.springframework.batch.core.StepListener, org.springframework.batch.item.ItemWriter<org.duracloud.snapshot.db.model.SnapshotContentItem>

    public class SnapshotContentItemVerifier
    extends StepExecutionSupport
    implements org.springframework.batch.item.ItemWriter<org.duracloud.snapshot.db.model.SnapshotContentItem>, org.springframework.batch.core.ItemWriteListener<org.duracloud.snapshot.db.model.SnapshotContentItem>
    Author:
    Daniel Bernstein Date: Jul 29, 2015
    • Constructor Detail

      • SnapshotContentItemVerifier

        public SnapshotContentItemVerifier​(String restoreId,
                                           File manifestFile,
                                           String snapshotName,
                                           org.duracloud.snapshot.service.RestoreManager restoreManager)
        Parameters:
        restoreId -
        manifestFile -
        snapshotName -
        restoreManager -
    • Method Detail

      • beforeWrite

        public void beforeWrite​(List<? extends org.duracloud.snapshot.db.model.SnapshotContentItem> items)
        Specified by:
        beforeWrite in interface org.springframework.batch.core.ItemWriteListener<org.duracloud.snapshot.db.model.SnapshotContentItem>
      • afterWrite

        public void afterWrite​(List<? extends org.duracloud.snapshot.db.model.SnapshotContentItem> items)
        Specified by:
        afterWrite in interface org.springframework.batch.core.ItemWriteListener<org.duracloud.snapshot.db.model.SnapshotContentItem>
      • onWriteError

        public void onWriteError​(Exception exception,
                                 List<? extends org.duracloud.snapshot.db.model.SnapshotContentItem> items)
        Specified by:
        onWriteError in interface org.springframework.batch.core.ItemWriteListener<org.duracloud.snapshot.db.model.SnapshotContentItem>
      • beforeStep

        public void beforeStep​(org.springframework.batch.core.StepExecution stepExecution)
        Specified by:
        beforeStep in interface org.springframework.batch.core.StepExecutionListener
        Overrides:
        beforeStep in class StepExecutionSupport
      • afterStep

        public org.springframework.batch.core.ExitStatus afterStep​(org.springframework.batch.core.StepExecution stepExecution)
        Specified by:
        afterStep in interface org.springframework.batch.core.StepExecutionListener
        Overrides:
        afterStep in class StepExecutionSupport
      • write

        public void write​(List<? extends org.duracloud.snapshot.db.model.SnapshotContentItem> items)
                   throws Exception
        Specified by:
        write in interface org.springframework.batch.item.ItemWriter<org.duracloud.snapshot.db.model.SnapshotContentItem>
        Throws:
        Exception