Class ManifestBuilder

java.lang.Object
eu.europa.esig.dss.xades.signature.ManifestBuilder

public class ManifestBuilder extends Object
This class builds a ds:Manifest element
 
 	<ds:Manifest Id="manifest">
 		<ds:Reference URI="l_19420170726bg.pdf">
 			<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha512"/>
 			<ds:DigestValue>EUcwRQ....</ds:DigestValue>
 		</ds:Reference>
 		<ds:Reference URI="l_19420170726cs.pdf">
 			<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha512"/>
 			<ds:DigestValue>NQNnr+F...</ds:DigestValue>
 		</ds:Reference>
 		...
 	</ds:Manifest>
 
 
  • Constructor Summary

    Constructors
    Constructor
    Description
    ManifestBuilder(eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm, List<eu.europa.esig.dss.model.DSSDocument> documents)
    Constructor for the builder (the Id of the Manifest tag will be equals to "manifest")
    ManifestBuilder(String manifestId, eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm, List<eu.europa.esig.dss.model.DSSDocument> documents)
    Constructor for the builder
    ManifestBuilder(String manifestId, eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm, List<eu.europa.esig.dss.model.DSSDocument> documents, eu.europa.esig.dss.xml.common.definition.DSSNamespace xmldsigNamespace)
    Constructor for the builder
    ManifestBuilder(String manifestId, List<DSSReference> references)
    The constructor with custom references and default namespace
    ManifestBuilder(String manifestId, List<DSSReference> references, eu.europa.esig.dss.xml.common.definition.DSSNamespace xmldsigNamespace)
    The constructor with custom references
    The constructor with custom references and default manifest id
  • Method Summary

    Modifier and Type
    Method
    Description
    eu.europa.esig.dss.model.DSSDocument
    Builds the Manifest
    Returns a list of DSSReferences

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ManifestBuilder

      public ManifestBuilder(eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm, List<eu.europa.esig.dss.model.DSSDocument> documents)
      Constructor for the builder (the Id of the Manifest tag will be equals to "manifest")
      Parameters:
      digestAlgorithm - the digest algorithm to be used
      documents - the documents to include
    • ManifestBuilder

      public ManifestBuilder(String manifestId, eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm, List<eu.europa.esig.dss.model.DSSDocument> documents)
      Constructor for the builder
      Parameters:
      manifestId - the Id of the Manifest tag
      digestAlgorithm - the digest algorithm to be used
      documents - the documents to include
    • ManifestBuilder

      public ManifestBuilder(String manifestId, eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm, List<eu.europa.esig.dss.model.DSSDocument> documents, eu.europa.esig.dss.xml.common.definition.DSSNamespace xmldsigNamespace)
      Constructor for the builder
      Parameters:
      manifestId - the Id of the Manifest tag
      digestAlgorithm - the digest algorithm to be used
      documents - the documents to include
      xmldsigNamespace - the xmldsig namespace definition
    • ManifestBuilder

      public ManifestBuilder(List<DSSReference> references)
      The constructor with custom references and default manifest id
      Parameters:
      references - a list of custom DSSReferences to be incorporated into the Manifest
    • ManifestBuilder

      public ManifestBuilder(String manifestId, List<DSSReference> references)
      The constructor with custom references and default namespace
      Parameters:
      manifestId - String the id of the Manifest element
      references - a list of custom DSSReferences to be incorporated into the Manifest
    • ManifestBuilder

      public ManifestBuilder(String manifestId, List<DSSReference> references, eu.europa.esig.dss.xml.common.definition.DSSNamespace xmldsigNamespace)
      The constructor with custom references
      Parameters:
      manifestId - String the id of the Manifest element
      references - a list of custom DSSReferences to be incorporated into the Manifest
      xmldsigNamespace - String the xmldsig namespace definition
  • Method Details

    • build

      public eu.europa.esig.dss.model.DSSDocument build()
      Builds the Manifest
      Returns:
      DSSDocument
    • getManifestReferences

      public List<DSSReference> getManifestReferences()
      Returns a list of DSSReferences
      Returns:
      list of DSSReferences