com.sun.identity.saml.assertion
Class AdviceBase

java.lang.Object
  extended by com.sun.identity.saml.assertion.AdviceBase
Direct Known Subclasses:
Advice

public abstract class AdviceBase
extends Object

The Advice element contains additional information that the issuer wish to provide. This information MAY be ignored by applications without affecting either the semantics or validity. Advice elements MAY be specified in an extension schema. This class is an abstract base class for all Advice implementations and encapsulates common functionality.


Field Summary
protected  List _assertion
           
protected  List _assertionIDRef
           
protected  List _otherElements
           
 
Constructor Summary
AdviceBase(Element element)
          Constructs an Advice element from an existing XML block.
AdviceBase(List assertionidreference, List assertion, List otherelement)
          Constructor
 
Method Summary
protected abstract  AssertionBase createAssertion(Element assertionElement)
          Creates appropriate Assertion Instance
protected abstract  AssertionIDReference createAssertionIDReference(Element assertionIDRefElement)
          Creates appropriate AssertionIDReference Instance
 List getAssertion()
          Gets access to the Assertion in this Advice element
 List getAssertionIDReference()
          Returns access to the AssertionIDReference in this Advice element.
 List getOtherElement()
          Gets other element contained within the Advice element
 String toString()
          Creates a String representation of the Advice element
 String toString(boolean includeNS, boolean declareNS)
          Returns a String representation of the <saml:Advice> element.
 

Field Detail

_assertionIDRef

protected List _assertionIDRef

_assertion

protected List _assertion

_otherElements

protected List _otherElements
Constructor Detail

AdviceBase

public AdviceBase(Element element)
           throws SAMLException
Constructs an Advice element from an existing XML block.

Parameters:
element - representing a DOM tree element
Throws:
SAMLException - if there is an error in the sender or in the element definition.

AdviceBase

public AdviceBase(List assertionidreference,
                  List assertion,
                  List otherelement)
Constructor

Parameters:
assertionidreference - A List of AssertionIDReference.
assertion - A List of Assertion
otherelement - A List of any element defined as any namespace="##other" processContents="lax";
Method Detail

createAssertion

protected abstract AssertionBase createAssertion(Element assertionElement)
                                          throws SAMLException
Creates appropriate Assertion Instance

Parameters:
assertionElement - the assertion Element
Returns:
the assertion instance
Throws:
SAMLException

createAssertionIDReference

protected abstract AssertionIDReference createAssertionIDReference(Element assertionIDRefElement)
                                                            throws SAMLException
Creates appropriate AssertionIDReference Instance

Parameters:
assertionIDRefElement - the assertion ID reference Element
Returns:
the assertion ID reference instance
Throws:
SAMLException

getAssertionIDReference

public List getAssertionIDReference()
Returns access to the AssertionIDReference in this Advice element.

Returns:
A list of AssertionIDReference in this Advice element.

getAssertion

public List getAssertion()
Gets access to the Assertion in this Advice element

Returns:
A list of Assertion in this Advice element

getOtherElement

public List getOtherElement()
Gets other element contained within the Advice element

Returns:
A list of other elements.

toString

public String toString()
Creates a String representation of the Advice element

Overrides:
toString in class Object
Returns:
A String representing the valid XML for this element

toString

public String toString(boolean includeNS,
                       boolean declareNS)
Returns a String representation of the <saml:Advice> 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:
A string containing the valid XML for this element