Class AbstractTimestampSource
java.lang.Object
eu.europa.esig.dss.spi.validation.timestamp.AbstractTimestampSource
- Direct Known Subclasses:
DetachedTimestampSource
,EvidenceRecordTimestampSource
,PdfRevisionTimestampSource
,SignatureTimestampSource
Contains a set of
TimestampToken
s found in a DefaultAdvancedSignature
object-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addReference
(List<TimestampedReference> referenceList, Identifier identifier, TimestampedObjectType category) Adds a reference for the given identifier and categoryprotected void
addReference
(List<TimestampedReference> referenceList, TimestampedReference referenceToAdd) AddsreferenceToAdd
toreferenceList
without duplicatesprotected void
addReferences
(List<TimestampedReference> referenceList, List<TimestampedReference> referencesToAdd) AddsreferencesToAdd
toreferenceList
without duplicatesprotected TimestampedReference
createReferenceForCertificate
(CertificateToken certificateToken) Creates aTimestampedReference
for the providedCertificateToken
protected TimestampedReference
createReferenceForIdentifier
(Identifier identifier, TimestampedObjectType timestampedObjectType) Creates aTimestampedReference
for the given identifierprotected List
<TimestampedReference> createReferencesForCertificateRefs
(Collection<CertificateRef> certificateRefs, CertificateSource currentCertificateSource, ListCertificateSource listCertificateSource) Returns a list of timestamped references from the given collection ofcertificateRefs
protected List
<TimestampedReference> createReferencesForCertificates
(Collection<CertificateToken> certificates) Creates a list ofTimestampedReference
s for the provided list ofcertificates
protected List
<TimestampedReference> createReferencesForCRLBinaries
(Collection<? extends EncapsulatedRevocationTokenIdentifier<CRL>> crlBinaryIdentifiers) Creates a list ofTimestampedReference
s from a collection ofCRLBinary
sprotected List
<TimestampedReference> createReferencesForCRLRefs
(Collection<? extends RevocationRef<CRL>> crlRefs, OfflineRevocationSource<CRL> currentCRLSource, ListRevocationSource<CRL> listCRLSource) Returns a list of timestamped references from the given collection ofcrlRefs
protected List
<TimestampedReference> createReferencesForIdentifiers
(Collection<? extends Identifier> identifiers, TimestampedObjectType timestampedObjectType) Creates a list ofTimestampedReference
s from the identifiers of a given typeprotected List
<TimestampedReference> createReferencesForOCSPBinaries
(Collection<? extends EncapsulatedRevocationTokenIdentifier<OCSP>> ocspBinaryIdentifiers, ListCertificateSource certificateSource) Creates a list ofTimestampedReference
s from a collection ofOCSPResponseBinary
sprotected List
<TimestampedReference> createReferencesForOCSPBinary
(OCSPResponseBinary ocspResponseBinary, ListCertificateSource certificateSource) Creates a list ofTimestampedReference
s for aOCSPResponseBinary
protected List
<TimestampedReference> createReferencesForOCSPRefs
(Collection<? extends RevocationRef<OCSP>> ocspRefs, OfflineRevocationSource<OCSP> currentOCSPSource, ListCertificateSource listCertificateSource, ListRevocationSource<OCSP> listOCSPSource) Returns a list of timestamped references from the given collection ofocspRefs
protected List
<TimestampedReference> getEncapsulatedValuesFromTimestamp
(TimestampToken timestampedTimestamp, ListCertificateSource certificateSource, ListRevocationSource<CRL> crlSource, ListRevocationSource<OCSP> ocspSource) Gets a list of all validation data embedded to thetimestampedTimestamp
protected List
<TimestampedReference> getReferencesFromTimestamp
(TimestampToken timestampToken, ListCertificateSource certificateSource, ListRevocationSource<CRL> crlSource, ListRevocationSource<OCSP> ocspSource) Incorporates all references from the giventimestampToken
protected List
<TimestampedReference> getSignerDataTimestampedReferences
(List<SignatureScope> signatureScopes) Creates a list ofTimestampedReference
s from a given list ofSignatureScope
sprotected void
processEmbeddedEvidenceRecords
(EvidenceRecord evidenceRecord) Enriches embedded evidence records with the covered referencesprotected void
processEvidenceRecordTimestamps
(EvidenceRecord evidenceRecord) Enriches embedded time-stamp tokens with evidence record references
-
Constructor Details
-
AbstractTimestampSource
protected AbstractTimestampSource()Default constructor
-
-
Method Details
-
addReference
protected void addReference(List<TimestampedReference> referenceList, TimestampedReference referenceToAdd) AddsreferenceToAdd
toreferenceList
without duplicates- Parameters:
referenceList
- - list ofTimestampedReference
s to be extendedreferenceToAdd
- -TimestampedReference
to be added
-
addReference
protected void addReference(List<TimestampedReference> referenceList, Identifier identifier, TimestampedObjectType category) Adds a reference for the given identifier and category- Parameters:
referenceList
- - list ofTimestampedReference
s to be extendedidentifier
- -Identifier
to be addedcategory
- -TimestampedObjectType
to be added
-
addReferences
protected void addReferences(List<TimestampedReference> referenceList, List<TimestampedReference> referencesToAdd) AddsreferencesToAdd
toreferenceList
without duplicates- Parameters:
referenceList
- - list ofTimestampedReference
s to be extendedreferencesToAdd
- -TimestampedReference
s to be added
-
getReferencesFromTimestamp
protected List<TimestampedReference> getReferencesFromTimestamp(TimestampToken timestampToken, ListCertificateSource certificateSource, ListRevocationSource<CRL> crlSource, ListRevocationSource<OCSP> ocspSource) Incorporates all references from the giventimestampToken
- Parameters:
timestampToken
- aTimestampToken
to extract values fromcertificateSource
-ListCertificateSource
merged certificate sourcecrlSource
-ListRevocationSource
merged CRL sourceocspSource
-ListRevocationSource
merged OCSP source- Returns:
- a list of
TimestampedReference
s
-
getEncapsulatedValuesFromTimestamp
protected List<TimestampedReference> getEncapsulatedValuesFromTimestamp(TimestampToken timestampedTimestamp, ListCertificateSource certificateSource, ListRevocationSource<CRL> crlSource, ListRevocationSource<OCSP> ocspSource) Gets a list of all validation data embedded to thetimestampedTimestamp
- Parameters:
timestampedTimestamp
-TimestampToken
to extract embedded values fromcertificateSource
-ListCertificateSource
merged certificate sourcecrlSource
-ListRevocationSource
merged CRL sourceocspSource
-ListRevocationSource
merged OCSP source- Returns:
- list of
TimestampedReference
s
-
getSignerDataTimestampedReferences
protected List<TimestampedReference> getSignerDataTimestampedReferences(List<SignatureScope> signatureScopes) Creates a list ofTimestampedReference
s from a given list ofSignatureScope
s- Parameters:
signatureScopes
- a list ofSignatureScope
to createTimestampedReference
s for- Returns:
- a list of
TimestampedReference
s
-
createReferencesForCertificates
protected List<TimestampedReference> createReferencesForCertificates(Collection<CertificateToken> certificates) Creates a list ofTimestampedReference
s for the provided list ofcertificates
- Parameters:
certificates
- collection ofCertificateToken
s- Returns:
- list of
TimestampedReference
s
-
createReferenceForCertificate
Creates aTimestampedReference
for the providedCertificateToken
- Parameters:
certificateToken
-CertificateToken
- Returns:
TimestampedReference
-
createReferencesForIdentifiers
protected List<TimestampedReference> createReferencesForIdentifiers(Collection<? extends Identifier> identifiers, TimestampedObjectType timestampedObjectType) Creates a list ofTimestampedReference
s from the identifiers of a given type- Parameters:
identifiers
- a collection ofIdentifier
stimestampedObjectType
-TimestampedObjectType
to create references with- Returns:
- a list of
TimestampedReference
s
-
createReferenceForIdentifier
protected TimestampedReference createReferenceForIdentifier(Identifier identifier, TimestampedObjectType timestampedObjectType) Creates aTimestampedReference
for the given identifier- Parameters:
identifier
-Identifier
to create a timestamped reference fromtimestampedObjectType
-TimestampedObjectType
the target timestamped reference type- Returns:
TimestampedReference
-
createReferencesForCRLBinaries
protected List<TimestampedReference> createReferencesForCRLBinaries(Collection<? extends EncapsulatedRevocationTokenIdentifier<CRL>> crlBinaryIdentifiers) Creates a list ofTimestampedReference
s from a collection ofCRLBinary
s- Parameters:
crlBinaryIdentifiers
- a collection ofEncapsulatedRevocationTokenIdentifier
s- Returns:
- a list of link
TimestampedReference
s
-
createReferencesForOCSPBinaries
protected List<TimestampedReference> createReferencesForOCSPBinaries(Collection<? extends EncapsulatedRevocationTokenIdentifier<OCSP>> ocspBinaryIdentifiers, ListCertificateSource certificateSource) Creates a list ofTimestampedReference
s from a collection ofOCSPResponseBinary
s- Parameters:
ocspBinaryIdentifiers
- a collection ofEncapsulatedRevocationTokenIdentifier
scertificateSource
-ListCertificateSource
- Returns:
- a list of link
TimestampedReference
s
-
createReferencesForOCSPBinary
protected List<TimestampedReference> createReferencesForOCSPBinary(OCSPResponseBinary ocspResponseBinary, ListCertificateSource certificateSource) Creates a list ofTimestampedReference
s for aOCSPResponseBinary
- Parameters:
ocspResponseBinary
-OCSPResponseBinary
certificateSource
-ListCertificateSource
- Returns:
- a list of link
TimestampedReference
s
-
createReferencesForCertificateRefs
protected List<TimestampedReference> createReferencesForCertificateRefs(Collection<CertificateRef> certificateRefs, CertificateSource currentCertificateSource, ListCertificateSource listCertificateSource) Returns a list of timestamped references from the given collection ofcertificateRefs
- Parameters:
certificateRefs
- a collection ofCertificateRef
s to get timestamped references fromcurrentCertificateSource
-CertificateSource
used to extract the collection ofCertificateRef
slistCertificateSource
-ListCertificateSource
merged certificate source- Returns:
- a list of
TimestampedReference
s
-
createReferencesForCRLRefs
protected List<TimestampedReference> createReferencesForCRLRefs(Collection<? extends RevocationRef<CRL>> crlRefs, OfflineRevocationSource<CRL> currentCRLSource, ListRevocationSource<CRL> listCRLSource) Returns a list of timestamped references from the given collection ofcrlRefs
- Parameters:
crlRefs
- a collection ofCRLRef
s to get timestamped references fromcurrentCRLSource
-OfflineRevocationSource
used to extract CRL referenceslistCRLSource
-ListRevocationSource
merged CRL source- Returns:
- a list of
TimestampedReference
s
-
createReferencesForOCSPRefs
protected List<TimestampedReference> createReferencesForOCSPRefs(Collection<? extends RevocationRef<OCSP>> ocspRefs, OfflineRevocationSource<OCSP> currentOCSPSource, ListCertificateSource listCertificateSource, ListRevocationSource<OCSP> listOCSPSource) Returns a list of timestamped references from the given collection ofocspRefs
- Parameters:
ocspRefs
- a collection ofOCSPRef
s to get timestamped references fromcurrentOCSPSource
-OfflineRevocationSource
used to extract the OCSP referenceslistCertificateSource
-ListCertificateSource
merged certificate sourcelistOCSPSource
-ListRevocationSource
merged OCSP source- Returns:
- a list of
TimestampedReference
s
-
processEvidenceRecordTimestamps
Enriches embedded time-stamp tokens with evidence record references- Parameters:
evidenceRecord
-EvidenceRecord
-
processEmbeddedEvidenceRecords
Enriches embedded evidence records with the covered references- Parameters:
evidenceRecord
-EvidenceRecord
-