Skip navigation links

Oracle Fusion Middleware XML Security Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10680-05


oracle.security.xmlsec.dsig
Class ReferenceList

java.lang.Object
  extended by oracle.security.xmlsec.util.XMLNode
      extended by oracle.security.xmlsec.util.XMLElement
          extended by oracle.security.xmlsec.dsig.ReferenceList

Direct Known Subclasses:
XSManifest, XSSignedInfo

public abstract class ReferenceList
extends XMLElement

Base class for XML structures containing a list of Reference elements.


Field Summary

 

Fields inherited from class oracle.security.xmlsec.util.XMLNode
node, systemId

 

Constructor Summary
protected ReferenceList(org.w3c.dom.Document owner, java.lang.String tagName)
          Creates a new ReferenceList instance.
protected ReferenceList(org.w3c.dom.Document owner, java.lang.String tagName, java.lang.String id)
          Creates a new ReferenceList instance.
protected ReferenceList(org.w3c.dom.Element element)
          Creates a new ReferenceList instance.
protected ReferenceList(org.w3c.dom.Element element, java.lang.String systemId)
          Creates a new ReferenceList instance.

 

Method Summary
 void addReference(XSReference ref)
          Adds a Reference to this ReferenceList.
 void computeRefDigests()
          Computes the digest of each Reference in this ReferenceList.
 java.lang.String getId()
          Returns the string value of the Id attribute of this ReferenceList, or null if the attribute is missing.
 java.util.ArrayList<byte[]> getPreDigestedData()
          Return the pre Digested data for every reference.
 java.util.Vector getReferences()
          Returns a list of the References for this ReferenceList.
 java.lang.StringBuilder getSignatureDetails()
          Return the digested data for signature and references.
 java.lang.StringBuilder getValidationErrorMessage()
          Return the digested data and related details for failed reference.
 void setId(java.lang.String id)
          Sets the Id attribute of this ReferenceList.
 boolean validateRefDigests(boolean validateManifests)
          Validates the digest of each Reference in this ReferenceList.

 

Methods inherited from class oracle.security.xmlsec.util.XMLElement
addNSPrefixAttr, addNSPrefixAttr, addNSPrefixAttrDefault, addNSPrefixAttrDefault, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getChildElementsByTagName, getChildElementsByTagName, getChildElementsByTagNameNS, getChildElementsByTagNameNS, getDefaultNSPrefix, getElement, getElementsByTagName, getElementsByTagNameNS, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setDefaultNSPrefix

 

Methods inherited from class oracle.security.xmlsec.util.XMLNode
appendChild, appendChild, appendTo, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNode, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getSystemId, hasAttributes, hasChildNodes, insertBefore, insertBefore, isSupported, normalize, removeChild, removeChild, replaceChild, replaceChild, setNodeValue, setPrefix, setSystemId, toBytesXML, toStringXML

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

ReferenceList

protected ReferenceList(org.w3c.dom.Element element)
                 throws org.w3c.dom.DOMException
Creates a new ReferenceList instance. from the given Element node.
Parameters:
element - An Element node in the XML document.
Throws:
org.w3c.dom.DOMException

ReferenceList

protected ReferenceList(org.w3c.dom.Element element,
                        java.lang.String systemId)
                 throws org.w3c.dom.DOMException
Creates a new ReferenceList instance. from the given Element node.
Parameters:
element - An Element node in the XML document.
systemId - The URI string system ID for this element.
Throws:
org.w3c.dom.DOMException
Since:
2.0
See Also:
XMLNode.setSystemId(java.lang.String)

ReferenceList

protected ReferenceList(org.w3c.dom.Document owner,
                        java.lang.String tagName)
                 throws org.w3c.dom.DOMException
Creates a new ReferenceList instance.
Parameters:
owner - The owner document of the new ReferenceList.
tagName - The name of the element to be created; for example, "SignedInfo" if this ReferenceList is to be a XML-DSIG SignedInfo element.
Throws:
org.w3c.dom.DOMException

ReferenceList

protected ReferenceList(org.w3c.dom.Document owner,
                        java.lang.String tagName,
                        java.lang.String id)
                 throws org.w3c.dom.DOMException
Creates a new ReferenceList instance.
Parameters:
owner - The owner document of the new ReferenceList.
tagName - The name of the element to be created; for example, "SignedInfo" if this ReferenceList is to be a XML-DSIG SignedInfo element.
id - An optional string ID name for this reference list element.
Throws:
org.w3c.dom.DOMException

Method Detail

addReference

public void addReference(XSReference ref)
                  throws org.w3c.dom.DOMException
Adds a Reference to this ReferenceList.
Parameters:
ref - A XSReference object.
Throws:
org.w3c.dom.DOMException

getReferences

public java.util.Vector getReferences()
Returns a list of the References for this ReferenceList.
Returns:
A Vector of XSReference objects.

setId

public void setId(java.lang.String id)
           throws org.w3c.dom.DOMException
Sets the Id attribute of this ReferenceList.
Throws:
org.w3c.dom.DOMException

getId

public java.lang.String getId()
Returns the string value of the Id attribute of this ReferenceList, or null if the attribute is missing.

computeRefDigests

public void computeRefDigests()
                       throws ReferenceException
Computes the digest of each Reference in this ReferenceList.

Note: Digests will not be computed for References lacking a URI attribute. See XSReference.computeDigest(byte[] input).

Throws:
ReferenceException

validateRefDigests

public boolean validateRefDigests(boolean validateManifests)
                           throws ReferenceException
Validates the digest of each Reference in this ReferenceList.

Note: References lacking a URI attribute will fail this validation. See XSReference.validate(boolean validateManifests, byte[] dataObject).

Parameters:
validateManifests - If true, nested Manifests pointed to by References will have their enclosed References validated as well.
Returns:
true if all Reference digests are valid. Returns false if any digest is invalid or cannot be validated because the URI attribute is absent.
Throws:
ReferenceException - If an error occurs retrieving Referenced data objects, applying transforms or computing digest values.
See Also:
XSReference.validate(boolean validateManifests), XSReference.validate(boolean validateManifests, byte[] dataObject)

getPreDigestedData

public java.util.ArrayList<byte[]> getPreDigestedData()
Return the pre Digested data for every reference. Digests are available only if you set xml.debug.digest or xml.debug.verify
Returns:

getValidationErrorMessage

public java.lang.StringBuilder getValidationErrorMessage()
Return the digested data and related details for failed reference. Digests are available only if you set xml.debug.verify
Returns:

getSignatureDetails

public java.lang.StringBuilder getSignatureDetails()
Return the digested data for signature and references. Digests are available only if you set xml.debug.digest
Returns:

Skip navigation links

Oracle Fusion Middleware XML Security Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10680-05


Copyright © 2005, 2013 , Oracle. All rights reserved.