| Constructor and Description |
|---|
RetrievalWorker(ContentItem contentItem,
RetrievalSource source,
File contentDir,
boolean overwrite,
OutputWriter outWriter,
boolean createSpaceDir,
boolean applyTimestamps)
Creates a Retrieval Worker to handle retrieving a file
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyTimestamps(ContentStream content,
File localFile) |
protected boolean |
checksumsMatch(File localFile) |
protected boolean |
checksumsMatch(File localFile,
String remoteChecksum) |
protected void |
deleteFile(File localFile) |
protected void |
fail(String errMsg) |
protected String |
getChecksum(File localFile) |
protected Map<String,String> |
getContentProperties() |
File |
getLocalFile() |
protected void |
noChangeNeeded(String localFilePath) |
protected File |
renameFile(File localFile) |
Map<String,String> |
retrieveFile() |
Map<String,String> |
retrieveFile(RetrievalListener listener) |
protected Map<String,String> |
retrieveToFile(File localFile,
RetrievalListener listener)
Transfers the remote file stream to the local file
|
void |
run() |
protected void |
succeed(String localFilePath) |
public RetrievalWorker(ContentItem contentItem, RetrievalSource source, File contentDir, boolean overwrite, OutputWriter outWriter, boolean createSpaceDir, boolean applyTimestamps)
public Map<String,String> retrieveFile(RetrievalListener listener)
public File getLocalFile()
protected boolean checksumsMatch(File localFile) throws IOException
IOExceptionprotected boolean checksumsMatch(File localFile, String remoteChecksum) throws IOException
IOExceptionprotected String getChecksum(File localFile) throws IOException
IOExceptionprotected File renameFile(File localFile) throws IOException
IOExceptionprotected void deleteFile(File localFile) throws IOException
IOExceptionprotected Map<String,String> retrieveToFile(File localFile, RetrievalListener listener) throws IOException
localFile - listener - IOExceptionprotected void applyTimestamps(ContentStream content, File localFile)
protected void noChangeNeeded(String localFilePath)
protected void succeed(String localFilePath)
protected void fail(String errMsg)
Copyright © 2009–2017 DuraSpace. All rights reserved.