org.apache.jcp.xml.dsig.internal.dom
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
DOMKeyInfo
public DOMKeyInfo(List<? extends XMLStructure> content,
String id)
- Creates a
DOMKeyInfo.
- Parameters:
content - a list of one or more XMLStructures representing
key information types. The list is defensively copied to protect
against subsequent modification.id - an ID attribute
- Throws:
NullPointerException - if content is null
IllegalArgumentException - if content is empty
ClassCastException - if content contains any entries
that are not of type XMLStructure
DOMKeyInfo
public DOMKeyInfo(Element kiElem,
XMLCryptoContext context,
Provider provider)
throws MarshalException
- Creates a
DOMKeyInfo from XML.
- Parameters:
kiElem - KeyInfo element
- Throws:
MarshalException
getContent
public static List<XMLStructure> getContent(KeyInfo ki)
- A utility function to suppress casting warnings.
- Parameters:
ki -
- Returns:
- the content of a KeyInfo Object
getId
public String getId()
- Specified by:
getId in interface KeyInfo
getContent
public List<XMLStructure> getContent()
- Specified by:
getContent in interface KeyInfo
marshal
public void marshal(XMLStructure parent,
XMLCryptoContext context)
throws MarshalException
- Specified by:
marshal in interface KeyInfo
- Throws:
MarshalException
marshal
public static void marshal(XmlWriter xwriter,
KeyInfo ki,
String dsPrefix,
XMLCryptoContext context)
throws MarshalException
- Throws:
MarshalException
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.