Class DOMRetrievalMethod
- java.lang.Object
-
- org.apache.jcp.xml.dsig.internal.dom.BaseStructure
-
- org.apache.jcp.xml.dsig.internal.dom.DOMStructure
-
- org.apache.jcp.xml.dsig.internal.dom.DOMRetrievalMethod
-
- All Implemented Interfaces:
DOMURIReference
,RetrievalMethod
,URIReference
,XMLStructure
public final class DOMRetrievalMethod extends DOMStructure implements RetrievalMethod, DOMURIReference
DOM-based implementation of RetrievalMethod.- Author:
- Sean Mullan, Joyce Leung
-
-
Constructor Summary
Constructors Constructor Description DOMRetrievalMethod(String uri, String type, List<? extends Transform> transforms)
Creates aDOMRetrievalMethod
containing the specified URIReference and List of Transforms.DOMRetrievalMethod(Element rmElem, XMLCryptoContext context, Provider provider)
Creates aDOMRetrievalMethod
from an element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Data
dereference(XMLCryptoContext context)
XMLStructure
dereferenceAsXMLStructure(XMLCryptoContext context)
boolean
equals(Object obj)
Node
getHere()
List<Transform>
getTransforms()
String
getType()
String
getURI()
int
hashCode()
void
marshal(XmlWriter xwriter, String dsPrefix, XMLCryptoContext context)
-
Methods inherited from class org.apache.jcp.xml.dsig.internal.dom.BaseStructure
isFeatureSupported, textOfNode
-
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
-
-
-
-
Constructor Detail
-
DOMRetrievalMethod
public DOMRetrievalMethod(String uri, String type, List<? extends 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:
IllegalArgumentException
- if the format ofuri
is invalid, as specified by Reference's URI attribute in the W3C specification for XML-Signature Syntax and ProcessingNullPointerException
- ifuriReference
isnull
ClassCastException
- iftransforms
contains any entries that are not of typeTransform
-
DOMRetrievalMethod
public DOMRetrievalMethod(Element rmElem, XMLCryptoContext context, Provider provider) throws MarshalException
Creates aDOMRetrievalMethod
from an element.- Parameters:
rmElem
- a RetrievalMethod element- Throws:
MarshalException
-
-
Method Detail
-
getURI
public String getURI()
- Specified by:
getURI
in interfaceRetrievalMethod
- Specified by:
getURI
in interfaceURIReference
-
getType
public String getType()
- Specified by:
getType
in interfaceURIReference
-
getTransforms
public List<Transform> getTransforms()
- Specified by:
getTransforms
in interfaceRetrievalMethod
-
marshal
public void marshal(XmlWriter xwriter, String dsPrefix, XMLCryptoContext context) throws MarshalException
- Specified by:
marshal
in classDOMStructure
- Throws:
MarshalException
-
getHere
public Node getHere()
- Specified by:
getHere
in interfaceDOMURIReference
-
dereference
public Data dereference(XMLCryptoContext context) throws URIReferenceException
- Specified by:
dereference
in interfaceRetrievalMethod
- Throws:
URIReferenceException
-
dereferenceAsXMLStructure
public XMLStructure dereferenceAsXMLStructure(XMLCryptoContext context) throws URIReferenceException
- Throws:
URIReferenceException
-
-