org.apache.jcp.xml.dsig.internal.dom
Class DOMRetrievalMethod

java.lang.Object
  extended by org.apache.jcp.xml.dsig.internal.dom.BaseStructure
      extended by org.apache.jcp.xml.dsig.internal.dom.DOMStructure
          extended by 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
DOMRetrievalMethod(Element rmElem, XMLCryptoContext context, Provider provider)
          Creates a DOMRetrievalMethod from an element.
DOMRetrievalMethod(String uri, String type, List<? extends Transform> transforms)
          Creates a DOMRetrievalMethod containing the specified URIReference and List of Transforms.
 
Method Summary
 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 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:
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
NullPointerException - if uriReference is null
ClassCastException - if transforms contains any entries that are not of type Transform

DOMRetrievalMethod

public DOMRetrievalMethod(Element rmElem,
                          XMLCryptoContext context,
                          Provider provider)
                   throws MarshalException
Creates a DOMRetrievalMethod from an element.

Parameters:
rmElem - a RetrievalMethod element
Throws:
MarshalException
Method Detail

getURI

public String getURI()
Specified by:
getURI in interface RetrievalMethod
Specified by:
getURI in interface URIReference

getType

public String getType()
Specified by:
getType in interface URIReference

getTransforms

public List<Transform> getTransforms()
Specified by:
getTransforms in interface RetrievalMethod

marshal

public void marshal(XmlWriter xwriter,
                    String dsPrefix,
                    XMLCryptoContext context)
             throws MarshalException
Specified by:
marshal in class DOMStructure
Throws:
MarshalException

getHere

public Node getHere()
Specified by:
getHere in interface DOMURIReference

dereference

public Data dereference(XMLCryptoContext context)
                 throws URIReferenceException
Specified by:
dereference in interface RetrievalMethod
Throws:
URIReferenceException

dereferenceAsXMLStructure

public XMLStructure dereferenceAsXMLStructure(XMLCryptoContext context)
                                       throws URIReferenceException
Throws:
URIReferenceException

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2000–2014 The Apache Software Foundation. All rights reserved.