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 timeboolean
isSupported
(DSSDocument dssDocument) Checks if the document is supported by the current validatorvoid
setCertificateVerifier
(CertificateVerifier certificateVerifier) Provides aCertificateVerifier
to be used during the validation process.void
setContainerContents
(List<DSSDocument> archiveContents) Sets theList
ofDSSDocument
containing the original container content for ASiC-S signatures.void
setDetachedContents
(List<DSSDocument> detachedContent) Sets theList
ofDSSDocument
containing the original contents to sign, for detached signature scenarios.void
setDetachedEvidenceRecordDocuments
(List<DSSDocument> detachedEvidenceRecordDocuments) Sets aList
ofDSSDocument
containing the evidence record documents covering the signature document.void
setManifestFile
(ManifestFile manifestFile) Sets a relatedManifestFile
to the document to be validated.void
setSignaturePolicyProvider
(SignaturePolicyProvider signaturePolicyProvider) This method allows to set a provider for Signature policiesvoid
setSigningCertificateSource
(CertificateSource certificateSource) Set a certificate source which allows to find the signing certificate by kid or certificate's digestvoid
setTokenIdentifierProvider
(TokenIdentifierProvider tokenIdentifierProvider) Sets the TokenIdentifierProvidervoid
setValidationContextExecutor
(ValidationContextExecutor validationContextExecutor) This method setsValidationContextExecutor
for validation of the preparedValidationContext
Default: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)void
setValidationTime
(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 aCertificateVerifier
to be used during the validation process.- Parameters:
certificateVerifier
-CertificateVerifier
-
setValidationContextExecutor
This method setsValidationContextExecutor
for validation of the preparedValidationContext
Default: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 theList
ofDSSDocument
containing the original contents to sign, for detached signature scenarios.- Parameters:
detachedContent
- theList
ofDSSDocument
to set
-
setDetachedEvidenceRecordDocuments
Sets aList
ofDSSDocument
containing the evidence record documents covering the signature document.- Parameters:
detachedEvidenceRecordDocuments
- theList
ofDSSDocument
to set
-
setContainerContents
Sets theList
ofDSSDocument
containing the original container content for ASiC-S signatures.- Parameters:
archiveContents
- theList
ofDSSDocument
to set
-
setManifestFile
Sets a relatedManifestFile
to the document to be validated.- Parameters:
manifestFile
- aManifestFile
to set
-
isSupported
Checks if the document is supported by the current validator- Parameters:
dssDocument
-DSSDocument
to 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
DSSDocument
s
-
getOriginalDocuments
This method returns the signed document(s) without their signature(s)- Parameters:
advancedSignature
-AdvancedSignature
to find signer documents for- Returns:
- list of
DSSDocument
s
-
getValidationData
Extracts a validation data for provided collection of signatures- Type Parameters:
T
-AdvancedSignature
implementation- Parameters:
signatures
- a collection ofAdvancedSignature
s- 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
-AdvancedSignature
implementation- Parameters:
signatures
- a collection ofAdvancedSignature
sdetachedTimestamps
- a collection of detachedTimestampToken
s- Returns:
ValidationDataContainer
-
validate
ValidationContext validate()This method performs validation of the document- Returns:
ValidationContext
-