Nachbearbeitung: verbliebene M4-Referenzen nach Umbenennung bereinigt
This commit is contained in:
@@ -87,7 +87,7 @@ public class DefaultBatchRunProcessingUseCase implements BatchRunProcessingUseCa
|
|||||||
private final SourceDocumentCandidatesPort sourceDocumentCandidatesPort;
|
private final SourceDocumentCandidatesPort sourceDocumentCandidatesPort;
|
||||||
private final PdfTextExtractionPort pdfTextExtractionPort;
|
private final PdfTextExtractionPort pdfTextExtractionPort;
|
||||||
private final FingerprintPort fingerprintPort;
|
private final FingerprintPort fingerprintPort;
|
||||||
private final DocumentProcessingCoordinator m4DocumentProcessor;
|
private final DocumentProcessingCoordinator documentProcessingCoordinator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the batch use case with the already-loaded startup configuration and all
|
* Creates the batch use case with the already-loaded startup configuration and all
|
||||||
@@ -104,7 +104,7 @@ public class DefaultBatchRunProcessingUseCase implements BatchRunProcessingUseCa
|
|||||||
* must not be null
|
* must not be null
|
||||||
* @param fingerprintPort for computing the SHA-256 fingerprint of a candidate;
|
* @param fingerprintPort for computing the SHA-256 fingerprint of a candidate;
|
||||||
* must not be null
|
* must not be null
|
||||||
* @param m4DocumentProcessor for applying decision logic and persisting results;
|
* @param documentProcessingCoordinator for applying decision logic and persisting results;
|
||||||
* must not be null
|
* must not be null
|
||||||
* @throws NullPointerException if any parameter is null
|
* @throws NullPointerException if any parameter is null
|
||||||
*/
|
*/
|
||||||
@@ -114,7 +114,7 @@ public class DefaultBatchRunProcessingUseCase implements BatchRunProcessingUseCa
|
|||||||
SourceDocumentCandidatesPort sourceDocumentCandidatesPort,
|
SourceDocumentCandidatesPort sourceDocumentCandidatesPort,
|
||||||
PdfTextExtractionPort pdfTextExtractionPort,
|
PdfTextExtractionPort pdfTextExtractionPort,
|
||||||
FingerprintPort fingerprintPort,
|
FingerprintPort fingerprintPort,
|
||||||
DocumentProcessingCoordinator m4DocumentProcessor) {
|
DocumentProcessingCoordinator documentProcessingCoordinator) {
|
||||||
this.configuration = Objects.requireNonNull(configuration, "configuration must not be null");
|
this.configuration = Objects.requireNonNull(configuration, "configuration must not be null");
|
||||||
this.runLockPort = Objects.requireNonNull(runLockPort, "runLockPort must not be null");
|
this.runLockPort = Objects.requireNonNull(runLockPort, "runLockPort must not be null");
|
||||||
this.sourceDocumentCandidatesPort = Objects.requireNonNull(
|
this.sourceDocumentCandidatesPort = Objects.requireNonNull(
|
||||||
@@ -122,8 +122,8 @@ public class DefaultBatchRunProcessingUseCase implements BatchRunProcessingUseCa
|
|||||||
this.pdfTextExtractionPort = Objects.requireNonNull(
|
this.pdfTextExtractionPort = Objects.requireNonNull(
|
||||||
pdfTextExtractionPort, "pdfTextExtractionPort must not be null");
|
pdfTextExtractionPort, "pdfTextExtractionPort must not be null");
|
||||||
this.fingerprintPort = Objects.requireNonNull(fingerprintPort, "fingerprintPort must not be null");
|
this.fingerprintPort = Objects.requireNonNull(fingerprintPort, "fingerprintPort must not be null");
|
||||||
this.m4DocumentProcessor = Objects.requireNonNull(
|
this.documentProcessingCoordinator = Objects.requireNonNull(
|
||||||
m4DocumentProcessor, "m4DocumentProcessor must not be null");
|
documentProcessingCoordinator, "documentProcessingCoordinator must not be null");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -236,10 +236,10 @@ public class DefaultBatchRunProcessingUseCase implements BatchRunProcessingUseCa
|
|||||||
// Delegate the complete processing logic to the processor
|
// Delegate the complete processing logic to the processor
|
||||||
// The processor handles loading document master record, checking terminal status,
|
// The processor handles loading document master record, checking terminal status,
|
||||||
// executing pipeline only when needed, and persisting results consistently
|
// executing pipeline only when needed, and persisting results consistently
|
||||||
m4DocumentProcessor.processWithM3Execution(
|
documentProcessingCoordinator.processWithM3Execution(
|
||||||
candidate,
|
candidate,
|
||||||
fingerprint,
|
fingerprint,
|
||||||
context,
|
context,
|
||||||
attemptStart,
|
attemptStart,
|
||||||
this::runM3Pipeline); // Pass the executor as a function
|
this::runM3Pipeline); // Pass the executor as a function
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ public class BootstrapRunner {
|
|||||||
new SqliteProcessingAttemptRepositoryAdapter(jdbcUrl);
|
new SqliteProcessingAttemptRepositoryAdapter(jdbcUrl);
|
||||||
UnitOfWorkPort unitOfWorkPort =
|
UnitOfWorkPort unitOfWorkPort =
|
||||||
new SqliteUnitOfWorkAdapter(jdbcUrl);
|
new SqliteUnitOfWorkAdapter(jdbcUrl);
|
||||||
DocumentProcessingCoordinator m4Processor =
|
DocumentProcessingCoordinator documentProcessingCoordinator =
|
||||||
new DocumentProcessingCoordinator(documentRecordRepository, processingAttemptRepository, unitOfWorkPort);
|
new DocumentProcessingCoordinator(documentRecordRepository, processingAttemptRepository, unitOfWorkPort);
|
||||||
return new DefaultBatchRunProcessingUseCase(
|
return new DefaultBatchRunProcessingUseCase(
|
||||||
config,
|
config,
|
||||||
@@ -180,7 +180,7 @@ public class BootstrapRunner {
|
|||||||
new SourceDocumentCandidatesPortAdapter(config.sourceFolder()),
|
new SourceDocumentCandidatesPortAdapter(config.sourceFolder()),
|
||||||
new PdfTextExtractionPortAdapter(),
|
new PdfTextExtractionPortAdapter(),
|
||||||
fingerprintPort,
|
fingerprintPort,
|
||||||
m4Processor);
|
documentProcessingCoordinator);
|
||||||
};
|
};
|
||||||
this.commandFactory = SchedulerBatchCommand::new;
|
this.commandFactory = SchedulerBatchCommand::new;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user