java.lang.Object
eu.europa.esig.dss.validation.SignedDocumentValidator
eu.europa.esig.dss.pades.validation.PDFDocumentValidator
- All Implemented Interfaces:
eu.europa.esig.dss.validation.DocumentValidator,eu.europa.esig.dss.validation.ProcessExecutorProvider<eu.europa.esig.dss.validation.executor.DocumentProcessExecutor>
public class PDFDocumentValidator
extends eu.europa.esig.dss.validation.SignedDocumentValidator
Validation of PDF document.
-
Field Summary
Fields inherited from class eu.europa.esig.dss.validation.SignedDocumentValidator
certificateVerifier, containerContents, detachedContents, detachedEvidenceRecordDocuments, document, manifestFile, processExecutor, signingCertificateSource, skipValidationContextExecution -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEmpty constructorPDFDocumentValidator(eu.europa.esig.dss.model.DSSDocument document) The default constructor for PDFDocumentValidator. -
Method Summary
Modifier and TypeMethodDescriptionprotected List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken>protected List<eu.europa.esig.dss.validation.AdvancedSignature>protected List<eu.europa.esig.dss.validation.AdvancedSignature>List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken>Returns a list of found DSS Dictionaries across different revisionsprotected List<PdfDocDssRevision>This method returns a list of DSS revisionsList<eu.europa.esig.dss.model.DSSDocument>getOriginalDocuments(eu.europa.esig.dss.validation.AdvancedSignature advancedSignature) protected PAdESTimestampScopeFinderThis method returns a PDF timestamp scope finderprotected List<PdfRevision>Gets the list of PDF document revisions<T extends eu.europa.esig.dss.validation.AdvancedSignature>
PdfValidationDataContainergetValidationData(Collection<T> signatures, Collection<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> detachedTimestamps) protected PAdESDiagnosticDataBuilderprotected PdfValidationDataContainerbooleanisSupported(eu.europa.esig.dss.model.DSSDocument dssDocument) protected voidpostProcessing(List<eu.europa.esig.dss.validation.AdvancedSignature> signatures) Post-process the extracted signatures NOTE: the method shall be used only for the document validationprotected voidprepareDssDictionaryValidationContext(eu.europa.esig.dss.validation.ValidationContext validationContext, List<PdfDocDssRevision> dssRevisions) Fills thevalidateContextwith certificate tokens fromdssDictsprotected <T extends eu.europa.esig.dss.validation.AdvancedSignature>
eu.europa.esig.dss.validation.ValidationContextprepareValidationContext(Collection<T> signatures, Collection<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> detachedTimestamps, Collection<eu.europa.esig.dss.validation.evidencerecord.EvidenceRecord> detachedEvidenceRecords, eu.europa.esig.dss.validation.CertificateVerifier certificateVerifier) voidsetPasswordProtection(char[] passwordProtection) Specify the used password for the encrypted documentvoidsetPdfObjFactory(IPdfObjFactory pdfObjFactory) Set the IPdfObjFactory.protected voidtimestampPostProcessing(List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> timestampTokens) Post-process the extracted detached timestamps NOTE: the method shall be used only for the document validationMethods inherited from class eu.europa.esig.dss.validation.SignedDocumentValidator
addReference, appendCounterSignatures, appendExternalEvidenceRecords, assertConfigurationValid, buildDetachedEvidenceRecords, buildEvidenceRecord, coversSignature, createDiagnosticDataBuilder, createDiagnosticDataBuilder, findSignatureScopes, fromDocument, getDefaultDigestAlgorithm, getDefaultProcessExecutor, getDetachedEvidenceRecords, getDiagnosticData, getEvidenceRecord, getEvidenceRecordScopes, getOriginalDocuments, getSignatureById, getSignaturePolicyProvider, getSignaturePolicyValidatorLoader, getSignatures, getTimestampedReferences, getTokenIdentifierProvider, getValidationData, getValidationTime, prepareDetachedEvidenceRecordValidationContext, prepareDetachedTimestampValidationContext, prepareDiagnosticDataBuilder, prepareSignatureForVerification, prepareSignatureValidationContext, prepareValidationContext, processSignaturesValidation, processValidationPolicy, provideProcessExecutorInstance, setCertificateVerifier, setContainerContents, setDetachedContents, setDetachedEvidenceRecordDocuments, setEnableEtsiValidationReport, setIncludeSemantics, setLocale, setManifestFile, setProcessExecutor, setSignaturePolicyProvider, setSigningCertificateSource, setSkipValidationContextExecution, setTokenExtractionStrategy, setTokenIdentifierProvider, setValidationLevel, setValidationTime, validateContext, validateDocument, validateDocument, validateDocument, validateDocument, validateDocument, validateDocument, validateDocument, validateDocument
-
Constructor Details
-
PDFDocumentValidator
protected PDFDocumentValidator()Empty constructor -
PDFDocumentValidator
public PDFDocumentValidator(eu.europa.esig.dss.model.DSSDocument document) The default constructor for PDFDocumentValidator.- Parameters:
document-DSSDocument
-
-
Method Details
-
isSupported
public boolean isSupported(eu.europa.esig.dss.model.DSSDocument dssDocument) - Specified by:
isSupportedin classeu.europa.esig.dss.validation.SignedDocumentValidator
-
setPdfObjFactory
Set the IPdfObjFactory. Allow to set the used implementation. Cannot be null.- Parameters:
pdfObjFactory- the implementation to be used.
-
setPasswordProtection
public void setPasswordProtection(char[] passwordProtection) Specify the used password for the encrypted document- Parameters:
passwordProtection- the used password
-
prepareValidationContext
protected <T extends eu.europa.esig.dss.validation.AdvancedSignature> eu.europa.esig.dss.validation.ValidationContext prepareValidationContext(Collection<T> signatures, Collection<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> detachedTimestamps, Collection<eu.europa.esig.dss.validation.evidencerecord.EvidenceRecord> detachedEvidenceRecords, eu.europa.esig.dss.validation.CertificateVerifier certificateVerifier) - Overrides:
prepareValidationContextin classeu.europa.esig.dss.validation.SignedDocumentValidator
-
initializeDiagnosticDataBuilder
- Overrides:
initializeDiagnosticDataBuilderin classeu.europa.esig.dss.validation.SignedDocumentValidator
-
prepareDssDictionaryValidationContext
protected void prepareDssDictionaryValidationContext(eu.europa.esig.dss.validation.ValidationContext validationContext, List<PdfDocDssRevision> dssRevisions) Fills thevalidateContextwith certificate tokens fromdssDicts- Parameters:
validationContext-ValidationContextto enrichdssRevisions- a list ofPdfDocDssRevisions
-
getAllSignatures
- Overrides:
getAllSignaturesin classeu.europa.esig.dss.validation.SignedDocumentValidator
-
postProcessing
Post-process the extracted signatures NOTE: the method shall be used only for the document validation- Parameters:
signatures- a list ofAdvancedSignatures
-
getDetachedTimestamps
- Specified by:
getDetachedTimestampsin interfaceeu.europa.esig.dss.validation.DocumentValidator- Overrides:
getDetachedTimestampsin classeu.europa.esig.dss.validation.SignedDocumentValidator
-
timestampPostProcessing
protected void timestampPostProcessing(List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> timestampTokens) Post-process the extracted detached timestamps NOTE: the method shall be used only for the document validation- Parameters:
timestampTokens- a list ofTimestampTokens
-
buildSignatures
- Overrides:
buildSignaturesin classeu.europa.esig.dss.validation.SignedDocumentValidator
-
buildDetachedTimestamps
- Overrides:
buildDetachedTimestampsin classeu.europa.esig.dss.validation.SignedDocumentValidator
-
getPAdESTimestampScopeFinder
This method returns a PDF timestamp scope finder- Returns:
PAdESTimestampScopeFinder
-
getDssDictionaries
Returns a list of found DSS Dictionaries across different revisions- Returns:
- list of
PdfDssDicts
-
getDssRevisions
This method returns a list of DSS revisions- Returns:
- a list of
PdfDocDssRevisions
-
getRevisions
Gets the list of PDF document revisions- Returns:
- a list of
PdfRevisions
-
getValidationData
public <T extends eu.europa.esig.dss.validation.AdvancedSignature> PdfValidationDataContainer getValidationData(Collection<T> signatures, Collection<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> detachedTimestamps) - Specified by:
getValidationDatain interfaceeu.europa.esig.dss.validation.DocumentValidator- Overrides:
getValidationDatain classeu.europa.esig.dss.validation.SignedDocumentValidator
-
instantiateValidationDataContainer
- Overrides:
instantiateValidationDataContainerin classeu.europa.esig.dss.validation.SignedDocumentValidator
-
getOriginalDocuments
public List<eu.europa.esig.dss.model.DSSDocument> getOriginalDocuments(eu.europa.esig.dss.validation.AdvancedSignature advancedSignature)
-