Class DOMKeyInfo
- java.lang.Object
-
- org.apache.jcp.xml.dsig.internal.dom.DOMStructure
-
- org.apache.jcp.xml.dsig.internal.dom.DOMKeyInfo
-
- All Implemented Interfaces:
javax.xml.crypto.dsig.keyinfo.KeyInfo,javax.xml.crypto.XMLStructure
public final class DOMKeyInfo extends DOMStructure implements javax.xml.crypto.dsig.keyinfo.KeyInfo
DOM-based implementation of KeyInfo.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringidprivate java.util.List<javax.xml.crypto.XMLStructure>keyInfoTypes
-
Constructor Summary
Constructors Constructor Description DOMKeyInfo(java.util.List<? extends javax.xml.crypto.XMLStructure> content, java.lang.String id)Creates aDOMKeyInfo.DOMKeyInfo(org.w3c.dom.Element kiElem, javax.xml.crypto.XMLCryptoContext context, java.security.Provider provider)Creates aDOMKeyInfofrom XML.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.util.List<javax.xml.crypto.XMLStructure>getContent()static java.util.List<javax.xml.crypto.XMLStructure>getContent(javax.xml.crypto.dsig.keyinfo.KeyInfo ki)A utility function to suppress casting warnings.java.lang.StringgetId()inthashCode()voidmarshal(javax.xml.crypto.XMLStructure parent, javax.xml.crypto.XMLCryptoContext context)voidmarshal(org.w3c.dom.Node parent, java.lang.String dsPrefix, javax.xml.crypto.dom.DOMCryptoContext context)private voidmarshal(org.w3c.dom.Node parent, org.w3c.dom.Element kiElem, org.w3c.dom.Node nextSibling, java.lang.String dsPrefix, javax.xml.crypto.dom.DOMCryptoContext context)voidmarshal(org.w3c.dom.Node parent, org.w3c.dom.Node nextSibling, java.lang.String dsPrefix, javax.xml.crypto.dom.DOMCryptoContext context)-
Methods inherited from class org.apache.jcp.xml.dsig.internal.dom.DOMStructure
isFeatureSupported
-
-
-
-
Constructor Detail
-
DOMKeyInfo
public DOMKeyInfo(java.util.List<? extends javax.xml.crypto.XMLStructure> content, java.lang.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:
java.lang.NullPointerException- ifcontentisnulljava.lang.IllegalArgumentException- ifcontentis emptyjava.lang.ClassCastException- ifcontentcontains any entries that are not of typeXMLStructure
-
DOMKeyInfo
public DOMKeyInfo(org.w3c.dom.Element kiElem, javax.xml.crypto.XMLCryptoContext context, java.security.Provider provider) throws javax.xml.crypto.MarshalExceptionCreates aDOMKeyInfofrom XML.- Parameters:
kiElem- KeyInfo element- Throws:
javax.xml.crypto.MarshalException
-
-
Method Detail
-
getContent
public static java.util.List<javax.xml.crypto.XMLStructure> getContent(javax.xml.crypto.dsig.keyinfo.KeyInfo ki)
A utility function to suppress casting warnings.- Parameters:
ki-- Returns:
- the content of a KeyInfo Object
-
getId
public java.lang.String getId()
- Specified by:
getIdin interfacejavax.xml.crypto.dsig.keyinfo.KeyInfo
-
getContent
public java.util.List<javax.xml.crypto.XMLStructure> getContent()
- Specified by:
getContentin interfacejavax.xml.crypto.dsig.keyinfo.KeyInfo
-
marshal
public void marshal(javax.xml.crypto.XMLStructure parent, javax.xml.crypto.XMLCryptoContext context) throws javax.xml.crypto.MarshalException- Specified by:
marshalin interfacejavax.xml.crypto.dsig.keyinfo.KeyInfo- Throws:
javax.xml.crypto.MarshalException
-
marshal
public void marshal(org.w3c.dom.Node parent, java.lang.String dsPrefix, javax.xml.crypto.dom.DOMCryptoContext context) throws javax.xml.crypto.MarshalException- Specified by:
marshalin classDOMStructure- Throws:
javax.xml.crypto.MarshalException
-
marshal
public void marshal(org.w3c.dom.Node parent, org.w3c.dom.Node nextSibling, java.lang.String dsPrefix, javax.xml.crypto.dom.DOMCryptoContext context) throws javax.xml.crypto.MarshalException- Throws:
javax.xml.crypto.MarshalException
-
marshal
private void marshal(org.w3c.dom.Node parent, org.w3c.dom.Element kiElem, org.w3c.dom.Node nextSibling, java.lang.String dsPrefix, javax.xml.crypto.dom.DOMCryptoContext context) throws javax.xml.crypto.MarshalException- Throws:
javax.xml.crypto.MarshalException
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-