com.sun.identity.saml.assertion
Class Evidence

java.lang.Object
  |
  +--com.sun.identity.saml.assertion.Evidence

public class Evidence
extends java.lang.Object

The Evidence element specifies an assertion either by reference or by value. An assertion is specified by reference to the value of the assertion's AssertionIDReference element. An assertion is specified by value by including the entire Assertion object


Constructor Summary
Evidence(org.w3c.dom.Element assertionSpecifierElement)
          This constructor is used to build Evidence object from a block of existing XML that has already been built into a DOM.
Evidence(java.util.Set evidenceContent)
          constructor for a new Evidence element containing a java.util.Set of Assertion objects.
Evidence(java.util.Set assertionIDRef, java.util.Set assertion)
          Constructor to build an Evidence from Set of Assertion and AssertionIDReference objects.
 
Method Summary
 boolean addAssertion(Assertion assertion)
          Method to add an Assertion object into the Evidence object.
 boolean addAssertionIDReference(AssertionIDReference assertionIDRef)
          Method to add an AssertionIDReference object into the Evidence object.
 java.util.Set getAssertion()
          Get java.util.Set of Assertion objects in the Evidence
 java.util.Set getAssertionIDReference()
          Get java.util.Set of AssertionIDReference objects in the Evidence
 boolean removeAssertion(Assertion assertion)
          Method to remove an Assertion object from the Evidence object.
 boolean removeAssertionIDReference(AssertionIDReference assertionIDRef)
          Method to remove an AssertionIDReference object from the Evidence object.
 java.lang.String toString()
          Create a String representation of the element
 java.lang.String toString(boolean includeNS, boolean declareNS)
          Create a String representation of the <Evidence> element (or of the <Evidence> element)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Evidence

public Evidence(org.w3c.dom.Element assertionSpecifierElement)
         throws SAMLException
This constructor is used to build Evidence object from a block of existing XML that has already been built into a DOM.
Parameters:
assertionSpecifierElement: - A org.w3c.dom.Element>/code> representing DOM tree for Evidence object
Throws:
SAMLException - if it could not process the Element properly, implying that there is an error in the sender or in the element definition.

Evidence

public Evidence(java.util.Set evidenceContent)
         throws SAMLException
constructor for a new Evidence element containing a java.util.Set of Assertion objects.
Parameters:
evidenceContent: - A Set of Assertion and AssertionIDReference objects to be put within the Evidence element. The same Set contains both type of elements.
Throws:
SAMLException - if the Set is empty or has invalid object.

Evidence

public Evidence(java.util.Set assertionIDRef,
                java.util.Set assertion)
         throws SAMLException
Constructor to build an Evidence from Set of Assertion and AssertionIDReference objects.
Parameters:
assertion - Set of Assertion objects.
assertionIDRef - Set of AssertionIDReference objects.
Throws:
SAMLException - if either Set is empty or has invalid object.
Method Detail

addAssertion

public boolean addAssertion(Assertion assertion)
Method to add an Assertion object into the Evidence object.
Parameters:
assertion - Assertion to be added
Returns:
boolean indicating success/failure of operation

addAssertionIDReference

public boolean addAssertionIDReference(AssertionIDReference assertionIDRef)
Method to add an AssertionIDReference object into the Evidence object.
Parameters:
assertion - AssertionIDReference to be added
Returns:
boolean indicating success/failure of operation

removeAssertion

public boolean removeAssertion(Assertion assertion)
Method to remove an Assertion object from the Evidence object.
Parameters:
assertion - Assertion to be removed
Returns:
boolean indicating success/failure of operation, would return failure of the Assertion is the only element inside the Evidence.

removeAssertionIDReference

public boolean removeAssertionIDReference(AssertionIDReference assertionIDRef)
Method to remove an AssertionIDReference object from the Evidence object.
Parameters:
assertion - AssertionIDReference to be removed
Returns:
boolean indicating success/failure of operation, would return failure of the AssertionIDReference is the only element inside the Evidence.

getAssertionIDReference

public java.util.Set getAssertionIDReference()
Get java.util.Set of AssertionIDReference objects in the Evidence
Returns:
java.util.Set of AssertionIDReference objects within this Evidence.

getAssertion

public java.util.Set getAssertion()
Get java.util.Set of Assertion objects in the Evidence
Returns:
java.util.Set of Assertion objects within this Evidence.

toString

public java.lang.String toString()
Create a String representation of the element
Overrides:
toString in class java.lang.Object
Returns:
A string containing the valid XML for this element By default name space name is prepended to the element name eg <saml:Evidence>

toString

public java.lang.String toString(boolean includeNS,
                                 boolean declareNS)
Create a String representation of the <Evidence> element (or of the <Evidence> element)
Parameters:
IncludeNS - : Determines whether or not the namespace qualifier is prepended to the Element when converted DeclareNS : Determines whether or not the namespace is declared within the Element.
Returns:
The string containing the valid XML for this element .The top level element is "Evidence"