DOMValidateContext (Java Platform SE 6) (original) (raw)
javax.xml.crypto.dsig.dom
Class DOMValidateContext
java.lang.Object
javax.xml.crypto.dom.DOMCryptoContext
javax.xml.crypto.dsig.dom.DOMValidateContext
All Implemented Interfaces:
XMLValidateContext, XMLCryptoContext
public class DOMValidateContext
extends DOMCryptoContext
implements XMLValidateContext
A DOM-specific XMLValidateContext. This class contains additional methods to specify the location in a DOM tree where an XMLSignature is to be unmarshalled and validated from.
Note that the behavior of an unmarshalled XMLSignature
is undefined if the contents of the underlying DOM tree are modified by the caller after the XMLSignature
is created.
Also, note that DOMValidateContext
instances can contain information and state specific to the XML signature structure it is used with. The results are unpredictable if aDOMValidateContext
is used with different signature structures (for example, you should not use the same DOMValidateContext
instance to validate two different XMLSignature objects).
Since:
1.6
See Also:
XMLSignatureFactory.unmarshalXMLSignature(XMLValidateContext)
Constructor Summary |
---|
[DOMValidateContext](../../../../../javax/xml/crypto/dsig/dom/DOMValidateContext.html#DOMValidateContext%28java.security.Key, org.w3c.dom.Node%29)(Key validatingKey,Node node) Creates a DOMValidateContext containing the specified key and node. |
[DOMValidateContext](../../../../../javax/xml/crypto/dsig/dom/DOMValidateContext.html#DOMValidateContext%28javax.xml.crypto.KeySelector, org.w3c.dom.Node%29)(KeySelector ks,Node node) Creates a DOMValidateContext containing the specified key selector and node. |
Method Summary | |
---|---|
Node | getNode() Returns the node. |
void | setNode(Node node) Sets the node. |
Methods inherited from class javax.xml.crypto.dom.DOMCryptoContext |
---|
get, getBaseURI, getDefaultNamespacePrefix, getElementById, getKeySelector, [getNamespacePrefix](../../../../../javax/xml/crypto/dom/DOMCryptoContext.html#getNamespacePrefix%28java.lang.String, java.lang.String%29), getProperty, getURIDereferencer, iterator, [put](../../../../../javax/xml/crypto/dom/DOMCryptoContext.html#put%28java.lang.Object, java.lang.Object%29), [putNamespacePrefix](../../../../../javax/xml/crypto/dom/DOMCryptoContext.html#putNamespacePrefix%28java.lang.String, java.lang.String%29), setBaseURI, setDefaultNamespacePrefix, [setIdAttributeNS](../../../../../javax/xml/crypto/dom/DOMCryptoContext.html#setIdAttributeNS%28org.w3c.dom.Element, java.lang.String, java.lang.String%29), setKeySelector, [setProperty](../../../../../javax/xml/crypto/dom/DOMCryptoContext.html#setProperty%28java.lang.String, java.lang.Object%29), setURIDereferencer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, [wait](../../../../../java/lang/Object.html#wait%28long, int%29) |
Methods inherited from interface javax.xml.crypto.XMLCryptoContext |
---|
get, getBaseURI, getDefaultNamespacePrefix, getKeySelector, [getNamespacePrefix](../../../../../javax/xml/crypto/XMLCryptoContext.html#getNamespacePrefix%28java.lang.String, java.lang.String%29), getProperty, getURIDereferencer, [put](../../../../../javax/xml/crypto/XMLCryptoContext.html#put%28java.lang.Object, java.lang.Object%29), [putNamespacePrefix](../../../../../javax/xml/crypto/XMLCryptoContext.html#putNamespacePrefix%28java.lang.String, java.lang.String%29), setBaseURI, setDefaultNamespacePrefix, setKeySelector, [setProperty](../../../../../javax/xml/crypto/XMLCryptoContext.html#setProperty%28java.lang.String, java.lang.Object%29), setURIDereferencer |
Constructor Detail |
---|
DOMValidateContext
public DOMValidateContext(KeySelector ks, Node node)
Creates a DOMValidateContext
containing the specified key selector and node.
Parameters:
ks
- a key selector for finding a validation key
node
- the node
Throws:
[NullPointerException](../../../../../java/lang/NullPointerException.html "class in java.lang")
- if ks
or node
is null
DOMValidateContext
public DOMValidateContext(Key validatingKey, Node node)
Creates a DOMValidateContext
containing the specified key and node. The validating key will be stored in a singleton KeySelector that is returned when the getKeySelector method is called.
Parameters:
validatingKey
- the validating key
node
- the node
Throws:
[NullPointerException](../../../../../java/lang/NullPointerException.html "class in java.lang")
- if validatingKey
or node
is null
Method Detail |
---|
setNode
public void setNode(Node node)
Sets the node.
Parameters:
node
- the node
Throws:
[NullPointerException](../../../../../java/lang/NullPointerException.html "class in java.lang")
- if node
is null
See Also:
getNode
public Node getNode()
Returns the node.
Returns:
the node (never null
)
See Also:
Submit a bug or feature
For further API reference and developer documentation, see Java SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2015, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
Scripting on this page tracks web page traffic, but does not change the content in any way.