Class DOMRetrievalMethod
- java.lang.Object
-
- org.apache.jcp.xml.dsig.internal.dom.DOMStructure
-
- org.apache.jcp.xml.dsig.internal.dom.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 aDOMRetrievalMethod
containing the specified URIReference and List of Transforms.DOMRetrievalMethod(org.w3c.dom.Element rmElem, javax.xml.crypto.XMLCryptoContext context, java.security.Provider provider)
Creates aDOMRetrievalMethod
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 org.apache.jcp.xml.dsig.internal.dom.DOMStructure
isFeatureSupported
-
-
-
-
Constructor Detail
-
DOMRetrievalMethod
public DOMRetrievalMethod(java.lang.String uri, java.lang.String type, java.util.List<? extends javax.xml.crypto.dsig.Transform> transforms)
Creates aDOMRetrievalMethod
containing the specified URIReference and List of Transforms.- Parameters:
uri
- the URItype
- the typetransforms
- a list ofTransform
s. The list is defensively copied to prevent subsequent modification. May benull
or empty.- Throws:
java.lang.IllegalArgumentException
- if the format ofuri
is invalid, as specified by Reference's URI attribute in the W3C specification for XML-Signature Syntax and Processingjava.lang.NullPointerException
- ifuriReference
isnull
java.lang.ClassCastException
- iftransforms
contains any entries that are not of typeTransform
-
DOMRetrievalMethod
public DOMRetrievalMethod(org.w3c.dom.Element rmElem, javax.xml.crypto.XMLCryptoContext context, java.security.Provider provider) throws javax.xml.crypto.MarshalException
Creates aDOMRetrievalMethod
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 interfacejavax.xml.crypto.dsig.keyinfo.RetrievalMethod
- Specified by:
getURI
in interfacejavax.xml.crypto.URIReference
-
getType
public java.lang.String getType()
- Specified by:
getType
in interfacejavax.xml.crypto.URIReference
-
getTransforms
public java.util.List<javax.xml.crypto.dsig.Transform> getTransforms()
- Specified by:
getTransforms
in interfacejavax.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 classDOMStructure
- Throws:
javax.xml.crypto.MarshalException
-
getHere
public org.w3c.dom.Node getHere()
- Specified by:
getHere
in interfacejavax.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 interfacejavax.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 classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-