org.openxri.saml
Class Assertion

java.lang.Object
  extended by org.openxri.saml.Assertion

public class Assertion
extends java.lang.Object

This class provides encapsulation of a SAML 2.0 Assertion

Author:
=chetan

Constructor Summary
Assertion()
          Contructs a SAML 2.0 assertion and generates an id for it
Assertion(org.w3c.dom.Element oElem)
          Contructs a SAML 2.0 assertion from the specified DOM
 
Method Summary
 java.lang.String dump()
          Returns object as a formatted XML string.
 void fromDOM(org.w3c.dom.Element oElem)
          This method populates the object from DOM.
 void genXmlID()
          Sets the id attribute with a newly generated id
 AttributeStatement getAttributeStatement()
          Returns the first attribute statement in the assertion
 Conditions getConditions()
          Returns the conditions element of the assertion
 org.w3c.dom.Element getDOM()
          This method returns DOM stored with this object.
 java.lang.String getIssueInstant()
          Returns the issueInstant attribute
 NameID getIssuer()
          Returns the issuer element of the assertion
 Subject getSubject()
          Returns the subject of this assertion
 java.lang.String getXmlID()
          Returns the id attribute
 boolean isValid()
          Returns true of the assertion is valid.
 void reset()
          Resets the internal state of this object
 void setAttrStatement(AttributeStatement oVal)
          Sets the attribute statement element of the assertion.
 void setConditions(Conditions oVal)
          Sets the conditions element of the assertion
 void setDOM(org.w3c.dom.Element oElem)
          This method will import from DOM, and hold on to it, as retrievable by getDOM.
 void setIssueInstant(java.lang.String sVal)
          Sets the issueInstant attribute
 void setIssuer(NameID oIssuer)
          Sets the issuer element of the assertion
 void setSubject(Subject oVal)
          Sets the subject element of the assertion
 void setXmlID(java.lang.String sVal)
          Sets the id attribute
 org.w3c.dom.Element toDOM(org.w3c.dom.Document oDoc)
          This method will make DOM using the specified document.
 java.lang.String toString()
          Returns formatted object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Assertion

public Assertion()
Contructs a SAML 2.0 assertion and generates an id for it


Assertion

public Assertion(org.w3c.dom.Element oElem)
Contructs a SAML 2.0 assertion from the specified DOM

Method Detail

getIssueInstant

public java.lang.String getIssueInstant()
Returns the issueInstant attribute


setIssueInstant

public void setIssueInstant(java.lang.String sVal)
Sets the issueInstant attribute


getXmlID

public java.lang.String getXmlID()
Returns the id attribute


setXmlID

public void setXmlID(java.lang.String sVal)
Sets the id attribute


genXmlID

public void genXmlID()
Sets the id attribute with a newly generated id


setDOM

public void setDOM(org.w3c.dom.Element oElem)
This method will import from DOM, and hold on to it, as retrievable by getDOM. The fromDOM method, on the otherhand, will not keep a copy of the DOM.


reset

public void reset()
Resets the internal state of this object


fromDOM

public void fromDOM(org.w3c.dom.Element oElem)
This method populates the object from DOM. It does not keep a copy of the DOM around. Whitespace information is lost in this process.


getDOM

public org.w3c.dom.Element getDOM()
This method returns DOM stored with this object. It may be cached and there is no guarantee as to which document it was created from


isValid

public boolean isValid()
Returns true of the assertion is valid. Checks validity period in conditions and required fields and attributes


getAttributeStatement

public AttributeStatement getAttributeStatement()
Returns the first attribute statement in the assertion


toDOM

public org.w3c.dom.Element toDOM(org.w3c.dom.Document oDoc)
This method will make DOM using the specified document. If any DOM state has been stored with the object, it will not be used in this method. This method generates a reference-free copy of new DOM.

Parameters:
oDoc - - The document to use for generating DOM

getSubject

public Subject getSubject()
Returns the subject of this assertion


toString

public java.lang.String toString()
Returns formatted object. Do not use if signature needs to be preserved.

Overrides:
toString in class java.lang.Object

dump

public java.lang.String dump()
Returns object as a formatted XML string.

Parameters:
sTab - - The characters to prepend before each new line

getIssuer

public NameID getIssuer()
Returns the issuer element of the assertion


setIssuer

public void setIssuer(NameID oIssuer)
Sets the issuer element of the assertion


getConditions

public Conditions getConditions()
Returns the conditions element of the assertion


setConditions

public void setConditions(Conditions oVal)
Sets the conditions element of the assertion


setAttrStatement

public void setAttrStatement(AttributeStatement oVal)
Sets the attribute statement element of the assertion. Only one attribute statement is supported per assertion.


setSubject

public void setSubject(Subject oVal)
Sets the subject element of the assertion



Copyright © 2005-2012. All Rights Reserved.