XML Security, 1.6

com.ibm.xml.enc.dom
Class DOMEncryptionProperty

java.lang.Object
  extended by com.ibm.xml.enc.dom.DOMStructure
      extended by com.ibm.xml.enc.dom.DOMEncryptionProperty
All Implemented Interfaces:
EncryptionProperty, XMLStructure

public final class DOMEncryptionProperty
extends DOMStructure
implements EncryptionProperty

DOM-based implementation of EncryptionProperty.


Constructor Summary
DOMEncryptionProperty(org.w3c.dom.Element encPropElem)
          Creates an EncryptionProperty from an element.
DOMEncryptionProperty(java.util.List content, java.lang.String target, java.lang.String id, java.util.Map attributes)
          Creates an EncryptionProperty from the specified parameters.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.util.Map getAttributes()
          Returns an unmodifiable map of attributes from the XML namespace, where the keys are the name of the attributes (ex: xml:space, xml:lang, xml:base).
 java.util.List getContent()
          Returns an unmodifiable list of XMLStructures.
 java.lang.String getId()
          Returns the optional ID.
 java.lang.String getTarget()
          Returns the target URI of the EncryptedType structure that this property describes.
 void marshal(org.w3c.dom.Node parent, java.lang.String encPrefix, DOMCryptoContext context)
           
 
Methods inherited from class com.ibm.xml.enc.dom.DOMStructure
isFeatureSupported
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.xml.crypto.XMLStructure
isFeatureSupported
 

Constructor Detail

DOMEncryptionProperty

public DOMEncryptionProperty(java.util.List content,
                             java.lang.String target,
                             java.lang.String id,
                             java.util.Map attributes)
Creates an EncryptionProperty from the specified parameters.

Parameters:
content - a list of XMLStructures. The list is defensively copied to protect against subsequent modification. May be null or empty.
id - the Id (may be null)
target - the encrypted type structure being described (may be null)
attributes - an unmodifiable map of attributes from the XML namespace (may be null)
Throws:
java.lang.ClassCastException - if content contains any entries that are not of type XMLStructure

DOMEncryptionProperty

public DOMEncryptionProperty(org.w3c.dom.Element encPropElem)
                      throws MarshalException
Creates an EncryptionProperty from an element.

Parameters:
encPropElem - an EncryptionProperty element
Throws:
MarshalException - if there is an error when unmarshalling
Method Detail

getContent

public java.util.List getContent()
Description copied from interface: EncryptionProperty
Returns an unmodifiable list of XMLStructures.

Specified by:
getContent in interface EncryptionProperty
Returns:
an unmodifiable list of XMLStructures (never null or empty)

getId

public java.lang.String getId()
Description copied from interface: EncryptionProperty
Returns the optional ID.

Specified by:
getId in interface EncryptionProperty
Returns:
the ID, or null if not specified

getTarget

public java.lang.String getTarget()
Description copied from interface: EncryptionProperty
Returns the target URI of the EncryptedType structure that this property describes.

Specified by:
getTarget in interface EncryptionProperty
Returns:
the target URI, or null if not specified

getAttributes

public java.util.Map getAttributes()
Description copied from interface: EncryptionProperty
Returns an unmodifiable map of attributes from the XML namespace, where the keys are the name of the attributes (ex: xml:space, xml:lang, xml:base).

Specified by:
getAttributes in interface EncryptionProperty
Returns:
an unmodifiable map of attributes (may be empty, or null if not specified)

marshal

public void marshal(org.w3c.dom.Node parent,
                    java.lang.String encPrefix,
                    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

XML Security, 1.6

Portions Copyright 2003, 2012 IBM Corporation.
Portions Copyright 2003, 2012 Oracle and/or its affiliates.