Class ASiCEvidenceRecordDigestBuilder
java.lang.Object
eu.europa.esig.dss.asic.common.evidencerecord.ZipContentEvidenceRecordDigestBuilder
eu.europa.esig.dss.asic.common.evidencerecord.ASiCEvidenceRecordDigestBuilder
This class is used to build hashes for data objects within an ASiC container for
potential evidence-record incorporation
-
Field Summary
Fields inherited from class eu.europa.esig.dss.asic.common.evidencerecord.ZipContentEvidenceRecordDigestBuilder
dataObjectDigestBuilderFactory, digestAlgorithm
-
Constructor Summary
ConstructorDescriptionASiCEvidenceRecordDigestBuilder
(ASiCContent asicContent) Creates a ASiCEvidenceRecordDigestBuilder to build hashes fromASiCContent
, using a default SHA-256 digest algorithmASiCEvidenceRecordDigestBuilder
(ASiCContent asicContent, DigestAlgorithm digestAlgorithm) Creates a ASiCEvidenceRecordDigestBuilder to build hashes with the providedDigestAlgorithm
fromASiCContent
ASiCEvidenceRecordDigestBuilder
(DSSDocument asicContainer) Creates a ASiCEvidenceRecordDigestBuilder to build hashes from aDSSDocument
, represented by an ASiC container, using a default SHA-256 digest algorithmASiCEvidenceRecordDigestBuilder
(DSSDocument asicContainer, DigestAlgorithm digestAlgorithm) Creates a ASiCEvidenceRecordDigestBuilder to build hashes with the providedDigestAlgorithm
from aDSSDocument
, represented by an ASiC container -
Method Summary
Modifier and TypeMethodDescriptionprotected void
This method verifies whether the configuration of the current builder class is validBuilds a list of hashes for the content files of the provided ZIP containerprotected List
<DSSDocument> This method executes anAsicContentDocumentFilter
and returns a list of documents to compute hashes forsetAsicContentDocumentFilter
(ASiCContentDocumentFilter asicContentDocumentFilter) Sets anASiCContentDocumentFilter
used to filter the documents to compute hashes forsetDataObjectDigestBuilderFactory
(DataObjectDigestBuilderFactory dataObjectDigestBuilderFactory) Sets a factory to instantiate a newDataObjectDigestBuilder
for hashes computation of the given evidence record type (e.g.Methods inherited from class eu.europa.esig.dss.asic.common.evidencerecord.ZipContentEvidenceRecordDigestBuilder
computeDigestForDocuments
-
Constructor Details
-
ASiCEvidenceRecordDigestBuilder
Creates a ASiCEvidenceRecordDigestBuilder to build hashes from aDSSDocument
, represented by an ASiC container, using a default SHA-256 digest algorithm- Parameters:
asicContainer
-ASiCContent
representing a content of an ASiC archive- Throws:
IllegalInputException
- if the provided document is not of a supported ASiC container type
-
ASiCEvidenceRecordDigestBuilder
public ASiCEvidenceRecordDigestBuilder(DSSDocument asicContainer, DigestAlgorithm digestAlgorithm) throws IllegalInputException Creates a ASiCEvidenceRecordDigestBuilder to build hashes with the providedDigestAlgorithm
from aDSSDocument
, represented by an ASiC container- Parameters:
asicContainer
-ASiCContent
representing a content of an ASiC archivedigestAlgorithm
-DigestAlgorithm
- Throws:
IllegalInputException
- if the provided document is not of a supported ASiC container type
-
ASiCEvidenceRecordDigestBuilder
Creates a ASiCEvidenceRecordDigestBuilder to build hashes fromASiCContent
, using a default SHA-256 digest algorithm- Parameters:
asicContent
-ASiCContent
representing a content of an ASiC archive
-
ASiCEvidenceRecordDigestBuilder
Creates a ASiCEvidenceRecordDigestBuilder to build hashes with the providedDigestAlgorithm
fromASiCContent
- Parameters:
asicContent
-ASiCContent
representing a content of an ASiC archivedigestAlgorithm
-DigestAlgorithm
to be used on hashes computation
-
-
Method Details
-
setDataObjectDigestBuilderFactory
public ASiCEvidenceRecordDigestBuilder setDataObjectDigestBuilderFactory(DataObjectDigestBuilderFactory dataObjectDigestBuilderFactory) Sets a factory to instantiate a newDataObjectDigestBuilder
for hashes computation of the given evidence record type (e.g. XMLERS or ASN.1 ERS)- Overrides:
setDataObjectDigestBuilderFactory
in classZipContentEvidenceRecordDigestBuilder
- Parameters:
dataObjectDigestBuilderFactory
-DataObjectDigestBuilderFactory
- Returns:
- this
ASiCEvidenceRecordDigestBuilder
-
setAsicContentDocumentFilter
public ASiCEvidenceRecordDigestBuilder setAsicContentDocumentFilter(ASiCContentDocumentFilter asicContentDocumentFilter) Sets anASiCContentDocumentFilter
used to filter the documents to compute hashes for- Parameters:
asicContentDocumentFilter
-ASiCContentDocumentFilter
- Returns:
- this
ASiCEvidenceRecordDigestBuilder
-
buildDigestGroup
Description copied from class:ZipContentEvidenceRecordDigestBuilder
Builds a list of hashes for the content files of the provided ZIP container- Overrides:
buildDigestGroup
in classZipContentEvidenceRecordDigestBuilder
- Returns:
- a list of
Digest
s
-
assertConfigurationValid
protected void assertConfigurationValid()Description copied from class:ZipContentEvidenceRecordDigestBuilder
This method verifies whether the configuration of the current builder class is valid- Overrides:
assertConfigurationValid
in classZipContentEvidenceRecordDigestBuilder
-
getDocumentListToComputeDigest
This method executes anAsicContentDocumentFilter
and returns a list of documents to compute hashes for- Returns:
- a list of
DSSDocument
s
-