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

java.lang.Object
  extended by org.jcp.xml.dsig.internal.dom.DOMStructure
      extended by org.jcp.xml.dsig.internal.dom.DOMRetrievalMethod
All Implemented Interfaces:
DOMURIReference, RetrievalMethod, URIReference, XMLStructure

public final class DOMRetrievalMethod
extends DOMStructure
implements RetrievalMethod, DOMURIReference

Disabled: no SafeJ information.

DOM-based implementation of RetrievalMethod.


Constructor Summary
DOMRetrievalMethod(org.w3c.dom.Element rmElem, XMLCryptoContext context, Provider provider)
          Creates a DOMRetrievalMethod from an element.
DOMRetrievalMethod(String uri, String type, List transforms)
          Creates a DOMRetrievalMethod containing the specified URIReference and List of Transforms.
 
Method Summary
 Data dereference(XMLCryptoContext context)
          Dereferences the KeyInfo information referenced by this RetrievalMethod and applies the specified Transforms.
 XMLStructure dereferenceAsXMLStructure(XMLCryptoContext context)
           
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this one.
 org.w3c.dom.Node getHere()
          Returns the here node.
 List getTransforms()
          Returns an unmodifiable list of Transforms of this RetrievalMethod.
 String getType()
          Returns the type of data referenced by this URI.
 String getURI()
          Returns the URI of the referenced KeyInfo information.
 void marshal(org.w3c.dom.Node parent, String dsPrefix, DOMCryptoContext context)
           
 
Methods inherited from class org.jcp.xml.dsig.internal.dom.DOMStructure
isFeatureSupported
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, 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 transforms)
Class is disabled.

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(org.w3c.dom.Element rmElem,
                          XMLCryptoContext context,
                          Provider provider)
                   throws MarshalException
Class is disabled.

Creates a DOMRetrievalMethod from an element.

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

getURI

public String getURI()
Class is disabled.

Description copied from interface: RetrievalMethod
Returns the URI of the referenced KeyInfo information.

Specified by:
getURI in interface RetrievalMethod
Specified by:
getURI in interface URIReference
Returns:
the URI of the referenced KeyInfo information in RFC 2396 format (never null)

getType

public String getType()
Class is disabled.

Description copied from interface: URIReference
Returns the type of data referenced by this URI.

Specified by:
getType in interface URIReference
Returns:
the type (a URI) of the data object (may be null if not specified)

getTransforms

public List getTransforms()
Class is disabled.

Description copied from interface: RetrievalMethod
Returns an unmodifiable list of Transforms of this RetrievalMethod.

Specified by:
getTransforms in interface RetrievalMethod
Returns:
an unmodifiable list of Transform objects (may be empty but never null).

marshal

public void marshal(org.w3c.dom.Node parent,
                    String dsPrefix,
                    DOMCryptoContext context)
             throws MarshalException
Class is disabled.

Specified by:
marshal in class DOMStructure
Throws:
MarshalException

getHere

public org.w3c.dom.Node getHere()
Class is disabled.

Description copied from interface: DOMURIReference
Returns the here node.

Specified by:
getHere in interface DOMURIReference
Returns:
the attribute or processing instruction node or the parent element of the text node that directly contains the URI

dereference

public Data dereference(XMLCryptoContext context)
                 throws URIReferenceException
Class is disabled.

Description copied from interface: RetrievalMethod
Dereferences the KeyInfo information referenced by this RetrievalMethod and applies the specified Transforms.

Specified by:
dereference in interface RetrievalMethod
Parameters:
context - an XMLCryptoContext that may contain additional useful information for dereferencing the URI. The context's baseURI and dereferencer parameters (if specified) are used to resolve and dereference this RetrievalMethod
Returns:
a Data object representing the raw contents of the KeyInfo information referenced by this RetrievalMethod. It is the caller's responsibility to convert the returned data to an appropriate KeyInfo object.
Throws:
URIReferenceException - if there is an error while dereferencing

dereferenceAsXMLStructure

public XMLStructure dereferenceAsXMLStructure(XMLCryptoContext context)
                                       throws URIReferenceException
Class is disabled.

Throws:
URIReferenceException

equals

public boolean equals(Object obj)
Enabled. assumes no non-deterministic equals methods in libraries

Description copied from class: Object
Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

The equals method for class Object implements the most discriminating possible equivalence relation on objects; that is, for any non-null reference values x and y, this method returns true if and only if x and y refer to the same object (x == y has the value true).

Note that it is generally necessary to override the hashCode method whenever this method is overridden, so as to maintain the general contract for the hashCode method, which states that equal objects must have equal hash codes.

Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Object.hashCode(), HashMap