refactor: remove PdfMetadata/PdfAMetadata, use result DTOs directly

PdfMetadata and PdfAMetadata were redundant intermediate classes that
mirrored PdfValidationResult and PdfAValidationResult exactly.

Changes:
- Delete PdfMetadata.cs and PdfAMetadata.cs
- IPdfProcessor.ValidateAsync now returns PdfValidationResult directly
- IPdfProcessor.ValidatePdfAAsync now returns PdfAValidationResult directly
- ValidatePdfQueryHandler: remove IMapper dependency, return result directly
- ValidatePdfAQueryHandler: remove IMapper dependency, return result directly
- MappingProfile: remove the two now-obsolete CreateMap calls
- PdfValidationResult: add IsEncrypted parameter (was missing)
This commit is contained in:
2026-08-28 11:45:33 +02:00
parent 9cb964379f
commit ef78fb5cdd
7 changed files with 9 additions and 88 deletions

View File

@@ -15,7 +15,7 @@ public interface IPdfProcessor
/// <exception cref="Domain.Common.Exceptions.BadRequestException">
/// Thrown when stream is empty, invalid, or not positioned at the beginning
/// </exception>
Task<PdfMetadata> ValidateAsync(Stream pdfStream);
Task<PdfValidationResult> ValidateAsync(Stream pdfStream);
/// <summary>
/// Validates a PDF/A document and checks conformance level.
@@ -28,7 +28,7 @@ public interface IPdfProcessor
/// <exception cref="Domain.Common.Exceptions.BadRequestException">
/// Thrown when stream is empty, invalid, or not positioned at the beginning
/// </exception>
Task<PdfAMetadata> ValidatePdfAAsync(Stream pdfStream);
Task<PdfAValidationResult> ValidatePdfAAsync(Stream pdfStream);
/// <summary>
/// Checks for embedded files (attachments) in a PDF document and returns detailed metadata.