org.jcp.xml.dsig.internal.dom
Class DOMSignatureProperty

java.lang.Object
  extended by org.jcp.xml.dsig.internal.dom.DOMStructure
      extended by org.jcp.xml.dsig.internal.dom.DOMSignatureProperty
All Implemented Interfaces:
SignatureProperty, XMLStructure

public final class DOMSignatureProperty
extends DOMStructure
implements SignatureProperty

DOM-based implementation of SignatureProperty.

Author:
Sean Mullan

Constructor Summary
DOMSignatureProperty(org.w3c.dom.Element propElem)
          Creates a DOMSignatureProperty from an element.
DOMSignatureProperty(java.util.List content, java.lang.String target, java.lang.String id)
          Creates a SignatureProperty from the specified parameters.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.util.List getContent()
          Returns an unmodifiable list of one or more XMLStructures that are contained in this SignatureProperty.
 java.lang.String getId()
          Returns the Id of this SignatureProperty.
 java.lang.String getTarget()
          Returns the target URI of this SignatureProperty.
 int hashCode()
           
 void marshal(org.w3c.dom.Node parent, java.lang.String dsPrefix, DOMCryptoContext context)
           
 
Methods inherited from class org.jcp.xml.dsig.internal.dom.DOMStructure
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

DOMSignatureProperty

public DOMSignatureProperty(java.util.List content,
                            java.lang.String target,
                            java.lang.String id)
Creates a SignatureProperty from the specified parameters.

Parameters:
content - a list of one or more XMLStructures. The list is defensively copied to protect against subsequent modification.
target - the target URI
id - the Id (may be null)
Throws:
java.lang.ClassCastException - if content contains any entries that are not of type XMLStructure
java.lang.IllegalArgumentException - if content is empty
java.lang.NullPointerException - if content or target is null

DOMSignatureProperty

public DOMSignatureProperty(org.w3c.dom.Element propElem)
                     throws MarshalException
Creates a DOMSignatureProperty from an element.

Parameters:
propElem - a SignatureProperty element
Throws:
MarshalException
Method Detail

getContent

public java.util.List getContent()
Description copied from interface: SignatureProperty
Returns an unmodifiable list of one or more XMLStructures that are contained in this SignatureProperty. These represent additional information items concerning the generation of the XMLSignature (i.e. date/time stamp or serial numbers of cryptographic hardware used in signature generation).

Specified by:
getContent in interface SignatureProperty
Returns:
an unmodifiable list of one or more XMLStructures

getId

public java.lang.String getId()
Description copied from interface: SignatureProperty
Returns the Id of this SignatureProperty.

Specified by:
getId in interface SignatureProperty
Returns:
the Id of this SignatureProperty (or null if not specified)

getTarget

public java.lang.String getTarget()
Description copied from interface: SignatureProperty
Returns the target URI of this SignatureProperty.

Specified by:
getTarget in interface SignatureProperty
Returns:
the target URI of this SignatureProperty (never null)

marshal

public void marshal(org.w3c.dom.Node parent,
                    java.lang.String dsPrefix,
                    DOMCryptoContext context)
             throws MarshalException
Specified by:
marshal in class DOMStructure
Throws:
MarshalException

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2000-2011 The Apache Software Foundation. All Rights Reserved.