Class ASiCEWithCAdESArchiveManifestBuilder
java.lang.Object
eu.europa.esig.dss.asic.common.AbstractASiCManifestBuilder
eu.europa.esig.dss.asic.cades.signature.manifest.ASiCEWithCAdESArchiveManifestBuilder
This class is used to generate the ASiCArchiveManifest.xml content (ASiC-E)
Sample:
<asic:ASiCManifest xmlns:asic="http://uri.etsi.org/02918/v1.2.1#">
<asic:SigReference URI="META-INF/archive_timestamp.tst" MimeType="application/vnd.etsi.timestamp-token"/>
<asic:DataObjectReference URI="META-INF/signature.p7s" MimeType="application/x-pkcs7-signature">
<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<DigestValue>3Qeos8...</DigestValue>
</asic:DataObjectReference>
<asic:DataObjectReference URI="toBeSigned.txt" MimeType="text/plain">
<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<DigestValue>JJZt...</DigestValue>
</asic:DataObjectReference>
<asic:DataObjectReference URI="META-INF/ASiCManifest_1.xml" MimeType="text/xml">
<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<DigestValue>g5dY...</DigestValue>
</asic:DataObjectReference>
</asic:ASiCManifest>
-
Field Summary
Fields inherited from class eu.europa.esig.dss.asic.common.AbstractASiCManifestBuilder
asicContent, digestAlgorithm, sigReferenceUri
-
Constructor Summary
ConstructorDescriptionASiCEWithCAdESArchiveManifestBuilder
(ASiCContent asicContent, DSSDocument lastArchiveManifest, DigestAlgorithm digestAlgorithm, String timestampFilename) The default constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected String
Returns a final filename of the manifestprotected MimeType
(Optional) Returns theMimeType
to be used for a signature reference (signature or timestamp)protected ASiCContentDocumentFilter
Gets anASiCContentDocumentFilter
used to filter the documents to be referenced within ASiC Manifestprotected boolean
isRootfile
(DSSDocument document) Specifies whether thedocument
is a Rootfile documentsetAsicContentDocumentFilter
(ASiCContentDocumentFilter asicContentDocumentFilter) Sets anASiCContentDocumentFilter
used to filter the documents to compute hashes for.Methods inherited from class eu.europa.esig.dss.asic.common.AbstractASiCManifestBuilder
addDataObjectReference, addDataObjectReferences, addSigReference, build, buildDom, createRootElement, getAsicContentDocumentFilter, toDSSDocument
-
Constructor Details
-
ASiCEWithCAdESArchiveManifestBuilder
public ASiCEWithCAdESArchiveManifestBuilder(ASiCContent asicContent, DSSDocument lastArchiveManifest, DigestAlgorithm digestAlgorithm, String timestampFilename) The default constructor- Parameters:
asicContent
-ASiCContent
lastArchiveManifest
-DSSDocument
the last archive manifest "ASiCArchiveManifest.xml"digestAlgorithm
-DigestAlgorithm
to use for digest calculationtimestampFilename
-String
the filename of the timestamp to be associated with the archive manifest
-
-
Method Details
-
isRootfile
Description copied from class:AbstractASiCManifestBuilder
Specifies whether thedocument
is a Rootfile document- Overrides:
isRootfile
in classAbstractASiCManifestBuilder
- Parameters:
document
-DSSDocument
to check- Returns:
- TRUE if the Rootfile attribute shall be added for the document's reference, FALSE otherwise
-
getSigReferenceMimeType
Description copied from class:AbstractASiCManifestBuilder
(Optional) Returns theMimeType
to be used for a signature reference (signature or timestamp)- Specified by:
getSigReferenceMimeType
in classAbstractASiCManifestBuilder
- Returns:
MimeType
-
initDefaultAsicContentDocumentFilter
Description copied from class:AbstractASiCManifestBuilder
Gets anASiCContentDocumentFilter
used to filter the documents to be referenced within ASiC Manifest- Specified by:
initDefaultAsicContentDocumentFilter
in classAbstractASiCManifestBuilder
- Returns:
ASiCContentDocumentFilter
-
setAsicContentDocumentFilter
public ASiCEWithCAdESArchiveManifestBuilder setAsicContentDocumentFilter(ASiCContentDocumentFilter asicContentDocumentFilter) Description copied from class:AbstractASiCManifestBuilder
Sets anASiCContentDocumentFilter
used to filter the documents to compute hashes for. When not set, a defaultASiCContentDocumentFilter
is used for the given manifest type.- Overrides:
setAsicContentDocumentFilter
in classAbstractASiCManifestBuilder
- Parameters:
asicContentDocumentFilter
-ASiCContentDocumentFilter
- Returns:
- this
ASiCEvidenceRecordDigestBuilder
-
getManifestFilename
Description copied from class:AbstractASiCManifestBuilder
Returns a final filename of the manifest- Specified by:
getManifestFilename
in classAbstractASiCManifestBuilder
- Returns:
String
-