Package com.sun.identity.saml.assertion
Class EvidenceBase
java.lang.Object
com.sun.identity.saml.assertion.EvidenceBase
- Direct Known Subclasses:
Evidence
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
This class is an abstract base class for all Evidence implementations and
encapsulates common functionality.-
Constructor Summary
ConstructorDescriptionEvidenceBase
(Set evidenceContent) Constructs a newEvidence
element containing a set ofAssertion
objects.EvidenceBase
(Set assertionIDRef, Set assertion) Constructs an Evidence from a Set ofAssertion
andAssertionIDReference
objects.EvidenceBase
(Element assertionSpecifierElement) Constructs anEvidence
object from a block of existing XML that has already been built into a DOM. -
Method Summary
Modifier and TypeMethodDescriptionboolean
addAssertion
(AssertionBase assertion) Adds anAssertion
object into the Evidence object.boolean
addAssertionIDReference
(AssertionIDReference assertionIDRef) Adds anAssertionIDReference
object into theEvidence
object.protected abstract AssertionBase
createAssertion
(Element assertionElement) Creates appropriate Assertion Instanceprotected abstract AssertionIDReference
createAssertionIDReference
(String assertionID) Creates appropriate AssertionIDReference InstanceGetjava.util.Set
ofAssertion
objects in theEvidence
Getjava.util.Set
ofAssertionIDReference
objects in theEvidence
boolean
removeAssertion
(AssertionBase assertion) Removes anAssertion
object from theEvidence
object.boolean
removeAssertionIDReference
(AssertionIDReference assertionIDRef) Removes anAssertionIDReference
object from theEvidence
object.toString()
Returns a String representation of the element.toString
(boolean includeNS, boolean declareNS) Returns a String representation of the<Evidence>
element (or of the<Evidence>
element).
-
Constructor Details
-
EvidenceBase
Constructs anEvidence
object from a block of existing XML that has already been built into a DOM.- Parameters:
assertionSpecifierElement
- Aorg.w3c.dom.Element
representing DOM tree forEvidence
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.
-
EvidenceBase
Constructs a newEvidence
element containing a set ofAssertion
objects.- Parameters:
evidenceContent
- A set ofAssertion
andAssertionIDReference
objects to be put within theEvidence
element. The same Set contains both type of elements.- Throws:
SAMLException
- if the Set is empty or has invalid object.
-
EvidenceBase
Constructs an Evidence from a Set ofAssertion
andAssertionIDReference
objects.- Parameters:
assertionIDRef
- Set ofAssertionIDReference
objects.assertion
- Set ofAssertion
objects.- Throws:
SAMLException
- if either Set is empty or has invalid object.
-
-
Method Details
-
addAssertion
Adds anAssertion
object into the Evidence object.- Parameters:
assertion
-Assertion
to be added- Returns:
- true if operation succeeds.
-
addAssertionIDReference
Adds anAssertionIDReference
object into theEvidence
object.- Parameters:
assertionIDRef
-AssertionIDReference
to be added.- Returns:
- true if operation succeeds.
-
removeAssertion
Removes anAssertion
object from theEvidence
object.- Parameters:
assertion
-Assertion
to be removed.- Returns:
- true if the operation succeeds, Returns failure of the
Assertion
is the only element inside theEvidence
.
-
removeAssertionIDReference
Removes anAssertionIDReference
object from theEvidence
object.- Parameters:
assertionIDRef
-AssertionIDReference
to be removed- Returns:
- true if the operation succeeds, Returns false if the
AssertionIDReference
is the only element inside theEvidence
.
-
getAssertionIDReference
Getjava.util.Set
ofAssertionIDReference
objects in theEvidence
- Returns:
java.util.Set
ofAssertionIDReference
objects within this Evidence.
-
getAssertion
Getjava.util.Set
ofAssertion
objects in theEvidence
- Returns:
java.util.Set
ofAssertion
objects within this Evidence.
-
toString
Returns a String representation of the element. -
toString
Returns a String representation of the<Evidence>
element (or of the<Evidence>
element).- Parameters:
includeNS
- Determines whether or not the namespace qualifier is prepended to theElement
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
.
-
createAssertion
Creates appropriate Assertion Instance- Parameters:
assertionElement
- the assertion Element- Returns:
- the assertion instance
- Throws:
SAMLException
-
createAssertionIDReference
protected abstract AssertionIDReference createAssertionIDReference(String assertionID) throws SAMLException Creates appropriate AssertionIDReference Instance- Parameters:
assertionID
- the assertion ID String- Returns:
- the AssertionIDReference instance
- Throws:
SAMLException
-