Class DOMRetrievalMethod

  • All Implemented Interfaces:
    javax.xml.crypto.dom.DOMURIReference, javax.xml.crypto.dsig.keyinfo.RetrievalMethod, javax.xml.crypto.URIReference, javax.xml.crypto.XMLStructure

    public final class DOMRetrievalMethod
    extends DOMStructure
    implements javax.xml.crypto.dsig.keyinfo.RetrievalMethod, javax.xml.crypto.dom.DOMURIReference
    DOM-based implementation of RetrievalMethod.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.w3c.dom.Attr here  
      private java.util.List<javax.xml.crypto.dsig.Transform> transforms  
      private java.lang.String type  
      private java.lang.String uri  
    • Constructor Summary

      Constructors 
      Constructor Description
      DOMRetrievalMethod​(java.lang.String uri, java.lang.String type, java.util.List<? extends javax.xml.crypto.dsig.Transform> transforms)
      Creates a DOMRetrievalMethod containing the specified URIReference and List of Transforms.
      DOMRetrievalMethod​(org.w3c.dom.Element rmElem, javax.xml.crypto.XMLCryptoContext context, java.security.Provider provider)
      Creates a DOMRetrievalMethod from an element.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.xml.crypto.Data dereference​(javax.xml.crypto.XMLCryptoContext context)  
      javax.xml.crypto.XMLStructure dereferenceAsXMLStructure​(javax.xml.crypto.XMLCryptoContext context)  
      boolean equals​(java.lang.Object obj)  
      org.w3c.dom.Node getHere()  
      java.util.List<javax.xml.crypto.dsig.Transform> getTransforms()  
      java.lang.String getType()  
      java.lang.String getURI()  
      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

      • transforms

        private final java.util.List<javax.xml.crypto.dsig.Transform> transforms
      • uri

        private java.lang.String uri
      • type

        private java.lang.String type
      • here

        private org.w3c.dom.Attr here
    • Constructor Detail

      • DOMRetrievalMethod

        public DOMRetrievalMethod​(java.lang.String uri,
                                  java.lang.String type,
                                  java.util.List<? extends javax.xml.crypto.dsig.Transform> transforms)
        Creates a DOMRetrievalMethod containing the specified URIReference and List of Transforms.
        Parameters:
        uri - the URI
        type - the type
        transforms - a list of Transforms. The list is defensively copied to prevent subsequent modification. May be null or empty.
        Throws:
        java.lang.IllegalArgumentException - if the format of uri is invalid, as specified by Reference's URI attribute in the W3C specification for XML-Signature Syntax and Processing
        java.lang.NullPointerException - if uriReference is null
        java.lang.ClassCastException - if transforms contains any entries that are not of type Transform
      • DOMRetrievalMethod

        public DOMRetrievalMethod​(org.w3c.dom.Element rmElem,
                                  javax.xml.crypto.XMLCryptoContext context,
                                  java.security.Provider provider)
                           throws javax.xml.crypto.MarshalException
        Creates a DOMRetrievalMethod from an element.
        Parameters:
        rmElem - a RetrievalMethod element
        Throws:
        javax.xml.crypto.MarshalException
    • Method Detail

      • getURI

        public java.lang.String getURI()
        Specified by:
        getURI in interface javax.xml.crypto.dsig.keyinfo.RetrievalMethod
        Specified by:
        getURI in interface javax.xml.crypto.URIReference
      • getType

        public java.lang.String getType()
        Specified by:
        getType in interface javax.xml.crypto.URIReference
      • getTransforms

        public java.util.List<javax.xml.crypto.dsig.Transform> getTransforms()
        Specified by:
        getTransforms in interface javax.xml.crypto.dsig.keyinfo.RetrievalMethod
      • 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
      • getHere

        public org.w3c.dom.Node getHere()
        Specified by:
        getHere in interface javax.xml.crypto.dom.DOMURIReference
      • dereference

        public javax.xml.crypto.Data dereference​(javax.xml.crypto.XMLCryptoContext context)
                                          throws javax.xml.crypto.URIReferenceException
        Specified by:
        dereference in interface javax.xml.crypto.dsig.keyinfo.RetrievalMethod
        Throws:
        javax.xml.crypto.URIReferenceException
      • dereferenceAsXMLStructure

        public javax.xml.crypto.XMLStructure dereferenceAsXMLStructure​(javax.xml.crypto.XMLCryptoContext context)
                                                                throws javax.xml.crypto.URIReferenceException
        Throws:
        javax.xml.crypto.URIReferenceException
      • equals

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

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