/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* $Id: DOMValidateContext.java,v 1.8 2005/05/10 16:31:14 mullan Exp $
*/
/**
* A DOM-specific {@link XMLValidateContext}. This class contains additional
* methods to specify the location in a DOM tree where an {@link XMLSignature}
* is to be unmarshalled and validated from.
*
* <p>Note that the behavior of an unmarshalled <code>XMLSignature</code>
* is undefined if the contents of the underlying DOM tree are modified by the
* caller after the <code>XMLSignature</code> is created.
*
* <p>Also, note that <code>DOMValidateContext</code> instances can contain
* information and state specific to the XML signature structure it is
* used with. The results are unpredictable if a
* <code>DOMValidateContext</code> is used with different signature structures
* (for example, you should not use the same <code>DOMValidateContext</code>
* instance to validate two different {@link XMLSignature} objects).
*
* @author Sean Mullan
* @author JSR 105 Expert Group
* @since 1.6
* @see XMLSignatureFactory#unmarshalXMLSignature(XMLValidateContext)
*/
implements XMLValidateContext {
/**
* Creates a <code>DOMValidateContext</code> containing the specified key
* selector and node.
*
* @param ks a key selector for finding a validation key
* @param node the node
* @throws NullPointerException if <code>ks</code> or <code>node</code> is
* <code>null</code>
*/
throw new NullPointerException("key selector is null");
}
}
/**
* Creates a <code>DOMValidateContext</code> containing the specified key
* and node. The validating key will be stored in a
* {@link KeySelector#singletonKeySelector singleton KeySelector} that
* is returned when the {@link #getKeySelector getKeySelector}
* method is called.
*
* @param validatingKey the validating key
* @param node the node
* @throws NullPointerException if <code>validatingKey</code> or
* <code>node</code> is <code>null</code>
*/
if (validatingKey == null) {
throw new NullPointerException("validatingKey is null");
}
}
throw new NullPointerException("node is null");
}
super.setKeySelector(ks);
super.setProperty("org.jcp.xml.dsig.secureValidation",
}
}
/**
* Sets the node.
*
* @param node the node
* @throws NullPointerException if <code>node</code> is <code>null</code>
* @see #getNode
*/
throw new NullPointerException();
}
}
/**
* Returns the node.
*
* @return the node (never <code>null</code>)
* @see #setNode(Node)
*/
return node;
}
}