public class BatchStatus extends Object
Constructor and Description |
---|
BatchStatus(Collection<File> filesFailed,
int noOfFilesProcessed,
RemoteFile resultFile,
List<FileBatchJob.ExceptionOccurrence> exceptions)
Create a new BatchStatus object for a specific bitarchive.
|
BatchStatus(String bitArchiveAppId,
Collection<File> filesFailed,
int noOfFilesProcessed,
RemoteFile resultFile,
List<FileBatchJob.ExceptionOccurrence> exceptions)
Create a new BatchStatus object for a specific bitarchive.
|
Modifier and Type | Method and Description |
---|---|
void |
appendResults(OutputStream stream)
Append the results of a batch job into a stream.
|
void |
copyResults(File targetFile)
Copy the results of a batch job into a local file.
|
String |
getBitArchiveAppId()
Get the appId (internal string) for the bitarchive that these are the results from.
|
List<FileBatchJob.ExceptionOccurrence> |
getExceptions()
Get the list of exceptions that happened during the batch job.
|
Collection<File> |
getFilesFailed()
Get the File objects for the files that failed.
|
int |
getNoOfFilesProcessed()
Get the number of files processed by the batch job.
|
RemoteFile |
getResultFile()
Get the file containing results from a batch job.
|
boolean |
hasResultFile()
Returns true if this object has a result file.
|
String |
toString()
Returns a human-readable description of this object.
|
public BatchStatus(String bitArchiveAppId, Collection<File> filesFailed, int noOfFilesProcessed, RemoteFile resultFile, List<FileBatchJob.ExceptionOccurrence> exceptions)
bitArchiveAppId
- The application ID identifying the bitarchive, that run this batch job.filesFailed
- A list of files that the batch job could not process.noOfFilesProcessed
- The total number of files processedresultFile
- A file containing the result of the batch jobexceptions
- A list of exceptions caught during the execution of the batchJobpublic BatchStatus(Collection<File> filesFailed, int noOfFilesProcessed, RemoteFile resultFile, List<FileBatchJob.ExceptionOccurrence> exceptions)
filesFailed
- A list of files that the batch job could not processnoOfFilesProcessed
- The total number of files processedresultFile
- A file containing the result of the batch jobexceptions
- A list of exceptions caught during the execution of the batchJobpublic int getNoOfFilesProcessed()
public Collection<File> getFilesFailed()
public String getBitArchiveAppId()
public RemoteFile getResultFile()
public List<FileBatchJob.ExceptionOccurrence> getExceptions()
public void copyResults(File targetFile) throws IllegalState
targetFile
- File to copy the results into. This file will be overridden if hasResultFile() returns true;IllegalState
- If the results have already been copied, or there are no results to copy due to errors.public void appendResults(OutputStream stream) throws IllegalState
stream
- A stream to append results to.IllegalState
- If the results have already been copied, or there are no results to copy due to errors.public boolean hasResultFile()
Copyright © 2005–2018 The Royal Danish Library, the National Library of France and the Austrian National Library.. All rights reserved.