- java.lang.Object
-
- org.apache.jcp.xml.dsig.internal.dom.DOMStructure
-
- org.apache.jcp.xml.dsig.internal.dom.DOMKeyInfo
-
- All Implemented Interfaces:
KeyInfo,XMLStructure
public final class DOMKeyInfo extends DOMStructure implements KeyInfo
DOM-based implementation of KeyInfo.
-
-
Constructor Summary
Constructors Constructor Description DOMKeyInfo(List<? extends XMLStructure> content, String id)Creates aDOMKeyInfo.DOMKeyInfo(Element kiElem, XMLCryptoContext context, Provider provider)Creates aDOMKeyInfofrom XML.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)List<XMLStructure>getContent()static List<XMLStructure>getContent(KeyInfo ki)A utility function to suppress casting warnings.StringgetId()inthashCode()voidmarshal(XMLStructure parent, XMLCryptoContext context)voidmarshal(Node parent, String dsPrefix, DOMCryptoContext context)voidmarshal(Node parent, Node nextSibling, String dsPrefix, DOMCryptoContext context)-
Methods inherited from class org.apache.jcp.xml.dsig.internal.dom.DOMStructure
equalsContent, 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
-
DOMKeyInfo
public DOMKeyInfo(List<? extends XMLStructure> content, String id)
Creates aDOMKeyInfo.- Parameters:
content- a list of one or moreXMLStructures representing key information types. The list is defensively copied to protect against subsequent modification.id- an ID attribute- Throws:
NullPointerException- ifcontentisnullIllegalArgumentException- ifcontentis emptyClassCastException- ifcontentcontains any entries that are not of typeXMLStructure
-
DOMKeyInfo
public DOMKeyInfo(Element kiElem, XMLCryptoContext context, Provider provider) throws MarshalException
Creates aDOMKeyInfofrom 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:
getContentin interfaceKeyInfo
-
marshal
public void marshal(XMLStructure parent, XMLCryptoContext context) throws MarshalException
- Specified by:
marshalin interfaceKeyInfo- Throws:
MarshalException
-
marshal
public void marshal(Node parent, String dsPrefix, DOMCryptoContext context) throws MarshalException
- Specified by:
marshalin classDOMStructure- Throws:
MarshalException
-
marshal
public void marshal(Node parent, Node nextSibling, String dsPrefix, DOMCryptoContext context) throws MarshalException
- Throws:
MarshalException
-
-