Class XAdESSignatureFacet

  • All Implemented Interfaces:
    SignatureFacet

    public class XAdESSignatureFacet
    extends java.lang.Object
    implements SignatureFacet
    XAdES Signature Facet. Implements XAdES v1.4.1 which is compatible with XAdES v1.3.2. The implemented XAdES format is XAdES-BES/EPES. It's up to another part of the signature service to upgrade the XAdES-BES to a XAdES-X-L. This implementation has been tested against an implementation that participated multiple ETSI XAdES plugtests.
    See Also:
    XAdES
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addMimeType​(java.lang.String dsReferenceUri, java.lang.String mimetype)
      Adds a mime-type for the given ds:Reference (referred via its @URI).
      void preSign​(SignatureInfo signatureInfo, org.w3c.dom.Document document, java.util.List<javax.xml.crypto.dsig.Reference> references, java.util.List<javax.xml.crypto.dsig.XMLObject> objects)
      This method is being invoked by the XML signature service engine during pre-sign phase.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XAdESSignatureFacet

        public XAdESSignatureFacet()
    • Method Detail

      • preSign

        public void preSign​(SignatureInfo signatureInfo,
                            org.w3c.dom.Document document,
                            java.util.List<javax.xml.crypto.dsig.Reference> references,
                            java.util.List<javax.xml.crypto.dsig.XMLObject> objects)
                     throws javax.xml.crypto.dsig.XMLSignatureException
        Description copied from interface: SignatureFacet
        This method is being invoked by the XML signature service engine during pre-sign phase. Via this method a signature facet implementation can add signature facets to an XML signature.
        Specified by:
        preSign in interface SignatureFacet
        Parameters:
        signatureInfo - the signature info object holding the OPCPackage and other document related data
        document - the signature document to be used for imports
        references - list of reference definitions
        objects - objects to be signed/included in the signature document
        Throws:
        javax.xml.crypto.dsig.XMLSignatureException
      • addMimeType

        public void addMimeType​(java.lang.String dsReferenceUri,
                                java.lang.String mimetype)
        Adds a mime-type for the given ds:Reference (referred via its @URI). This information is added via the xades:DataObjectFormat element.
        Parameters:
        dsReferenceUri - the reference uri
        mimetype - the mimetype