1
0

M4 AP-006 Altpfad entfernen und Konsistenz sauber herstellen

This commit is contained in:
2026-04-03 08:06:56 +02:00
parent ca91a60cad
commit fc30d1effd

View File

@@ -262,34 +262,46 @@ public class DefaultBatchRunProcessingUseCase implements BatchRunProcessingUseCa
// Log extraction outcome // Log extraction outcome
switch (extractionResult) { switch (extractionResult) {
case de.gecheckt.pdf.umbenenner.domain.model.PdfExtractionSuccess success -> case de.gecheckt.pdf.umbenenner.domain.model.PdfExtractionSuccess success -> {
LOG.debug("PDF extraction successful for '{}'. Pages: {}, Text length: {} chars.", LOG.debug("PDF extraction successful for '{}'. Pages: {}, Text length: {} chars.",
candidate.uniqueIdentifier(), candidate.uniqueIdentifier(),
success.pageCount().value(), success.pageCount().value(),
success.extractedText().length()); success.extractedText().length());
case de.gecheckt.pdf.umbenenner.domain.model.PdfExtractionContentError contentError -> }
case de.gecheckt.pdf.umbenenner.domain.model.PdfExtractionContentError contentError -> {
LOG.debug("PDF content extraction failed for '{}' (content problem): {}", LOG.debug("PDF content extraction failed for '{}' (content problem): {}",
candidate.uniqueIdentifier(), contentError.reason()); candidate.uniqueIdentifier(), contentError.reason());
case de.gecheckt.pdf.umbenenner.domain.model.PdfExtractionTechnicalError technicalError -> }
case de.gecheckt.pdf.umbenenner.domain.model.PdfExtractionTechnicalError technicalError -> {
LOG.debug("PDF extraction technical error for '{}': {}", LOG.debug("PDF extraction technical error for '{}': {}",
candidate.uniqueIdentifier(), technicalError.errorMessage()); candidate.uniqueIdentifier(), technicalError.errorMessage());
} }
default -> {
// Handle any other cases
}
}
DocumentProcessingOutcome outcome = DocumentProcessingOutcome outcome =
DocumentProcessingService.processDocument(candidate, extractionResult, configuration); DocumentProcessingService.processDocument(candidate, extractionResult, configuration);
// Log M3 outcome // Log M3 outcome
switch (outcome) { switch (outcome) {
case de.gecheckt.pdf.umbenenner.domain.model.PreCheckPassed passed -> case de.gecheckt.pdf.umbenenner.domain.model.PreCheckPassed passed -> {
LOG.info("Pre-checks PASSED for '{}'. Candidate ready for M4 persistence.", LOG.info("Pre-checks PASSED for '{}'. Candidate ready for M4 persistence.",
candidate.uniqueIdentifier()); candidate.uniqueIdentifier());
case de.gecheckt.pdf.umbenenner.domain.model.PreCheckFailed failed -> }
case de.gecheckt.pdf.umbenenner.domain.model.PreCheckFailed failed -> {
LOG.info("Pre-checks FAILED for '{}': {} (Deterministic content error).", LOG.info("Pre-checks FAILED for '{}': {} (Deterministic content error).",
candidate.uniqueIdentifier(), failed.failureReasonDescription()); candidate.uniqueIdentifier(), failed.failureReasonDescription());
case de.gecheckt.pdf.umbenenner.domain.model.TechnicalDocumentError technicalError -> }
case de.gecheckt.pdf.umbenenner.domain.model.TechnicalDocumentError technicalError -> {
LOG.warn("Processing FAILED for '{}': {} (Technical error retryable).", LOG.warn("Processing FAILED for '{}': {} (Technical error retryable).",
candidate.uniqueIdentifier(), technicalError.errorMessage()); candidate.uniqueIdentifier(), technicalError.errorMessage());
} }
default -> {
// Handle any other cases
}
}
return outcome; return outcome;
} }