Class ASiCWithCAdESTimestampAnalyzer
java.lang.Object
eu.europa.esig.dss.spi.validation.analyzer.DefaultDocumentAnalyzer
eu.europa.esig.dss.validation.timestamp.DetachedTimestampAnalyzer
eu.europa.esig.dss.asic.cades.validation.timestamp.ASiCWithCAdESTimestampAnalyzer
- All Implemented Interfaces:
DocumentAnalyzer
,TimestampAnalyzer
The abstract validator for an ASiC with CAdES timestamp
-
Field Summary
Fields inherited from class eu.europa.esig.dss.validation.timestamp.DetachedTimestampAnalyzer
timestampToken, timestampType
Fields inherited from class eu.europa.esig.dss.spi.validation.analyzer.DefaultDocumentAnalyzer
certificateVerifier, containerContents, detachedContents, detachedEvidenceRecordDocuments, document, manifestFile, signingCertificateSource
-
Constructor Summary
ConstructorDescriptionASiCWithCAdESTimestampAnalyzer
(DSSDocument timestamp) Default constructorASiCWithCAdESTimestampAnalyzer
(DSSDocument timestamp, TimestampType type) Default constructor with a timestamp type -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
addReference
(SignatureScope signatureScope) Checks if the signature scope shall be added as a timestamped reference NOTE: used to avoid duplicates in ASiC with CAdES validator, due to covered signature/timestamp filesprotected TimestampToken
This method creates a timestamp token from the validating documentReturns the coveredManifestFile
protected List
<SignatureScope> getTimestampScopes
(TimestampToken timestampToken) Finds timestamp scopesprotected boolean
isTimestampCoveredByEvidenceRecord
(TimestampToken timestampToken, EvidenceRecord evidenceRecord) Checks whether thetimestampToken
is covered by the givenevidenceRecord
void
setArchiveDocuments
(List<DSSDocument> archiveDocuments) Sets the document embedded inside package.zip, when applicablevoid
setArchiveTimestampType
(ArchiveTimestampType archiveTimestampType) Sets the archive timestamp typevoid
setOriginalDocuments
(List<DSSDocument> originalDocuments) Sets the original documents present in the ASiC containerMethods inherited from class eu.europa.esig.dss.validation.timestamp.DetachedTimestampAnalyzer
buildDetachedTimestamps, getOriginalDocuments, getOriginalDocuments, getTimestamp, getTimestampedData, isSupported, setTimestampedData
Methods inherited from class eu.europa.esig.dss.spi.validation.analyzer.DefaultDocumentAnalyzer
appendCounterSignatures, appendExternalEvidenceRecords, appendExternalEvidenceRecords, buildDetachedEvidenceRecords, buildEvidenceRecord, buildSignatures, coversSignature, createValidationContext, fromDocument, getAllEvidenceRecords, getAllSignatures, getDetachedEvidenceRecords, getDetachedTimestamps, getDocument, getEvidenceRecord, getEvidenceRecordScopes, getSignatureById, getSignaturePolicyProvider, getSignaturePolicyValidatorLoader, getSignatures, getTimestampedReferences, getTimestampReaders, getTokenIdentifierProvider, getValidationData, getValidationData, getValidationTime, instantiateValidationDataContainer, prepareDetachedEvidenceRecordValidationContext, prepareDetachedTimestampValidationContext, prepareSignatureForVerification, prepareSignatureValidationContext, prepareValidationContext, processSignaturesValidation, setCertificateVerifier, setContainerContents, setDetachedContents, setDetachedEvidenceRecordDocuments, setDetachedEvidenceRecords, setManifestFile, setSignaturePolicyProvider, setSigningCertificateSource, setTokenIdentifierProvider, setValidationContextExecutor, setValidationTime, validate, validateContext, validateSignaturePolicy
-
Constructor Details
-
ASiCWithCAdESTimestampAnalyzer
Default constructor- Parameters:
timestamp
-DSSDocument
the timestamp document file
-
ASiCWithCAdESTimestampAnalyzer
Default constructor with a timestamp type- Parameters:
timestamp
-DSSDocument
the timestamp document filetype
-TimestampType
type of the timestamp
-
-
Method Details
-
getCoveredManifest
-
setOriginalDocuments
Sets the original documents present in the ASiC container- Parameters:
originalDocuments
- a list ofDSSDocument
s
-
setArchiveDocuments
Sets the document embedded inside package.zip, when applicable- Parameters:
archiveDocuments
- a list ofDSSDocument
s
-
setArchiveTimestampType
Sets the archive timestamp type- Parameters:
archiveTimestampType
-ArchiveTimestampType
-
createTimestampToken
Description copied from class:DetachedTimestampAnalyzer
This method creates a timestamp token from the validating document- Overrides:
createTimestampToken
in classDetachedTimestampAnalyzer
- Returns:
TimestampToken
-
isTimestampCoveredByEvidenceRecord
protected boolean isTimestampCoveredByEvidenceRecord(TimestampToken timestampToken, EvidenceRecord evidenceRecord) Description copied from class:DefaultDocumentAnalyzer
Checks whether thetimestampToken
is covered by the givenevidenceRecord
- Overrides:
isTimestampCoveredByEvidenceRecord
in classDefaultDocumentAnalyzer
- Parameters:
timestampToken
-TimestampToken
evidenceRecord
-EvidenceRecord
- Returns:
- TRUE if the time-stamp is covered by the evidence record, FALSE otherwise
-
getTimestampScopes
Description copied from class:DetachedTimestampAnalyzer
Finds timestamp scopes- Overrides:
getTimestampScopes
in classDetachedTimestampAnalyzer
- Parameters:
timestampToken
-TimestampToken
- Returns:
- a list of
SignatureScope
s
-
addReference
Description copied from class:DefaultDocumentAnalyzer
Checks if the signature scope shall be added as a timestamped reference NOTE: used to avoid duplicates in ASiC with CAdES validator, due to covered signature/timestamp files- Overrides:
addReference
in classDefaultDocumentAnalyzer
- Parameters:
signatureScope
-SignatureScope
to check- Returns:
- TRUE if the timestamped reference shall be created for the given
SignatureScope
, FALSE otherwise
-