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, timestampTypeFields inherited from class eu.europa.esig.dss.spi.validation.analyzer.DefaultDocumentAnalyzer
certificateVerifier, containerContents, detachedContents, detachedEvidenceRecordDocuments, document, manifestFile, signingCertificateSource -
Constructor Summary
ConstructorsConstructorDescriptionASiCWithCAdESTimestampAnalyzer(DSSDocument timestamp) Default constructorASiCWithCAdESTimestampAnalyzer(DSSDocument timestamp, TimestampType type) Default constructor with a timestamp type -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanaddReference(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 TimestampTokenThis method creates a timestamp token from the validating documentReturns the coveredManifestFileprotected List<SignatureScope> getTimestampScopes(TimestampToken timestampToken) Finds timestamp scopesprotected booleanisTimestampCoveredByEvidenceRecord(TimestampToken timestampToken, EvidenceRecord evidenceRecord) Checks whether thetimestampTokenis covered by the givenevidenceRecordvoidsetArchiveDocuments(List<DSSDocument> archiveDocuments) Sets the document embedded inside package.zip, when applicablevoidsetArchiveTimestampType(ArchiveTimestampType archiveTimestampType) Sets the archive timestamp typevoidsetOriginalDocuments(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, setTimestampedDataMethods 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-DSSDocumentthe timestamp document file
-
ASiCWithCAdESTimestampAnalyzer
Default constructor with a timestamp type- Parameters:
timestamp-DSSDocumentthe timestamp document filetype-TimestampTypetype of the timestamp
-
-
Method Details
-
getCoveredManifest
-
setOriginalDocuments
Sets the original documents present in the ASiC container- Parameters:
originalDocuments- a list ofDSSDocuments
-
setArchiveDocuments
Sets the document embedded inside package.zip, when applicable- Parameters:
archiveDocuments- a list ofDSSDocuments
-
setArchiveTimestampType
Sets the archive timestamp type- Parameters:
archiveTimestampType-ArchiveTimestampType
-
createTimestampToken
Description copied from class:DetachedTimestampAnalyzerThis method creates a timestamp token from the validating document- Overrides:
createTimestampTokenin classDetachedTimestampAnalyzer- Returns:
TimestampToken
-
isTimestampCoveredByEvidenceRecord
protected boolean isTimestampCoveredByEvidenceRecord(TimestampToken timestampToken, EvidenceRecord evidenceRecord) Description copied from class:DefaultDocumentAnalyzerChecks whether thetimestampTokenis covered by the givenevidenceRecord- Overrides:
isTimestampCoveredByEvidenceRecordin classDefaultDocumentAnalyzer- Parameters:
timestampToken-TimestampTokenevidenceRecord-EvidenceRecord- Returns:
- TRUE if the time-stamp is covered by the evidence record, FALSE otherwise
-
getTimestampScopes
Description copied from class:DetachedTimestampAnalyzerFinds timestamp scopes- Overrides:
getTimestampScopesin classDetachedTimestampAnalyzer- Parameters:
timestampToken-TimestampToken- Returns:
- a list of
SignatureScopes
-
addReference
Description copied from class:DefaultDocumentAnalyzerChecks 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:
addReferencein classDefaultDocumentAnalyzer- Parameters:
signatureScope-SignatureScopeto check- Returns:
- TRUE if the timestamped reference shall be created for the given
SignatureScope, FALSE otherwise
-