org.apache.jcp.xml.dsig.internal.dom
Class DOMKeyInfo

java.lang.Object
  extended by org.apache.jcp.xml.dsig.internal.dom.BaseStructure
      extended by 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
DOMKeyInfo(Element kiElem, XMLCryptoContext context, Provider provider)
          Creates a DOMKeyInfo from XML.
DOMKeyInfo(List<? extends XMLStructure> content, String id)
          Creates a DOMKeyInfo.
 
Method Summary
 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 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
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

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.