Class DefaultEvidenceRecord
java.lang.Object
eu.europa.esig.dss.evidencerecord.common.validation.DefaultEvidenceRecord
- All Implemented Interfaces:
IdentifierBasedObject,EvidenceRecord
- Direct Known Subclasses:
ASN1EvidenceRecord,XmlEvidenceRecord
Default representation of an Evidence Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<ReferenceValidation> Cached result of archive data objects validationA list of error messages occurred during a structure validation -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExternalEvidenceRecord(EvidenceRecord evidenceRecord) This method allows to add an external evidence record covering the current evidence record.protected List<? extends ArchiveTimeStampChainObject> Build an archive time-stamp sequenceprotected abstract EvidenceRecordTimeStampSequenceVerifierBuilds an instance ofEvidenceRecordTimeStampSequenceVerifierto perform a cryptographic validation of an evidence recordprotected abstract EvidenceRecordParserBuilds anEvidenceRecordParserparsing the Evidence Record to a list of DSS DTOsprotected abstract EvidenceRecordTimestampSource<?> Builds a new instance of anEvidenceRecordTimestampSourceList<? extends ArchiveTimeStampChainObject> Gets an archive time-stamp sequenceGets a certificate source which contains ALL certificates embedded in the evidence record.Gets a CRL source which contains ALL CRLs embedded in the evidence record.Returns detached contentsReturns a list of detached evidence records covering the current evidence record.getDSSId()Returns theIdentifierof the objectReturns a list of covered archival data objectsReturns a name of the evidence record document, when presentgetId()This method returns the DSS unique signature id.Returns a manifest file associated with the evidence record (used in ASiC)Gets an OCSP source which contains ALL OCSP responses embedded in the evidence record.Returns a list of archive data object validationsReturns a message if the structure validation failsReturns a list of references covered by the evidence recordReturns a list of incorporated timestamp tokensGets a Timestamp source which contains ALL timestamps embedded in the evidence record.voidsetDetachedContents(List<DSSDocument> detachedContents) Sets a list of detached documents covered by the reduced HashTree of the Evidence RecordvoidsetEvidenceRecordScopes(List<SignatureScope> evidenceRecordScopes) Sets a list of covered archival data objectsvoidsetFilename(String filename) Sets the evidence record filenamevoidsetManifestFile(ManifestFile manifestFile) Sets a manifest file associated with the evidence recordvoidsetTimestampedReferences(List<TimestampedReference> timestampedReferences) Sets references to objects covered by the evidence recordprotected List<ReferenceValidation> validate()Performs validation of the evidence recordThis method is used to verify the structure of the evidence record documentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface eu.europa.esig.dss.spi.x509.evidencerecord.EvidenceRecord
getEncoded, getReferenceRecordType
-
Field Details
-
referenceValidations
Cached result of archive data objects validation -
structureValidationMessages
-
-
Constructor Details
-
DefaultEvidenceRecord
protected DefaultEvidenceRecord()Default constructor
-
-
Method Details
-
getFilename
Description copied from interface:EvidenceRecordReturns a name of the evidence record document, when present- Specified by:
getFilenamein interfaceEvidenceRecord- Returns:
String
-
setFilename
-
getDetachedContents
Description copied from interface:EvidenceRecordReturns detached contents- Specified by:
getDetachedContentsin interfaceEvidenceRecord- Returns:
- in the case of the detached signature this is the
Listof signed contents.
-
setDetachedContents
Sets a list of detached documents covered by the reduced HashTree of the Evidence Record- Parameters:
detachedContents- a list ofDSSDocuments
-
getManifestFile
Description copied from interface:EvidenceRecordReturns a manifest file associated with the evidence record (used in ASiC)- Specified by:
getManifestFilein interfaceEvidenceRecord- Returns:
ManifestFile
-
setManifestFile
Sets a manifest file associated with the evidence record- Parameters:
manifestFile-ManifestFile
-
getTimestampedReferences
Description copied from interface:EvidenceRecordReturns a list of references covered by the evidence record- Specified by:
getTimestampedReferencesin interfaceEvidenceRecord- Returns:
- a list of
TimestampedReferences
-
setTimestampedReferences
Description copied from interface:EvidenceRecordSets references to objects covered by the evidence record- Specified by:
setTimestampedReferencesin interfaceEvidenceRecord- Parameters:
timestampedReferences- a list ofTimestampedReferences
-
getArchiveTimeStampSequence
Gets an archive time-stamp sequence- Returns:
- a list of
ArchiveTimeStampChainObjects
-
buildArchiveTimeStampSequence
Build an archive time-stamp sequence- Returns:
- a list of ordered
ArchiveTimeStampChainObjects
-
buildEvidenceRecordParser
Builds anEvidenceRecordParserparsing the Evidence Record to a list of DSS DTOs- Returns:
EvidenceRecordParser
-
getCertificateSource
Description copied from interface:EvidenceRecordGets a certificate source which contains ALL certificates embedded in the evidence record.- Specified by:
getCertificateSourcein interfaceEvidenceRecord- Returns:
CertificateSource
-
getCRLSource
Description copied from interface:EvidenceRecordGets a CRL source which contains ALL CRLs embedded in the evidence record.- Specified by:
getCRLSourcein interfaceEvidenceRecord- Returns:
OfflineRevocationSource
-
getOCSPSource
Description copied from interface:EvidenceRecordGets an OCSP source which contains ALL OCSP responses embedded in the evidence record.- Specified by:
getOCSPSourcein interfaceEvidenceRecord- Returns:
OfflineRevocationSource
-
getReferenceValidation
Description copied from interface:EvidenceRecordReturns a list of archive data object validations- Specified by:
getReferenceValidationin interfaceEvidenceRecord- Returns:
- a list of
ReferenceValidationobjects corresponding to each archive data object validation
-
validate
Performs validation of the evidence record- Returns:
- a list of
ReferenceValidations
-
buildCryptographicEvidenceRecordVerifier
protected abstract EvidenceRecordTimeStampSequenceVerifier buildCryptographicEvidenceRecordVerifier()Builds an instance ofEvidenceRecordTimeStampSequenceVerifierto perform a cryptographic validation of an evidence record -
getTimestamps
Description copied from interface:EvidenceRecordReturns a list of incorporated timestamp tokens- Specified by:
getTimestampsin interfaceEvidenceRecord- Returns:
- a list of
TimestampTokens
-
getTimestampSource
Gets a Timestamp source which contains ALL timestamps embedded in the evidence record.- Returns:
EvidenceRecordTimestampSource
-
buildTimestampSource
Builds a new instance of anEvidenceRecordTimestampSource- Returns:
EvidenceRecordTimestampSource
-
getDetachedEvidenceRecords
Description copied from interface:EvidenceRecordReturns a list of detached evidence records covering the current evidence record.- Specified by:
getDetachedEvidenceRecordsin interfaceEvidenceRecord- Returns:
- a list of
EvidenceRecords
-
addExternalEvidenceRecord
Description copied from interface:EvidenceRecordThis method allows to add an external evidence record covering the current evidence record.- Specified by:
addExternalEvidenceRecordin interfaceEvidenceRecord- Parameters:
evidenceRecord-EvidenceRecord
-
getEvidenceRecordScopes
Description copied from interface:EvidenceRecordReturns a list of covered archival data objects- Specified by:
getEvidenceRecordScopesin interfaceEvidenceRecord- Returns:
- a list of
SignatureScopes
-
setEvidenceRecordScopes
Description copied from interface:EvidenceRecordSets a list of covered archival data objects- Specified by:
setEvidenceRecordScopesin interfaceEvidenceRecord- Parameters:
evidenceRecordScopes- a list ofSignatureScopes
-
getStructureValidationResult
Description copied from interface:EvidenceRecordReturns a message if the structure validation fails- Specified by:
getStructureValidationResultin interfaceEvidenceRecord- Returns:
- a list of
Stringerror messages if validation fails, an empty list if structural validation succeeds
-
validateStructure
-
getDSSId
Description copied from interface:IdentifierBasedObjectReturns theIdentifierof the object- Specified by:
getDSSIdin interfaceIdentifierBasedObject- Returns:
Identifier
-
getId
Description copied from interface:EvidenceRecordThis method returns the DSS unique signature id. It allows to unambiguously identify each signature.- Specified by:
getIdin interfaceEvidenceRecord- Returns:
- The signature unique Id
-