com.sun.identity.saml.assertion
Class Assertion

java.lang.Object
  extended bycom.sun.identity.saml.assertion.AssertionBase
      extended bycom.sun.identity.saml.assertion.Assertion
Direct Known Subclasses:
SecurityAssertion

public class Assertion
extends com.sun.identity.saml.assertion.AssertionBase

This object stands for Assertion element.An Assertion is a package of information that supplies one or more Statement made by an issuer. There are three kinds of assertionsL Authentication, Authorization Decision and Attribute assertion.


Constructor Summary
Assertion(org.w3c.dom.Element assertionElement)
          This constructor is used to build Assertion object from a block of existing XML that has already been built into a DOM.
Assertion(java.lang.String assertionID, java.lang.String issuer, java.util.Date issueInstant, Conditions conditions, Advice advice, java.util.Set statements)
          This constructor is used to populate the data members: the ssertionID, the issuer, time when assertion issued, the conditions when creating a new assertion , Advice applicable to this Assertion and a set of Statement(s) in the assertion.
Assertion(java.lang.String assertionID, java.lang.String issuer, java.util.Date issueInstant, Conditions conditions, java.util.Set statements)
          This constructor is used to populate the data members: the assertionID, the issuer, time when assertion issued, the conditions when creating a new assertion and a set of Statement(s) in the assertion.
Assertion(java.lang.String assertionID, java.lang.String issuer, java.util.Date issueInstant, java.util.Set statements)
          This constructor is used to populate the data members: assertionID, the issuer, time when assertion issued and a set of Statement(s) in the assertion.
 
Method Summary
 Advice getAdvice()
          Returns the advice of an assertion.
 boolean isSignatureValid()
          Return whether the signature on the object is valid or not.
 void signXML()
          Sign the Assertion.
 void signXML(java.lang.String certAlias)
          Signs the Assertion.
 
Methods inherited from class com.sun.identity.saml.assertion.AssertionBase
addStatement, getAssertionID, getConditions, getIssueInstant, getIssuer, getMajorVersion, getMinorVersion, getSignature, getStatement, isSigned, isTimeValid, setAdvice, setConditions, setMajorVersion, setMinorVersion, setSignature, toString, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Assertion

public Assertion(org.w3c.dom.Element assertionElement)
          throws SAMLException
This constructor is used to build Assertion object from a block of existing XML that has already been built into a DOM.

Parameters:
assertionElement - A org.w3c.dom.Element representing DOM tree for Assertion 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.

Assertion

public Assertion(java.lang.String assertionID,
                 java.lang.String issuer,
                 java.util.Date issueInstant,
                 java.util.Set statements)
          throws SAMLException
This constructor is used to populate the data members: assertionID, the issuer, time when assertion issued and a set of Statement(s) in the assertion.

Parameters:
assertionID - assertionID attribute contained within this Assertion if null, an assertionID is generated internally.
issuer - The issuer of this assertion.
issueInstant - time instant of the issue. It has type dateTime which is built in to the W3C XML Schema Types specification.if null, current time is used.
statements - set of Statement objects within this Assertion. It could be of type AuthenticationStatement, AuthorizationDecisionStatement and AttributeStatement. Each Assertion can have multiple type of statements in it.
Throws:
SAMLException - if there is an error in processing input.

Assertion

public Assertion(java.lang.String assertionID,
                 java.lang.String issuer,
                 java.util.Date issueInstant,
                 Conditions conditions,
                 java.util.Set statements)
          throws SAMLException
This constructor is used to populate the data members: the assertionID, the issuer, time when assertion issued, the conditions when creating a new assertion and a set of Statement(s) in the assertion.

Parameters:
assertionID - AssertionID contained within this Assertion if null its generated internally.
issuer - The issuer of this assertion.
issueInstant - time instant of the issue. It has type dateTime which is built in to the W3C XML Schema Types specification. if null, current time is used.
conditions - Conditions under which the this Assertion is valid.
statements - Set of Statement objects within this Assertion. It could be of type AuthenticationStatement, AuthorizationDecisionStatement and AttributeStatement. Each Assertion can have multiple type of statements in it.
Throws:
SAMLException - if there is an error in processing input.

Assertion

public Assertion(java.lang.String assertionID,
                 java.lang.String issuer,
                 java.util.Date issueInstant,
                 Conditions conditions,
                 Advice advice,
                 java.util.Set statements)
          throws SAMLException
This constructor is used to populate the data members: the ssertionID, the issuer, time when assertion issued, the conditions when creating a new assertion , Advice applicable to this Assertion and a set of Statement(s) in the assertion.

Parameters:
assertionID - AssertionID object contained within this Assertion if null its generated internally.
issuer - The issuer of this assertion.
issueInstant - Time instant of the issue. It has type dateTime which is built in to the W3C XML Schema Types specification. if null, current time is used.
conditions - Conditions under which the this Assertion is valid.
advice - Advice applicable for this Assertion.
statements - Set of Statement objects within this Assertion. It could be of type AuthenticationStatement, AuthorizationDecisionStatement and AttributeStatement. Each Assertion can have multiple type of statements in it.
Throws:
SAMLException - if there is an error in processing input.
Method Detail

isSignatureValid

public boolean isSignatureValid()
Return whether the signature on the object is valid or not.

Returns:
true if the signature on the object is valid; false otherwise.

signXML

public void signXML()
             throws SAMLException
Sign the Assertion.

Throws:
SAMLException - If it could not sign the Assertion.

signXML

public void signXML(java.lang.String certAlias)
             throws SAMLException
Signs the Assertion.

Parameters:
certAlias - certification Alias used to sign Assertion.
Throws:
SAMLException - if it could not sign the Assertion.

getAdvice

public Advice getAdvice()
Returns the advice of an assertion.

Returns:
Advice object containing advice information of the assertion.


Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.