public class SpaceItemWriter extends StepExecutionSupport implements org.springframework.batch.item.ItemWriter<org.duracloud.common.model.ContentItem>, org.springframework.batch.core.ItemWriteListener<org.duracloud.common.model.ContentItem>
ERRORS_KEY, ITEMS_READ_KEY| Constructor and Description |
|---|
SpaceItemWriter(Snapshot snapshot,
org.duracloud.retrieval.source.RetrievalSource retrievalSource,
File contentDir,
org.duracloud.retrieval.mgmt.OutputWriter outputWriter,
BufferedWriter propsWriter,
BufferedWriter md5Writer,
BufferedWriter sha256Writer,
SnapshotManager snapshotManager,
SpaceManifestDpnManifestVerifier spaceManifestDpnManifestVerifier) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.batch.core.ExitStatus |
afterStep(org.springframework.batch.core.StepExecution stepExecution) |
void |
afterWrite(List<? extends org.duracloud.common.model.ContentItem> items) |
void |
beforeStep(org.springframework.batch.core.StepExecution stepExecution) |
void |
beforeWrite(List<? extends org.duracloud.common.model.ContentItem> items) |
void |
onWriteError(Exception e,
List<? extends org.duracloud.common.model.ContentItem> items) |
protected void |
retrieveFile(org.duracloud.common.model.ContentItem contentItem,
File directory) |
protected void |
retrieveFile(org.duracloud.common.model.ContentItem contentItem,
File directory,
boolean writeChecksums,
boolean lastItem) |
protected void |
retrieveSnapshotProperties() |
void |
write(List<? extends org.duracloud.common.model.ContentItem> items) |
protected void |
writeContentProperties(String contentId,
Map<String,String> props,
boolean lastItem) |
protected void |
writeMD5Checksum(String contentId,
String md5Checksum) |
protected void |
writeSHA256Checksum(String contentId,
File localFile) |
addError, addToItemsRead, addToLong, clearErrors, failExecution, getErrors, getExecutionContext, getItemsRead, getLongValue, getStepExecution, resetContextState, setIsTest, skipLinesAlreadyRead, verifySpacepublic SpaceItemWriter(Snapshot snapshot, org.duracloud.retrieval.source.RetrievalSource retrievalSource, File contentDir, org.duracloud.retrieval.mgmt.OutputWriter outputWriter, BufferedWriter propsWriter, BufferedWriter md5Writer, BufferedWriter sha256Writer, SnapshotManager snapshotManager, SpaceManifestDpnManifestVerifier spaceManifestDpnManifestVerifier)
public void write(List<? extends org.duracloud.common.model.ContentItem> items) throws IOException
write in interface org.springframework.batch.item.ItemWriter<org.duracloud.common.model.ContentItem>IOExceptionprotected void retrieveFile(org.duracloud.common.model.ContentItem contentItem,
File directory)
throws IOException
IOExceptionprotected void retrieveFile(org.duracloud.common.model.ContentItem contentItem,
File directory,
boolean writeChecksums,
boolean lastItem)
throws IOException
IOExceptionprotected void writeMD5Checksum(String contentId, String md5Checksum) throws IOException
IOExceptionprotected void writeSHA256Checksum(String contentId, File localFile) throws IOException
IOExceptionprotected void writeContentProperties(String contentId, Map<String,String> props, boolean lastItem) throws IOException
IOExceptionprotected void retrieveSnapshotProperties()
public org.springframework.batch.core.ExitStatus afterStep(org.springframework.batch.core.StepExecution stepExecution)
afterStep in interface org.springframework.batch.core.StepExecutionListenerafterStep in class StepExecutionSupportpublic void beforeStep(org.springframework.batch.core.StepExecution stepExecution)
beforeStep in interface org.springframework.batch.core.StepExecutionListenerbeforeStep in class StepExecutionSupportpublic void onWriteError(Exception e, List<? extends org.duracloud.common.model.ContentItem> items)
onWriteError in interface org.springframework.batch.core.ItemWriteListener<org.duracloud.common.model.ContentItem>public void beforeWrite(List<? extends org.duracloud.common.model.ContentItem> items)
beforeWrite in interface org.springframework.batch.core.ItemWriteListener<org.duracloud.common.model.ContentItem>public void afterWrite(List<? extends org.duracloud.common.model.ContentItem> items)
afterWrite in interface org.springframework.batch.core.ItemWriteListener<org.duracloud.common.model.ContentItem>Copyright © 2014–2017 DuraSpace. All rights reserved.