|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jcp.xml.dsig.internal.dom.DOMStructure
org.jcp.xml.dsig.internal.dom.DOMXMLSignature
public final class DOMXMLSignature
Disabled: no SafeJ information.
DOM-based implementation of XMLSignature.
| Nested Class Summary | |
|---|---|
class |
DOMXMLSignature.DOMSignatureValue
|
| Nested classes/interfaces inherited from interface javax.xml.crypto.dsig.XMLSignature |
|---|
XMLSignature.SignatureValue |
| Field Summary |
|---|
| Fields inherited from interface javax.xml.crypto.dsig.XMLSignature |
|---|
XMLNS |
| Constructor Summary | |
|---|---|
DOMXMLSignature(org.w3c.dom.Element sigElem,
XMLCryptoContext context,
Provider provider)
Creates a DOMXMLSignature from XML. |
|
DOMXMLSignature(SignedInfo si,
KeyInfo ki,
List objs,
String id,
String signatureValueId)
Creates a DOMXMLSignature from the specified components. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object o)
Indicates whether some other object is "equal to" this one. |
String |
getId()
Returns the optional Id of this XMLSignature. |
KeyInfo |
getKeyInfo()
Returns the key info of this XMLSignature. |
KeySelectorResult |
getKeySelectorResult()
Returns the result of the KeySelector, if specified, after
this XMLSignature has been signed or validated. |
List |
getObjects()
Returns an unmodifiable
list of XMLObjects contained in this XMLSignature. |
XMLSignature.SignatureValue |
getSignatureValue()
Returns the signature value of this XMLSignature. |
SignedInfo |
getSignedInfo()
Returns the signed info of this XMLSignature. |
void |
marshal(org.w3c.dom.Node parent,
org.w3c.dom.Node nextSibling,
String dsPrefix,
DOMCryptoContext context)
|
void |
marshal(org.w3c.dom.Node parent,
String dsPrefix,
DOMCryptoContext context)
|
void |
sign(XMLSignContext signContext)
Signs this XMLSignature. |
boolean |
validate(XMLValidateContext vc)
Validates the signature according to the core validation processing rules. |
| 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 |
|---|
public DOMXMLSignature(SignedInfo si,
KeyInfo ki,
List objs,
String id,
String signatureValueId)
DOMXMLSignature from the specified components.
si - the SignedInfoki - the KeyInfo, or null if not specifiedobjs - a list of XMLObjects or null
if not specified. The list is copied to protect against subsequent
modification.id - an optional id (specify null to omit)signatureValueId - an optional id (specify null to
omit)
NullPointerException - if si is null
public DOMXMLSignature(org.w3c.dom.Element sigElem,
XMLCryptoContext context,
Provider provider)
throws MarshalException
DOMXMLSignature from XML.
sigElem - Signature element
MarshalException - if XMLSignature cannot be unmarshalled| Method Detail |
|---|
public String getId()
XMLSignatureXMLSignature.
getId in interface XMLSignaturenull if not specified)public KeyInfo getKeyInfo()
XMLSignatureXMLSignature.
getKeyInfo in interface XMLSignaturenull if not specified)public SignedInfo getSignedInfo()
XMLSignatureXMLSignature.
getSignedInfo in interface XMLSignaturenull)public List getObjects()
XMLSignatureunmodifiable
list of XMLObjects contained in this XMLSignature.
getObjects in interface XMLSignatureXMLObjects (may be empty
but never null)public XMLSignature.SignatureValue getSignatureValue()
XMLSignatureXMLSignature.
getSignatureValue in interface XMLSignaturepublic KeySelectorResult getKeySelectorResult()
XMLSignatureKeySelector, if specified, after
this XMLSignature has been signed or validated.
getKeySelectorResult in interface XMLSignaturenull if a key
selector has not been specified or this XMLSignature
has not been signed or validated
public void marshal(org.w3c.dom.Node parent,
String dsPrefix,
DOMCryptoContext context)
throws MarshalException
marshal in class DOMStructureMarshalException
public void marshal(org.w3c.dom.Node parent,
org.w3c.dom.Node nextSibling,
String dsPrefix,
DOMCryptoContext context)
throws MarshalException
MarshalException
public boolean validate(XMLValidateContext vc)
throws XMLSignatureException
XMLSignatureXMLSignature 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.
validate in interface XMLSignaturevc - the validating context
true if the signature passed core validation,
otherwise false
XMLSignatureException - if an unexpected error occurs during
validation that prevented the validation operation from completing
public void sign(XMLSignContext signContext)
throws MarshalException,
XMLSignatureException
XMLSignatureXMLSignature.
If this method throws an exception, this XMLSignature and
the signContext parameter will be left in the state that
it was in prior to the invocation.
sign in interface XMLSignaturesignContext - the signing context
MarshalException - if an exception occurs while marshalling
XMLSignatureException - if an unexpected exception occurs while
generating the signaturepublic boolean equals(Object o)
Object
The equals method implements an equivalence relation
on non-null object references:
x, x.equals(x) should return
true.
x and y, x.equals(y)
should return true if and only if
y.equals(x) returns true.
x, y, and z, if
x.equals(y) returns true and
y.equals(z) returns true, then
x.equals(z) should return true.
x and y, multiple invocations of
x.equals(y) consistently return true
or consistently return false, provided no
information used in equals comparisons on the
objects is modified.
x,
x.equals(null) should return false.
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.
equals in class Objecto - the reference object with which to compare.
true if this object is the same as the obj
argument; false otherwise.Object.hashCode(),
HashMap
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||