Package org.verapdf.processor
Class AbstractBatchProcessor
java.lang.Object
org.verapdf.processor.AbstractBatchProcessor
- All Implemented Interfaces:
Closeable,AutoCloseable,Component,BatchProcessor,Processor
- Direct Known Subclasses:
BatchFileProcessor
- Version:
- 0.1 Created 8 Nov 2016:22:58:09
- Author:
- Carl Wilson carlwilson AT github
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()process(File toProcess, boolean recurse, BatchProcessingHandler resultHandler) Process all .pdf files in a directory, optionally recursively.process(List<? extends File> toProcess, BatchProcessingHandler resultHandler) Process a list of PDF filesprotected abstract voidprocess(ItemDetails fileDetails, InputStream item) process(ItemDetails itemDetails, InputStream stream, BatchProcessingHandler resultHandler) protected abstract voidprocessContainer(File container, boolean recurse) protected abstract voidprocessList(List<? extends File> toProcess) protected voidprocessResult(ProcessorResult result, Boolean isLogsEnabled)
-
Field Details
-
processor
-
-
Constructor Details
-
AbstractBatchProcessor
-
-
Method Details
-
getConfig
- Specified by:
getConfigin interfaceProcessor- Returns:
- the
ProcessorConfigthat holds the details for the configuration of thisProcessor - See Also:
-
getDependencies
- Specified by:
getDependenciesin interfaceProcessor- Returns:
- a
CollectionofReleaseDetailsfor theProcessor's dependencies, for auditing. - See Also:
-
getDetails
- Specified by:
getDetailsin interfaceComponent- See Also:
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException- See Also:
-
process
public BatchSummary process(File toProcess, boolean recurse, BatchProcessingHandler resultHandler) throws VeraPDFException Description copied from interface:BatchProcessorProcess all .pdf files in a directory, optionally recursively.- Specified by:
processin interfaceBatchProcessor- Parameters:
toProcess- aFilethat denotes a directory to processrecurse- settrueto recurse into sub-directories, false if recursion not required.resultHandler- theBatchProcessingHandlerthat will be used to process the results- Returns:
- a
BatchSummarythat reports the details of the batch process - Throws:
VeraPDFException- when an error occurs during processing.
-
process
public BatchSummary process(List<? extends File> toProcess, BatchProcessingHandler resultHandler) throws VeraPDFException Description copied from interface:BatchProcessorProcess a list of PDF files- Specified by:
processin interfaceBatchProcessor- Parameters:
toProcess- aListofFiles to processresultHandler- theBatchProcessingHandlerthat will be used to process the results- Returns:
- a
BatchSummarythat reports the details of the batch process - Throws:
VeraPDFException- when an error occurs during processing.
-
process
public BatchSummary process(ItemDetails itemDetails, InputStream stream, BatchProcessingHandler resultHandler) throws VeraPDFException - Specified by:
processin interfaceBatchProcessor- Throws:
VeraPDFException
-
processContainer
- Throws:
VeraPDFException
-
processList
- Throws:
VeraPDFException
-
process
- Throws:
VeraPDFException
-
processResult
- Throws:
VeraPDFException
-