org.apache.jcp.xml.dsig.internal.dom
Class DOMXMLSignature
java.lang.Object
org.apache.jcp.xml.dsig.internal.dom.BaseStructure
org.apache.jcp.xml.dsig.internal.dom.DOMStructure
org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignature
- All Implemented Interfaces:
- XMLSignature, XMLStructure
public final class DOMXMLSignature
- extends DOMStructure
- implements XMLSignature
DOM-based implementation of XMLSignature.
- Author:
- Sean Mullan, Joyce Leung
DOMXMLSignature
public DOMXMLSignature(SignedInfo si,
KeyInfo ki,
List<? extends XMLObject> objs,
String id,
String signatureValueId)
- Creates a
DOMXMLSignature from the specified components.
- Parameters:
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)
- Throws:
NullPointerException - if si is null
DOMXMLSignature
public DOMXMLSignature(Element sigElem,
XMLCryptoContext context,
Provider provider)
throws MarshalException
- Creates a
DOMXMLSignature from XML.
- Parameters:
sigElem - Signature element
- Throws:
MarshalException - if XMLSignature cannot be unmarshalled
getId
public String getId()
- Specified by:
getId in interface XMLSignature
getKeyInfo
public KeyInfo getKeyInfo()
- Specified by:
getKeyInfo in interface XMLSignature
getSignedInfo
public SignedInfo getSignedInfo()
- Specified by:
getSignedInfo in interface XMLSignature
getObjects
public List<XMLObject> getObjects()
- Specified by:
getObjects in interface XMLSignature
getSignatureValue
public XMLSignature.SignatureValue getSignatureValue()
- Specified by:
getSignatureValue in interface XMLSignature
getKeySelectorResult
public KeySelectorResult getKeySelectorResult()
- Specified by:
getKeySelectorResult in interface XMLSignature
marshal
public void marshal(XmlWriter xwriter,
String dsPrefix,
XMLCryptoContext context)
throws MarshalException
- Specified by:
marshal in class DOMStructure
- Throws:
MarshalException
validate
public boolean validate(XMLValidateContext vc)
throws XMLSignatureException
- Specified by:
validate in interface XMLSignature
- Throws:
XMLSignatureException
sign
public void sign(XMLSignContext signContext)
throws MarshalException,
XMLSignatureException
- Specified by:
sign in interface XMLSignature
- Throws:
MarshalException
XMLSignatureException
equals
public boolean equals(Object o)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
Copyright © 2000–2014 The Apache Software Foundation. All rights reserved.