Class DOMSignatureProperty

  • All Implemented Interfaces:
    javax.xml.crypto.dsig.SignatureProperty, javax.xml.crypto.XMLStructure

    public final class DOMSignatureProperty
    extends DOMStructure
    implements javax.xml.crypto.dsig.SignatureProperty
    DOM-based implementation of SignatureProperty.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<javax.xml.crypto.XMLStructure> content  
      private java.lang.String id  
      private java.lang.String target  
    • Constructor Summary

      Constructors 
      Constructor Description
      DOMSignatureProperty​(java.util.List<? extends javax.xml.crypto.XMLStructure> content, java.lang.String target, java.lang.String id)
      Creates a SignatureProperty from the specified parameters.
      DOMSignatureProperty​(org.w3c.dom.Element propElem)
      Creates a DOMSignatureProperty from an element.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      private boolean equalsContent​(java.util.List<javax.xml.crypto.XMLStructure> otherContent)  
      java.util.List<javax.xml.crypto.XMLStructure> getContent()  
      java.lang.String getId()  
      java.lang.String getTarget()  
      int hashCode()  
      void marshal​(org.w3c.dom.Node parent, java.lang.String dsPrefix, javax.xml.crypto.dom.DOMCryptoContext context)  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.xml.crypto.XMLStructure

        isFeatureSupported
    • Field Detail

      • id

        private final java.lang.String id
      • target

        private final java.lang.String target
      • content

        private final java.util.List<javax.xml.crypto.XMLStructure> content
    • Constructor Detail

      • DOMSignatureProperty

        public DOMSignatureProperty​(java.util.List<? extends javax.xml.crypto.XMLStructure> content,
                                    java.lang.String target,
                                    java.lang.String id)
        Creates a SignatureProperty from the specified parameters.
        Parameters:
        content - a list of one or more XMLStructures. The list is defensively copied to protect against subsequent modification.
        target - the target URI
        id - the Id (may be null)
        Throws:
        java.lang.ClassCastException - if content contains any entries that are not of type XMLStructure
        java.lang.IllegalArgumentException - if content is empty
        java.lang.NullPointerException - if content or target is null
      • DOMSignatureProperty

        public DOMSignatureProperty​(org.w3c.dom.Element propElem)
                             throws javax.xml.crypto.MarshalException
        Creates a DOMSignatureProperty from an element.
        Parameters:
        propElem - a SignatureProperty element
        Throws:
        javax.xml.crypto.MarshalException
    • Method Detail

      • getContent

        public java.util.List<javax.xml.crypto.XMLStructure> getContent()
        Specified by:
        getContent in interface javax.xml.crypto.dsig.SignatureProperty
      • getId

        public java.lang.String getId()
        Specified by:
        getId in interface javax.xml.crypto.dsig.SignatureProperty
      • getTarget

        public java.lang.String getTarget()
        Specified by:
        getTarget in interface javax.xml.crypto.dsig.SignatureProperty
      • marshal

        public void marshal​(org.w3c.dom.Node parent,
                            java.lang.String dsPrefix,
                            javax.xml.crypto.dom.DOMCryptoContext context)
                     throws javax.xml.crypto.MarshalException
        Specified by:
        marshal in class DOMStructure
        Throws:
        javax.xml.crypto.MarshalException
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equalsContent

        private boolean equalsContent​(java.util.List<javax.xml.crypto.XMLStructure> otherContent)