Class AbstractTimestampSource<SignatureAttribute extends ISignatureAttribute>
- java.lang.Object
-
- eu.europa.esig.dss.validation.timestamp.AbstractTimestampSource<SignatureAttribute>
-
- All Implemented Interfaces:
SignatureTimestampSource,Serializable
- Direct Known Subclasses:
CAdESTimestampSource,XAdESTimestampSource
public abstract class AbstractTimestampSource<SignatureAttribute extends ISignatureAttribute> extends Object implements SignatureTimestampSource
Contains a set ofTimestampTokens found in aDefaultAdvancedSignatureobject- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected CertificatePoolcertificatePoolprotected ListCRLSourcecrlSourceRevocation sources containing merged data from signature source and timestampsprotected ListOCSPSourceocspSourceprotected SignatureCertificateSourcesignatureCertificateSourceSources obtained from a signature objectprotected SignatureCRLSourcesignatureCRLSourceprotected StringsignatureIdprotected SignatureOCSPSourcesignatureOCSPSourceprotected List<SignatureScope>signatureScopesprotected CommonCertificateSourcetimestampCertificateSourceLocal timestamp source to store certificate values found in timestamps
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractTimestampSource(AdvancedSignature signature)Default constructor
-
Method Summary
Modifier and Type Method Description protected voidaddEncapsulatedValuesFromTimestamp(List<TimestampedReference> references, TimestampToken timestampedTimestamp)Adds to thereferenceslist all validation data embedded to thetimestampedTimestampvoidaddExternalTimestamp(TimestampToken timestamp)This method allows to add an external timestamp.protected voidaddReference(List<TimestampedReference> referenceList, TimestampedReference referenceToAdd)AddsreferenceToAddtoreferenceListwithout duplicatesprotected voidaddReferences(List<TimestampedReference> referenceList, List<TimestampedReference> referencesToAdd)AddsreferencesToAddtoreferenceListwithout duplicatesprotected voidaddReferencesForPreviousTimestamps(List<TimestampedReference> references, List<TimestampToken> timestampedTimestamps)protected voidcreateAndValidate()Creates and validates all timestamps Must be called only onceprotected List<TimestampedReference>createReferencesForCertificates(Collection<CertificateToken> certificates)Creates a list ofTimestampedReferences for the provided list ofcertificatesprotected List<TimestampedReference>getAllContentTimestampReferences()Returns a list ofTimestampedReferences obtained from thesignatureScopesList<TimestampToken>getAllTimestamps()List<TimestampToken>getArchiveTimestamps()protected abstract ArchiveTimestampTypegetArchiveTimestampType(SignatureAttribute unsignedAttribute)ReturnsArchiveTimestampTypefor the givenunsignedAttributeMap<String,List<CertificateToken>>getCertificateMapWithinTimestamps(boolean skipLastArchiveTimestamp)Returns a map between all found timestamps and their certificatesprotected abstract List<Digest>getCertificateRefDigests(SignatureAttribute unsignedAttribute)Returns a list ofDigests from the givenunsignedAttributeList<CertificateToken>getCertificates()Returns a list of all found certificates in the timestampsListCRLSourcegetCommonCRLSource()Returns a mergedListCRLSourcebetween signatureCRLSource and all embedded timestamp CRL sourcesListOCSPSourcegetCommonOCSPSource()Returns a mergedListOCSPSourcebetween signatureOCSPSource and all embedded timestamp OCSP sourcesList<TimestampToken>getContentTimestamps()List<TimestampToken>getDocumentTimestamps()protected abstract List<EncapsulatedCertificateTokenIdentifier>getEncapsulatedCertificateIdentifiers(SignatureAttribute unsignedAttribute)Returns a list ofEncapsulatedCertificateTokenIdentifiers obtained from the givenunsignedAttributeprotected abstract List<CRLBinary>getEncapsulatedCRLIdentifiers(SignatureAttribute unsignedAttribute)Returns a list ofCRLBinarys obtained from the givenunsignedAttributeprotected abstract List<OCSPResponseBinary>getEncapsulatedOCSPIdentifiers(SignatureAttribute unsignedAttribute)Returns a list ofOCSPResponseBinarys obtained from the givenunsignedAttributeprotected abstract List<TimestampedReference>getIndividualContentTimestampedReferences(SignatureAttribute signedAttribute)Returns a list ofTimestampedReferences for an "individual-data-objects-timestamp" NOTE: Used only in XAdESprotected abstract List<Digest>getRevocationRefCRLDigests(SignatureAttribute unsignedAttribute)Returns a list of CRL revocation refDigests from the givenunsignedAttributeprotected abstract List<Digest>getRevocationRefOCSPDigests(SignatureAttribute unsignedAttribute)Returns a list of OCSP revocation refDigests from the givenunsignedAttributeprotected List<TimestampedReference>getSignatureSignedDataReferences()Returns a list of allTimestampedReferences found into CMS SignedData of the signature NOTE: used only in ASiC-E CAdESprotected List<TimestampedReference>getSignatureTimestampReferences()Returns a list ofTimestampedReferencefor a "signature-timestamp" elementList<TimestampToken>getSignatureTimestamps()protected List<TimestampedReference>getSignedDataReferences(TimestampToken timestampToken)Returns a list ofTimestampedReferences for the giventimestampTokenfound into signed properties of the signature NOTE: used only in CAdES.protected abstract SignatureProperties<SignatureAttribute>getSignedSignatureProperties()Returns the 'signed-signature-properties' element of the signatureprotected List<TimestampedReference>getSigningCertificateTimestampReferences()Returns a list ofTimestampedReferences created from signing certificates of the signatureprotected abstract TimestampDataBuildergetTimestampDataBuilder()Returns a relatedTimestampDataBuilderprotected List<TimestampedReference>getTimestampedCertificateRefs(SignatureAttribute unsignedAttribute)Returns a list ofTimestampedReferencecertificate refs found in the givenunsignedAttributeprotected List<TimestampedReference>getTimestampedCertificateValues(SignatureAttribute unsignedAttribute)protected List<TimestampedReference>getTimestampedRevocationRefs(SignatureAttribute unsignedAttribute)Returns a list ofTimestampedReferencerevocation refs found in the givenunsignedAttributeprotected List<TimestampedReference>getTimestampedRevocationValues(SignatureAttribute unsignedAttribute)List<TimestampToken>getTimestampsX1()List<TimestampToken>getTimestampsX2()protected List<TimestampedReference>getTimestampValidationData(SignatureAttribute unsignedAttribute)Returns a list ofTimestampedReferences encapsulated to the "timestamp-validation-data"unsignedAttributeprotected abstract SignatureProperties<SignatureAttribute>getUnsignedSignatureProperties()Returns the 'unsigned-signature-properties' element of the signatureprotected abstract booleanisAllDataObjectsTimestamp(SignatureAttribute signedAttribute)Determines if the givensignedAttributeis an instance of "data-objects-timestamp" element NOTE: Applicable only for XAdESprotected abstract booleanisArchiveTimestamp(SignatureAttribute unsignedAttribute)Determines if the givenunsignedAttributeis an instance of "archive-timestamp" elementprotected abstract booleanisAttributeCertificateRef(SignatureAttribute unsignedAttribute)Determines if the givenunsignedAttributeis an instance of "attribute-certificate-ref" elementprotected abstract booleanisAttributeRevocationRef(SignatureAttribute unsignedAttribute)Determines if the givenunsignedAttributeis an instance of "attribute-revocation-ref" elementprotected abstract booleanisCertificateValues(SignatureAttribute unsignedAttribute)Determines if the givenunsignedAttributeis an instance of "certificate-values" elementprotected abstract booleanisCompleteCertificateRef(SignatureAttribute unsignedAttribute)Determines if the givenunsignedAttributeis an instance of "complete-certificate-ref" elementprotected abstract booleanisCompleteRevocationRef(SignatureAttribute unsignedAttribute)Determines if the givenunsignedAttributeis an instance of "complete-revocation-ref" elementprotected abstract booleanisContentTimestamp(SignatureAttribute signedAttribute)Determines if the givensignedAttributeis an instance of "content-timestamp" element NOTE: Applicable only for CAdESprotected abstract booleanisIndividualDataObjectsTimestamp(SignatureAttribute signedAttribute)Determines if the givensignedAttributeis an instance of "individual-data-objects-timestamp" element NOTE: Applicable only for XAdESprotected abstract booleanisRefsOnlyTimestamp(SignatureAttribute unsignedAttribute)Determines if the givenunsignedAttributeis an instance of "refs-only-timestamp" elementprotected abstract booleanisRevocationValues(SignatureAttribute unsignedAttribute)Determines if the givenunsignedAttributeis an instance of "revocation-values" elementprotected abstract booleanisSigAndRefsTimestamp(SignatureAttribute unsignedAttribute)Determines if the givenunsignedAttributeis an instance of "sig-and-refs-timestamp" elementprotected abstract booleanisSignatureTimestamp(SignatureAttribute unsignedAttribute)Determines if the givenunsignedAttributeis an instance of "signature-timestamp" elementprotected abstract booleanisTimeStampValidationData(SignatureAttribute unsignedAttribute)Determines if the givenunsignedAttributeis an instance of "timestamp-validation-data" elementprotected abstract TimestampTokenmakeTimestampToken(SignatureAttribute signatureAttribute, TimestampType timestampType, List<TimestampedReference> references)Creates a timestamp token from the providedsignatureAttributeprotected voidmakeTimestampTokens()Populates all the lists by data found into the signatureprotected voidpopulateTimestampCertificateSource(TimestampToken timestamp)Adds certificates found in the timestamp to thetimestampCertificateSourceprotected voidpopulateTimestampCertificateSource(List<CertificateToken> certificates)Addscertificatesto thetimestampCertificateSourceprotected voidvalidateTimestamps()Validates list of all timestamps present in the source
-
-
-
Field Detail
-
signatureCertificateSource
protected final SignatureCertificateSource signatureCertificateSource
Sources obtained from a signature object
-
signatureCRLSource
protected final SignatureCRLSource signatureCRLSource
-
signatureOCSPSource
protected final SignatureOCSPSource signatureOCSPSource
-
signatureId
protected final String signatureId
-
signatureScopes
protected final transient List<SignatureScope> signatureScopes
-
certificatePool
protected CertificatePool certificatePool
-
crlSource
protected ListCRLSource crlSource
Revocation sources containing merged data from signature source and timestamps
-
ocspSource
protected ListOCSPSource ocspSource
-
timestampCertificateSource
protected CommonCertificateSource timestampCertificateSource
Local timestamp source to store certificate values found in timestamps
-
-
Constructor Detail
-
AbstractTimestampSource
protected AbstractTimestampSource(AdvancedSignature signature)
Default constructor- Parameters:
signature-AdvancedSignatureis being validated
-
-
Method Detail
-
getContentTimestamps
public List<TimestampToken> getContentTimestamps()
- Specified by:
getContentTimestampsin interfaceSignatureTimestampSource
-
getSignatureTimestamps
public List<TimestampToken> getSignatureTimestamps()
- Specified by:
getSignatureTimestampsin interfaceSignatureTimestampSource
-
getTimestampsX1
public List<TimestampToken> getTimestampsX1()
- Specified by:
getTimestampsX1in interfaceSignatureTimestampSource
-
getTimestampsX2
public List<TimestampToken> getTimestampsX2()
- Specified by:
getTimestampsX2in interfaceSignatureTimestampSource
-
getArchiveTimestamps
public List<TimestampToken> getArchiveTimestamps()
- Specified by:
getArchiveTimestampsin interfaceSignatureTimestampSource
-
getDocumentTimestamps
public List<TimestampToken> getDocumentTimestamps()
- Specified by:
getDocumentTimestampsin interfaceSignatureTimestampSource
-
getAllTimestamps
public List<TimestampToken> getAllTimestamps()
- Specified by:
getAllTimestampsin interfaceSignatureTimestampSource
-
getCommonCRLSource
public ListCRLSource getCommonCRLSource()
Description copied from interface:SignatureTimestampSourceReturns a mergedListCRLSourcebetween signatureCRLSource and all embedded timestamp CRL sources- Specified by:
getCommonCRLSourcein interfaceSignatureTimestampSource- Returns:
ListCRLSource
-
getCommonOCSPSource
public ListOCSPSource getCommonOCSPSource()
Description copied from interface:SignatureTimestampSourceReturns a mergedListOCSPSourcebetween signatureOCSPSource and all embedded timestamp OCSP sources- Specified by:
getCommonOCSPSourcein interfaceSignatureTimestampSource- Returns:
ListOCSPSource
-
createAndValidate
protected void createAndValidate()
Creates and validates all timestamps Must be called only once
-
addExternalTimestamp
public void addExternalTimestamp(TimestampToken timestamp)
Description copied from interface:SignatureTimestampSourceThis method allows to add an external timestamp. The given timestamp must be processed before.- Specified by:
addExternalTimestampin interfaceSignatureTimestampSource- Parameters:
timestamp- the timestamp token
-
makeTimestampTokens
protected void makeTimestampTokens()
Populates all the lists by data found into the signature
-
getSignedSignatureProperties
protected abstract SignatureProperties<SignatureAttribute> getSignedSignatureProperties()
Returns the 'signed-signature-properties' element of the signature- Returns:
SignatureProperties
-
getUnsignedSignatureProperties
protected abstract SignatureProperties<SignatureAttribute> getUnsignedSignatureProperties()
Returns the 'unsigned-signature-properties' element of the signature- Returns:
SignatureProperties
-
isContentTimestamp
protected abstract boolean isContentTimestamp(SignatureAttribute signedAttribute)
Determines if the givensignedAttributeis an instance of "content-timestamp" element NOTE: Applicable only for CAdES- Parameters:
signedAttribute-ISignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis a Data Objects Timestamp, FALSE otherwise
-
isAllDataObjectsTimestamp
protected abstract boolean isAllDataObjectsTimestamp(SignatureAttribute signedAttribute)
Determines if the givensignedAttributeis an instance of "data-objects-timestamp" element NOTE: Applicable only for XAdES- Parameters:
signedAttribute-ISignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis a Data Objects Timestamp, FALSE otherwise
-
isIndividualDataObjectsTimestamp
protected abstract boolean isIndividualDataObjectsTimestamp(SignatureAttribute signedAttribute)
Determines if the givensignedAttributeis an instance of "individual-data-objects-timestamp" element NOTE: Applicable only for XAdES- Parameters:
signedAttribute-ISignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis a Data Objects Timestamp, FALSE otherwise
-
isSignatureTimestamp
protected abstract boolean isSignatureTimestamp(SignatureAttribute unsignedAttribute)
Determines if the givenunsignedAttributeis an instance of "signature-timestamp" element- Parameters:
unsignedAttribute-ISignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis a Signature Timestamp, FALSE otherwise
-
isCompleteCertificateRef
protected abstract boolean isCompleteCertificateRef(SignatureAttribute unsignedAttribute)
Determines if the givenunsignedAttributeis an instance of "complete-certificate-ref" element- Parameters:
unsignedAttribute-ISignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis a Complete Certificate Ref, FALSE otherwise
-
isAttributeCertificateRef
protected abstract boolean isAttributeCertificateRef(SignatureAttribute unsignedAttribute)
Determines if the givenunsignedAttributeis an instance of "attribute-certificate-ref" element- Parameters:
unsignedAttribute-ISignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis an Attribute Certificate Ref, FALSE otherwise
-
isCompleteRevocationRef
protected abstract boolean isCompleteRevocationRef(SignatureAttribute unsignedAttribute)
Determines if the givenunsignedAttributeis an instance of "complete-revocation-ref" element- Parameters:
unsignedAttribute-ISignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis a Complete Revocation Ref, FALSE otherwise
-
isAttributeRevocationRef
protected abstract boolean isAttributeRevocationRef(SignatureAttribute unsignedAttribute)
Determines if the givenunsignedAttributeis an instance of "attribute-revocation-ref" element- Parameters:
unsignedAttribute-ISignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis an Attribute Revocation Ref, FALSE otherwise
-
isRefsOnlyTimestamp
protected abstract boolean isRefsOnlyTimestamp(SignatureAttribute unsignedAttribute)
Determines if the givenunsignedAttributeis an instance of "refs-only-timestamp" element- Parameters:
unsignedAttribute-ISignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis a Refs Only TimeStamp, FALSE otherwise
-
isSigAndRefsTimestamp
protected abstract boolean isSigAndRefsTimestamp(SignatureAttribute unsignedAttribute)
Determines if the givenunsignedAttributeis an instance of "sig-and-refs-timestamp" element- Parameters:
unsignedAttribute-ISignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis a Sig And Refs TimeStamp, FALSE otherwise
-
isCertificateValues
protected abstract boolean isCertificateValues(SignatureAttribute unsignedAttribute)
Determines if the givenunsignedAttributeis an instance of "certificate-values" element- Parameters:
unsignedAttribute-ISignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis a Certificate Values, FALSE otherwise
-
isRevocationValues
protected abstract boolean isRevocationValues(SignatureAttribute unsignedAttribute)
Determines if the givenunsignedAttributeis an instance of "revocation-values" element- Parameters:
unsignedAttribute-ISignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis a Revocation Values, FALSE otherwise
-
isArchiveTimestamp
protected abstract boolean isArchiveTimestamp(SignatureAttribute unsignedAttribute)
Determines if the givenunsignedAttributeis an instance of "archive-timestamp" element- Parameters:
unsignedAttribute-ISignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis an Archive TimeStamp, FALSE otherwise
-
isTimeStampValidationData
protected abstract boolean isTimeStampValidationData(SignatureAttribute unsignedAttribute)
Determines if the givenunsignedAttributeis an instance of "timestamp-validation-data" element- Parameters:
unsignedAttribute-ISignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis a TimeStamp Validation Data, FALSE otherwise
-
makeTimestampToken
protected abstract TimestampToken makeTimestampToken(SignatureAttribute signatureAttribute, TimestampType timestampType, List<TimestampedReference> references)
Creates a timestamp token from the providedsignatureAttribute- Parameters:
signatureAttribute-ISignatureAttributeto create timestamp fromtimestampType- a targetTimestampTypereferences- list ofTimestampedReferences covered by the current timestamp- Returns:
TimestampToken
-
getAllContentTimestampReferences
protected List<TimestampedReference> getAllContentTimestampReferences()
Returns a list ofTimestampedReferences obtained from thesignatureScopes- Returns:
- list of
TimestampedReferences
-
getIndividualContentTimestampedReferences
protected abstract List<TimestampedReference> getIndividualContentTimestampedReferences(SignatureAttribute signedAttribute)
Returns a list ofTimestampedReferences for an "individual-data-objects-timestamp" NOTE: Used only in XAdES- Parameters:
signedAttribute-AbstractTimestampSource- Returns:
- a list of
TimestampedReferences
-
getSignatureTimestampReferences
protected List<TimestampedReference> getSignatureTimestampReferences()
Returns a list ofTimestampedReferencefor a "signature-timestamp" element- Returns:
- list of
TimestampedReferences
-
getSigningCertificateTimestampReferences
protected List<TimestampedReference> getSigningCertificateTimestampReferences()
Returns a list ofTimestampedReferences created from signing certificates of the signature- Returns:
- list of
TimestampedReferences
-
createReferencesForCertificates
protected List<TimestampedReference> createReferencesForCertificates(Collection<CertificateToken> certificates)
Creates a list ofTimestampedReferences for the provided list ofcertificates- Parameters:
certificates- collection ofCertificateTokens- Returns:
- list of
TimestampedReferences
-
getTimestampedCertificateRefs
protected List<TimestampedReference> getTimestampedCertificateRefs(SignatureAttribute unsignedAttribute)
Returns a list ofTimestampedReferencecertificate refs found in the givenunsignedAttribute- Parameters:
unsignedAttribute-AbstractTimestampSourceto find references from- Returns:
- list of
TimestampedReferences
-
getCertificateRefDigests
protected abstract List<Digest> getCertificateRefDigests(SignatureAttribute unsignedAttribute)
Returns a list ofDigests from the givenunsignedAttribute- Parameters:
unsignedAttribute-AbstractTimestampSourceto get certRef Digests from- Returns:
- list of
Digests
-
getTimestampedRevocationRefs
protected List<TimestampedReference> getTimestampedRevocationRefs(SignatureAttribute unsignedAttribute)
Returns a list ofTimestampedReferencerevocation refs found in the givenunsignedAttribute- Parameters:
unsignedAttribute-AbstractTimestampSourceto find references from- Returns:
- list of
TimestampedReferences
-
getRevocationRefCRLDigests
protected abstract List<Digest> getRevocationRefCRLDigests(SignatureAttribute unsignedAttribute)
Returns a list of CRL revocation refDigests from the givenunsignedAttribute- Parameters:
unsignedAttribute-AbstractTimestampSourceto get CRLRef Digests from- Returns:
- list of
Digests
-
getRevocationRefOCSPDigests
protected abstract List<Digest> getRevocationRefOCSPDigests(SignatureAttribute unsignedAttribute)
Returns a list of OCSP revocation refDigests from the givenunsignedAttribute- Parameters:
unsignedAttribute-AbstractTimestampSourceto get OCSPRef Digests from- Returns:
- list of
Digests
-
getTimestampedCertificateValues
protected List<TimestampedReference> getTimestampedCertificateValues(SignatureAttribute unsignedAttribute)
-
getEncapsulatedCertificateIdentifiers
protected abstract List<EncapsulatedCertificateTokenIdentifier> getEncapsulatedCertificateIdentifiers(SignatureAttribute unsignedAttribute)
Returns a list ofEncapsulatedCertificateTokenIdentifiers obtained from the givenunsignedAttribute- Parameters:
unsignedAttribute-AbstractTimestampSourceto get certificate identifiers from- Returns:
- list of
EncapsulatedCertificateTokenIdentifiers
-
getTimestampedRevocationValues
protected List<TimestampedReference> getTimestampedRevocationValues(SignatureAttribute unsignedAttribute)
-
getEncapsulatedCRLIdentifiers
protected abstract List<CRLBinary> getEncapsulatedCRLIdentifiers(SignatureAttribute unsignedAttribute)
Returns a list ofCRLBinarys obtained from the givenunsignedAttribute- Parameters:
unsignedAttribute-AbstractTimestampSourceto get CRL identifiers from- Returns:
- list of
CRLBinarys
-
getEncapsulatedOCSPIdentifiers
protected abstract List<OCSPResponseBinary> getEncapsulatedOCSPIdentifiers(SignatureAttribute unsignedAttribute)
Returns a list ofOCSPResponseBinarys obtained from the givenunsignedAttribute- Parameters:
unsignedAttribute-AbstractTimestampSourceto get OCSP identifiers from- Returns:
- list of
OCSPResponseBinarys
-
getSignedDataReferences
protected List<TimestampedReference> getSignedDataReferences(TimestampToken timestampToken)
Returns a list ofTimestampedReferences for the giventimestampTokenfound into signed properties of the signature NOTE: used only in CAdES. NeedstimestampTokento be initialized before- Parameters:
timestampToken-TimestampTokento get SignedData references for- Returns:
- list of
TimestampedReferences
-
getSignatureSignedDataReferences
protected List<TimestampedReference> getSignatureSignedDataReferences()
Returns a list of allTimestampedReferences found into CMS SignedData of the signature NOTE: used only in ASiC-E CAdES- Returns:
- list of
TimestampedReferences
-
getTimestampValidationData
protected List<TimestampedReference> getTimestampValidationData(SignatureAttribute unsignedAttribute)
Returns a list ofTimestampedReferences encapsulated to the "timestamp-validation-data"unsignedAttribute- Parameters:
unsignedAttribute-AbstractTimestampSourceto get timestamped references from- Returns:
- list of
TimestampedReferences
-
addReference
protected void addReference(List<TimestampedReference> referenceList, TimestampedReference referenceToAdd)
AddsreferenceToAddtoreferenceListwithout duplicates- Parameters:
referenceList- - list ofTimestampedReferences to be extendedreferenceToAdd- -TimestampedReferenceto be added
-
addReferences
protected void addReferences(List<TimestampedReference> referenceList, List<TimestampedReference> referencesToAdd)
AddsreferencesToAddtoreferenceListwithout duplicates- Parameters:
referenceList- - list ofTimestampedReferences to be extendedreferencesToAdd- -TimestampedReferences to be added
-
addReferencesForPreviousTimestamps
protected void addReferencesForPreviousTimestamps(List<TimestampedReference> references, List<TimestampToken> timestampedTimestamps)
-
addEncapsulatedValuesFromTimestamp
protected void addEncapsulatedValuesFromTimestamp(List<TimestampedReference> references, TimestampToken timestampedTimestamp)
Adds to thereferenceslist all validation data embedded to thetimestampedTimestamp- Parameters:
references- list ofTimestampedReferences to extendtimestampedTimestamp-TimestampTokento extract embedded values from
-
getArchiveTimestampType
protected abstract ArchiveTimestampType getArchiveTimestampType(SignatureAttribute unsignedAttribute)
ReturnsArchiveTimestampTypefor the givenunsignedAttribute- Parameters:
unsignedAttribute-AbstractTimestampSourceto get archive timestamp type for
-
validateTimestamps
protected void validateTimestamps()
Validates list of all timestamps present in the source
-
getTimestampDataBuilder
protected abstract TimestampDataBuilder getTimestampDataBuilder()
Returns a relatedTimestampDataBuilder- Returns:
TimestampDataBuilder
-
getCertificateMapWithinTimestamps
public Map<String,List<CertificateToken>> getCertificateMapWithinTimestamps(boolean skipLastArchiveTimestamp)
Description copied from interface:SignatureTimestampSourceReturns a map between all found timestamps and their certificates- Specified by:
getCertificateMapWithinTimestampsin interfaceSignatureTimestampSource- Parameters:
skipLastArchiveTimestamp- in case if the last Archive Timestamp is not needed to be returned- Returns:
- a map between timestamp-id and list of related
CertificateTokens
-
getCertificates
public List<CertificateToken> getCertificates()
Description copied from interface:SignatureTimestampSourceReturns a list of all found certificates in the timestamps- Specified by:
getCertificatesin interfaceSignatureTimestampSource- Returns:
- a list of
CertificateTokens
-
populateTimestampCertificateSource
protected void populateTimestampCertificateSource(TimestampToken timestamp)
Adds certificates found in the timestamp to thetimestampCertificateSource- Parameters:
timestamp-TimestampToken
-
populateTimestampCertificateSource
protected void populateTimestampCertificateSource(List<CertificateToken> certificates)
Addscertificatesto thetimestampCertificateSource- Parameters:
certificates- list ofCertificateTokens
-
-