public final class DOMKeyInfo extends DOMStructure implements KeyInfo
Constructor and Description |
---|
DOMKeyInfo(Element kiElem,
XMLCryptoContext context,
Provider provider)
Creates a
DOMKeyInfo from XML. |
DOMKeyInfo(List<? extends XMLStructure> content,
String id)
Creates a
DOMKeyInfo . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
List |
getContent()
Returns an
unmodifiable
list containing the key information. |
String |
getId()
Return the optional Id attribute of this
KeyInfo , which
may be useful for referencing this KeyInfo from other
XML structures. |
int |
hashCode() |
void |
marshal(Node parent,
Node nextSibling,
String dsPrefix,
DOMCryptoContext context) |
void |
marshal(Node parent,
String dsPrefix,
DOMCryptoContext context) |
void |
marshal(XMLStructure parent,
XMLCryptoContext context)
Marshals the key info to XML.
|
isFeatureSupported
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
isFeatureSupported
public DOMKeyInfo(List<? extends XMLStructure> content, String id)
DOMKeyInfo
.content
- a list of one or more XMLStructure
s representing
key information types. The list is defensively copied to protect
against subsequent modification.id
- an ID attributeNullPointerException
- if content
is null
IllegalArgumentException
- if content
is emptyClassCastException
- if content
contains any entries
that are not of type XMLStructure
public DOMKeyInfo(Element kiElem, XMLCryptoContext context, Provider provider) throws MarshalException
DOMKeyInfo
from XML.kiElem
- KeyInfo elementMarshalException
public String getId()
KeyInfo
KeyInfo
, which
may be useful for referencing this KeyInfo
from other
XML structures.public List getContent()
KeyInfo
unmodifiable
list
containing the key information. Each entry of the list is
an XMLStructure
.
If there is a public subclass representing the type of
XMLStructure
, it is returned as an instance of that
class (ex: an X509Data
element would be returned as an
instance of X509Data
).
getContent
in interface KeyInfo
XMLStructure
s
in this KeyInfo
. Never returns null
or an
empty list.public void marshal(XMLStructure parent, XMLCryptoContext context) throws MarshalException
KeyInfo
marshal
in interface KeyInfo
parent
- a mechanism-specific structure containing the parent node
that the marshalled key info will be appended tocontext
- the XMLCryptoContext
containing additional
context (may be null if not applicable)MarshalException
- if the key info cannot be marshalledpublic void marshal(Node parent, String dsPrefix, DOMCryptoContext context) throws MarshalException
marshal
in class DOMStructure
MarshalException
public void marshal(Node parent, Node nextSibling, String dsPrefix, DOMCryptoContext context) throws MarshalException
MarshalException
Copyright © 2000–2017 The Apache Software Foundation. All rights reserved.