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
Modifier and TypeFieldDescriptionprotected List
<ReferenceValidation> Cached result of archive data objects validationA list of error messages occurred during a structure validation -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addExternalEvidenceRecord
(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 EvidenceRecordTimeStampSequenceVerifier
Builds an instance ofEvidenceRecordTimeStampSequenceVerifier
to perform a cryptographic validation of an evidence recordprotected abstract EvidenceRecordParser
Builds anEvidenceRecordParser
parsing the Evidence Record to a list of DSS DTOsprotected abstract EvidenceRecordTimestampSource
<?> Builds a new instance of anEvidenceRecordTimestampSource
List
<? 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 theIdentifier
of 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.void
setDetachedContents
(List<DSSDocument> detachedContents) Sets a list of detached documents covered by the reduced HashTree of the Evidence Recordvoid
setEvidenceRecordScopes
(List<SignatureScope> evidenceRecordScopes) Sets a list of covered archival data objectsvoid
setFilename
(String filename) Sets the evidence record filenamevoid
setManifestFile
(ManifestFile manifestFile) Sets a manifest file associated with the evidence recordvoid
setTimestampedReferences
(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, wait
Methods 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:EvidenceRecord
Returns a name of the evidence record document, when present- Specified by:
getFilename
in interfaceEvidenceRecord
- Returns:
String
-
setFilename
-
getDetachedContents
Description copied from interface:EvidenceRecord
Returns detached contents- Specified by:
getDetachedContents
in interfaceEvidenceRecord
- Returns:
- in the case of the detached signature this is the
List
of signed contents.
-
setDetachedContents
Sets a list of detached documents covered by the reduced HashTree of the Evidence Record- Parameters:
detachedContents
- a list ofDSSDocument
s
-
getManifestFile
Description copied from interface:EvidenceRecord
Returns a manifest file associated with the evidence record (used in ASiC)- Specified by:
getManifestFile
in interfaceEvidenceRecord
- Returns:
ManifestFile
-
setManifestFile
Sets a manifest file associated with the evidence record- Parameters:
manifestFile
-ManifestFile
-
getTimestampedReferences
Description copied from interface:EvidenceRecord
Returns a list of references covered by the evidence record- Specified by:
getTimestampedReferences
in interfaceEvidenceRecord
- Returns:
- a list of
TimestampedReference
s
-
setTimestampedReferences
Description copied from interface:EvidenceRecord
Sets references to objects covered by the evidence record- Specified by:
setTimestampedReferences
in interfaceEvidenceRecord
- Parameters:
timestampedReferences
- a list ofTimestampedReference
s
-
getArchiveTimeStampSequence
Gets an archive time-stamp sequence- Returns:
- a list of
ArchiveTimeStampChainObject
s
-
buildArchiveTimeStampSequence
Build an archive time-stamp sequence- Returns:
- a list of ordered
ArchiveTimeStampChainObject
s
-
buildEvidenceRecordParser
Builds anEvidenceRecordParser
parsing the Evidence Record to a list of DSS DTOs- Returns:
EvidenceRecordParser
-
getCertificateSource
Description copied from interface:EvidenceRecord
Gets a certificate source which contains ALL certificates embedded in the evidence record.- Specified by:
getCertificateSource
in interfaceEvidenceRecord
- Returns:
CertificateSource
-
getCRLSource
Description copied from interface:EvidenceRecord
Gets a CRL source which contains ALL CRLs embedded in the evidence record.- Specified by:
getCRLSource
in interfaceEvidenceRecord
- Returns:
OfflineRevocationSource
-
getOCSPSource
Description copied from interface:EvidenceRecord
Gets an OCSP source which contains ALL OCSP responses embedded in the evidence record.- Specified by:
getOCSPSource
in interfaceEvidenceRecord
- Returns:
OfflineRevocationSource
-
getReferenceValidation
Description copied from interface:EvidenceRecord
Returns a list of archive data object validations- Specified by:
getReferenceValidation
in interfaceEvidenceRecord
- Returns:
- a list of
ReferenceValidation
objects corresponding to each archive data object validation
-
validate
Performs validation of the evidence record- Returns:
- a list of
ReferenceValidation
s
-
buildCryptographicEvidenceRecordVerifier
protected abstract EvidenceRecordTimeStampSequenceVerifier buildCryptographicEvidenceRecordVerifier()Builds an instance ofEvidenceRecordTimeStampSequenceVerifier
to perform a cryptographic validation of an evidence record -
getTimestamps
Description copied from interface:EvidenceRecord
Returns a list of incorporated timestamp tokens- Specified by:
getTimestamps
in interfaceEvidenceRecord
- Returns:
- a list of
TimestampToken
s
-
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:EvidenceRecord
Returns a list of detached evidence records covering the current evidence record.- Specified by:
getDetachedEvidenceRecords
in interfaceEvidenceRecord
- Returns:
- a list of
EvidenceRecord
s
-
addExternalEvidenceRecord
Description copied from interface:EvidenceRecord
This method allows to add an external evidence record covering the current evidence record.- Specified by:
addExternalEvidenceRecord
in interfaceEvidenceRecord
- Parameters:
evidenceRecord
-EvidenceRecord
-
getEvidenceRecordScopes
Description copied from interface:EvidenceRecord
Returns a list of covered archival data objects- Specified by:
getEvidenceRecordScopes
in interfaceEvidenceRecord
- Returns:
- a list of
SignatureScope
s
-
setEvidenceRecordScopes
Description copied from interface:EvidenceRecord
Sets a list of covered archival data objects- Specified by:
setEvidenceRecordScopes
in interfaceEvidenceRecord
- Parameters:
evidenceRecordScopes
- a list ofSignatureScope
s
-
getStructureValidationResult
Description copied from interface:EvidenceRecord
Returns a message if the structure validation fails- Specified by:
getStructureValidationResult
in interfaceEvidenceRecord
- Returns:
- a list of
String
error messages if validation fails, an empty list if structural validation succeeds
-
validateStructure
-
getDSSId
Description copied from interface:IdentifierBasedObject
Returns theIdentifier
of the object- Specified by:
getDSSId
in interfaceIdentifierBasedObject
- Returns:
Identifier
-
getId
Description copied from interface:EvidenceRecord
This method returns the DSS unique signature id. It allows to unambiguously identify each signature.- Specified by:
getId
in interfaceEvidenceRecord
- Returns:
- The signature unique Id
-