|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jcp.xml.dsig.internal.dom.DOMStructure
org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignature
public final class DOMXMLSignature
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(Element sigElem,
XMLCryptoContext context,
Provider provider)
Creates a DOMXMLSignature from XML. |
|
DOMXMLSignature(SignedInfo si,
KeyInfo ki,
List<? extends XMLObject> objs,
String id,
String signatureValueId)
Creates a DOMXMLSignature from the specified components. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object o)
|
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. |
int |
hashCode()
|
void |
marshal(Node parent,
Node nextSibling,
String dsPrefix,
DOMCryptoContext context)
|
void |
marshal(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.apache.jcp.xml.dsig.internal.dom.DOMStructure |
|---|
isFeatureSupported |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.xml.crypto.XMLStructure |
|---|
isFeatureSupported |
| Constructor Detail |
|---|
public DOMXMLSignature(SignedInfo si,
KeyInfo ki,
List<? extends XMLObject> 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(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(Node parent,
String dsPrefix,
DOMCryptoContext context)
throws MarshalException
marshal in class DOMStructureMarshalException
public void marshal(Node parent,
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)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||