public interface XMLSignature implements XMLStructure
A representation of the XML Signature element as
defined in the
W3C Recommendation for XML-Signature Syntax and Processing.
This class contains methods for signing and validating XML signatures
with behavior as defined by the W3C specification. The XML Schema Definition
is defined as:
An XMLSignature instance may be created by invoking one of the
{@link XMLSignatureFactory#newXMLSignature newXMLSignature} methods of the
{@link XMLSignatureFactory} class.
If the contents of the underlying document containing the
XMLSignature are subsequently modified, the behavior is
undefined.
Note that this class is named XMLSignature rather than
Signature to avoid naming clashes with the existing
{@link Signature java.security.Signature} class.
Validates the signature according to the
core validation processing rules. This method validates the
signature using the existing state, it does not unmarshal and
reinitialize the contents of the XMLSignature using the
location information specified in the context.
This method only validates the signature the first time it is
invoked. On subsequent invocations, it returns a cached result.
param
validateContext the validating context
return
true if the signature passed core validation,
otherwise false
throws
ClassCastException if the type of validateContext
is not compatible with this XMLSignature
throws
NullPointerException if validateContext is
null
throws
XMLSignatureException if an unexpected error occurs during
validation that prevented the validation operation from completing