Interface DocumentAnalyzer
- All Known Subinterfaces:
EvidenceRecordAnalyzer
- All Known Implementing Classes:
AbstractASiCContainerAnalyzer,AbstractJWSDocumentAnalyzer,ASiCContainerWithCAdESAnalyzer,ASiCContainerWithXAdESAnalyzer,ASiCWithCAdESTimestampAnalyzer,ASN1EvidenceRecordAnalyzer,CMSDocumentAnalyzer,DefaultDocumentAnalyzer,DefaultEvidenceRecordAnalyzer,DetachedTimestampAnalyzer,JWSCompactDocumentAnalyzer,JWSSerializationAnalyzerValidator,PDFADocumentAnalyzer,PDFDocumentAnalyzer,XMLDocumentAnalyzer,XMLEvidenceRecordAnalyzer
public interface DocumentAnalyzer
This class performs processing of a signature document, including extraction of signature and timestamp tokens,
cryptographic validation, certificate chain building and revocation data validation.
The class works exclusively with JAVA objects, and does not include ETSI EN 319 102-1 validation process,
nor JAXB objects.
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the detached evidence records found in the documentRetrieves the detached timestamps found in the documentGets document to be validatedgetOriginalDocuments(AdvancedSignature advancedSignature) This method returns the signed document(s) without their signature(s)getOriginalDocuments(String signatureId) This method returns the signed document(s) without their signature(s)Retrieves the signatures found in the documentGets TokenIdentifierProvider<T extends AdvancedSignature>
ValidationDataContainergetValidationData(Collection<T> signatures) Extracts a validation data for provided collection of signatures<T extends AdvancedSignature>
ValidationDataContainergetValidationData(Collection<T> signatures, Collection<TimestampToken> detachedTimestamps) Extracts a validation data for provided collection of signatures and/or timestampsReturns document validation timebooleanisSupported(DSSDocument dssDocument) Checks if the document is supported by the current validatorvoidsetCertificateVerifier(CertificateVerifier certificateVerifier) Provides aCertificateVerifierto be used during the validation process.voidsetContainerContents(List<DSSDocument> archiveContents) Sets theListofDSSDocumentcontaining the original container content for ASiC-S signatures.voidsetDetachedContents(List<DSSDocument> detachedContent) Sets theListofDSSDocumentcontaining the original contents to sign, for detached signature scenarios.voidsetDetachedEvidenceRecordDocuments(List<DSSDocument> detachedEvidenceRecordDocuments) Sets aListofDSSDocumentcontaining the evidence record documents covering the signature document.voidsetManifestFile(ManifestFile manifestFile) Sets a relatedManifestFileto the document to be validated.voidsetSignaturePolicyProvider(SignaturePolicyProvider signaturePolicyProvider) This method allows to set a provider for Signature policiesvoidsetSigningCertificateSource(CertificateSource certificateSource) Set a certificate source which allows to find the signing certificate by kid or certificate's digestvoidsetTokenIdentifierProvider(TokenIdentifierProvider tokenIdentifierProvider) Sets the TokenIdentifierProvidervoidsetValidationContextExecutor(ValidationContextExecutor validationContextExecutor) This method setsValidationContextExecutorfor validation of the preparedValidationContextDefault:eu.europa.esig.dss.validation.executor.context.DefaultValidationContextExecutor(performs basic validation of tokens, including certificate chain building and revocation data extraction, without processing of validity checks)voidsetValidationTime(Date validationTime) Allows to define a custom validation timevalidate()This method performs validation of the document
-
Method Details
-
getDocument
-
getSignatures
List<AdvancedSignature> getSignatures()Retrieves the signatures found in the document- Returns:
- a list of AdvancedSignatures for validation purposes
-
getDetachedTimestamps
List<TimestampToken> getDetachedTimestamps()Retrieves the detached timestamps found in the document- Returns:
- a list of TimestampToken for validation purposes
-
getDetachedEvidenceRecords
List<EvidenceRecord> getDetachedEvidenceRecords()Retrieves the detached evidence records found in the document- Returns:
- a list of Evidence Records for validation purposes
-
setCertificateVerifier
Provides aCertificateVerifierto be used during the validation process.- Parameters:
certificateVerifier-CertificateVerifier
-
setValidationContextExecutor
This method setsValidationContextExecutorfor validation of the preparedValidationContextDefault:eu.europa.esig.dss.validation.executor.context.DefaultValidationContextExecutor(performs basic validation of tokens, including certificate chain building and revocation data extraction, without processing of validity checks)- Parameters:
validationContextExecutor-ValidationContextExecutor
-
getTokenIdentifierProvider
TokenIdentifierProvider getTokenIdentifierProvider()Gets TokenIdentifierProvider- Returns:
TokenIdentifierProvider
-
setTokenIdentifierProvider
Sets the TokenIdentifierProvider- Parameters:
tokenIdentifierProvider-TokenIdentifierProvider
-
getValidationTime
-
setValidationTime
-
setDetachedContents
Sets theListofDSSDocumentcontaining the original contents to sign, for detached signature scenarios.- Parameters:
detachedContent- theListofDSSDocumentto set
-
setDetachedEvidenceRecordDocuments
Sets aListofDSSDocumentcontaining the evidence record documents covering the signature document.- Parameters:
detachedEvidenceRecordDocuments- theListofDSSDocumentto set
-
setContainerContents
Sets theListofDSSDocumentcontaining the original container content for ASiC-S signatures.- Parameters:
archiveContents- theListofDSSDocumentto set
-
setManifestFile
Sets a relatedManifestFileto the document to be validated.- Parameters:
manifestFile- aManifestFileto set
-
isSupported
Checks if the document is supported by the current validator- Parameters:
dssDocument-DSSDocumentto check- Returns:
- TRUE if the document is supported, FALSE otherwise
-
setSigningCertificateSource
Set a certificate source which allows to find the signing certificate by kid or certificate's digest- Parameters:
certificateSource- the certificate source
-
setSignaturePolicyProvider
This method allows to set a provider for Signature policies- Parameters:
signaturePolicyProvider-SignaturePolicyProvider
-
getOriginalDocuments
This method returns the signed document(s) without their signature(s)- Parameters:
signatureId- the DSS ID of the signature to extract original signer data for- Returns:
- list of
DSSDocuments
-
getOriginalDocuments
This method returns the signed document(s) without their signature(s)- Parameters:
advancedSignature-AdvancedSignatureto find signer documents for- Returns:
- list of
DSSDocuments
-
getValidationData
Extracts a validation data for provided collection of signatures- Type Parameters:
T-AdvancedSignatureimplementation- Parameters:
signatures- a collection ofAdvancedSignatures- Returns:
ValidationDataContainer
-
getValidationData
<T extends AdvancedSignature> ValidationDataContainer getValidationData(Collection<T> signatures, Collection<TimestampToken> detachedTimestamps) Extracts a validation data for provided collection of signatures and/or timestamps- Type Parameters:
T-AdvancedSignatureimplementation- Parameters:
signatures- a collection ofAdvancedSignaturesdetachedTimestamps- a collection of detachedTimestampTokens- Returns:
ValidationDataContainer
-
validate
ValidationContext validate()This method performs validation of the document- Returns:
ValidationContext
-