Class DOMKeyInfo
- java.lang.Object
-
- org.apache.jcp.xml.dsig.internal.dom.BaseStructure
-
- org.apache.jcp.xml.dsig.internal.dom.DOMKeyInfo
-
- All Implemented Interfaces:
KeyInfo
,XMLStructure
public final class DOMKeyInfo extends BaseStructure implements KeyInfo
DOM-based implementation of KeyInfo.- Author:
- Sean Mullan
-
-
Constructor Summary
Constructors Constructor Description DOMKeyInfo(List<? extends XMLStructure> content, String id)
Creates aDOMKeyInfo
.DOMKeyInfo(Element kiElem, XMLCryptoContext context, Provider provider)
Creates aDOMKeyInfo
from XML.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
List<XMLStructure>
getContent()
static List<XMLStructure>
getContent(KeyInfo ki)
A utility function to suppress casting warnings.String
getId()
int
hashCode()
void
marshal(XMLStructure parent, XMLCryptoContext context)
static void
marshal(XmlWriter xwriter, KeyInfo ki, String dsPrefix, XMLCryptoContext context)
-
Methods inherited from class org.apache.jcp.xml.dsig.internal.dom.BaseStructure
isFeatureSupported, textOfNode
-
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
-
DOMKeyInfo
public DOMKeyInfo(List<? extends XMLStructure> content, String id)
Creates aDOMKeyInfo
.- Parameters:
content
- a list of one or moreXMLStructure
s representing key information types. The list is defensively copied to protect against subsequent modification.id
- an ID attribute- Throws:
NullPointerException
- ifcontent
isnull
IllegalArgumentException
- ifcontent
is emptyClassCastException
- ifcontent
contains any entries that are not of typeXMLStructure
-
DOMKeyInfo
public DOMKeyInfo(Element kiElem, XMLCryptoContext context, Provider provider) throws MarshalException
Creates aDOMKeyInfo
from XML.- Parameters:
kiElem
- KeyInfo element- Throws:
MarshalException
-
-
Method Detail
-
getContent
public static List<XMLStructure> getContent(KeyInfo ki)
A utility function to suppress casting warnings.- Parameters:
ki
-- Returns:
- the content of a KeyInfo Object
-
getContent
public List<XMLStructure> getContent()
- Specified by:
getContent
in interfaceKeyInfo
-
marshal
public void marshal(XMLStructure parent, XMLCryptoContext context) throws MarshalException
- Specified by:
marshal
in interfaceKeyInfo
- Throws:
MarshalException
-
marshal
public static void marshal(XmlWriter xwriter, KeyInfo ki, String dsPrefix, XMLCryptoContext context) throws MarshalException
- Throws:
MarshalException
-
-