com.sun.identity.saml.assertion
クラス AssertionBase

java.lang.Object
  上位を拡張 com.sun.identity.saml.assertion.AssertionBase
直系の既知のサブクラス:
Assertion

public abstract class AssertionBase
extends Object

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, AuthorizationDecision and Attribute assertion. This class is an abstract base class for all Assertion implementations and encapsulates common functionality.


フィールドの概要
protected  AdviceBase _advice
          The Advice element specifies additional information related to the assertion that may assist processing in certain situations but which can be ignored by applications that do not support its use.
protected  AssertionIDReference _assertionID
          The _assertionID attribute specifies the assertion identifier.
protected  Conditions _conditions
          The Conditions element specifies conditions that affect the validity of the asserted statement.
protected  Date _issueInstant
          The IssueInstant attribute specifies the time instant of issue in Universal Coordinated Time.
protected  String _issuer
          The Issuer attribute specifies the issuer of the assertion by means of a string.
protected  int _majorVersion
          This value specifies the SAML major version.
protected  int _minorVersion
          This value specifies the SAML minor version.
protected  Set _statements
          The statements variable is a HashSet of all the stataments in this assertion in the defined sequence
protected static String ASSERTION_ID_ATTRIBUTE
           
protected static SAMLConstants sc
           
protected  Element signature
           
protected  String signatureString
           
protected  boolean signed
           
protected  boolean valid
           
protected  boolean validationDone
           
protected  String xmlString
           
 
コンストラクタの概要
protected AssertionBase()
          Default constructor, declaring protected to enable extensibility
  AssertionBase(Element assertionElement)
          Contructor This constructor is used to build Assertion object from a block of existing XML that has already been built into a DOM.
  AssertionBase(String assertionID, String issuer, Date issueInstant, Conditions conditions, AdviceBase advice, 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.
  AssertionBase(String assertionID, String issuer, Date issueInstant, Conditions conditions, 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.
  AssertionBase(String assertionID, String issuer, Date issueInstant, Set statements)
          Contructor 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.
 
メソッドの概要
 boolean addStatement(Statement statement)
          Adds a statement to this Assertion
protected abstract  AdviceBase createAdvice(Element adviceElement)
          Creates appropriate Advice instance
protected abstract  AssertionIDReference createAssertionIDReference(Element assertionIDRefElement)
          Creates appropriate AssertionIDReference instance
protected abstract  AssertionIDReference createAssertionIDReference(String assertionID)
          Creates appropriate AssertionIDReference instance
protected abstract  AttributeStatement createAttributeStatement(Element attributeElement)
          Creates appropriate AttributeStatement instance
protected abstract  AuthenticationStatement createAuthenticationStatement(Element authenticationElement)
          Creates appropriate AuthenticationStatement instance
protected abstract  AuthorizationDecisionStatementBase createAuthorizationDecisionStatement(Element authDecisionElement)
          Create appropriate AuthorizationDecisionStatement instance
protected abstract  Conditions createConditions(Element conditionsElement)
          Creates appropriate Conditions instance
 String getAssertionID()
          Returns the assertion ID.
 Conditions getConditions()
          Returns the conditions of an assertion.
 Date getIssueInstant()
          Returns the time when the assertion was issued.
 String getIssuer()
          Returns the issuer of an assertion.
 int getMajorVersion()
          Returns the major version number of an assertion.
 int getMinorVersion()
          Returns the minor version number of an assertion.
 Element getSignature()
          Gets the Signature element of the Assertion.
 Set getStatement()
          Returns a set of Statement contained within this assertion.
 boolean isSignatureValid()
          Returns whether the signature on the object is valid or not.
 boolean isSigned()
          Returns whether the object is signed or not.
 boolean isTimeValid()
          Gets the validity of the assertion evaluating its conditions if specified.
 boolean setAdvice(AdviceBase advice)
          Sets the advice for an assertion
protected  boolean setAssertionID(String assertionID)
          Set the AssertionID for this assertion
 boolean setConditions(Conditions conditions)
          Sets the Conditions information for an assertion
protected  boolean setIssueInstant(Date issueInstant)
          Set the time when the assertion was issued
protected  boolean setIssuer(String issuer)
          Sets the issuer for an assertion
 void setMajorVersion(int majorVersion)
          Sets the major version number of an assertion.
 void setMinorVersion(int minorVersion)
          Sets the minor version number of an assertion.
 boolean setSignature(Element elem)
          Sets the signature for the Request
 void signXML()
          Signs the Assertion.
 void signXML(String certAlias)
          Signs the Assertion.
 String toString()
          Returns a String representation of the element.
 String toString(boolean includeNS, boolean declareNS)
          Returns a String representation of the <Assertion> element.
 

フィールドの詳細

sc

protected static SAMLConstants sc

_statements

protected Set _statements
The statements variable is a HashSet of all the stataments in this assertion in the defined sequence


_majorVersion

protected int _majorVersion
This value specifies the SAML major version. Each assertion MUST specify the SAML major version identifier.The identifier for this version of SAML is 1.


_minorVersion

protected int _minorVersion
This value specifies the SAML minor version. Each assertion MUST specify the SAML minor version identifier. The identifier for this version of SAML is 0.


_assertionID

protected AssertionIDReference _assertionID
The _assertionID attribute specifies the assertion identifier.


_issuer

protected String _issuer
The Issuer attribute specifies the issuer of the assertion by means of a string.


_issueInstant

protected Date _issueInstant
The IssueInstant attribute specifies the time instant of issue in Universal Coordinated Time.


_conditions

protected Conditions _conditions
The Conditions element specifies conditions that affect the validity of the asserted statement.


_advice

protected AdviceBase _advice
The Advice element specifies additional information related to the assertion that may assist processing in certain situations but which can be ignored by applications that do not support its use.


xmlString

protected String xmlString

signatureString

protected String signatureString

signature

protected Element signature

signed

protected boolean signed

valid

protected boolean valid

validationDone

protected boolean validationDone

ASSERTION_ID_ATTRIBUTE

protected static final String ASSERTION_ID_ATTRIBUTE
関連項目:
定数フィールド値
コンストラクタの詳細

AssertionBase

protected AssertionBase()
Default constructor, declaring protected to enable extensibility


AssertionBase

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

パラメータ:
assertionElement - A org.w3c.dom.Element representing DOM tree for Assertion object
例外:
SAMLException - if it could not process the Element properly, implying that there is an error in the sender or in the element definition.

AssertionBase

public AssertionBase(String assertionID,
                     String issuer,
                     Date issueInstant,
                     Set statements)
              throws SAMLException
Contructor 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.

パラメータ:
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.
例外:
SAMLException - if there is an error in processing input.

AssertionBase

public AssertionBase(String assertionID,
                     String issuer,
                     Date issueInstant,
                     Conditions conditions,
                     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.

パラメータ:
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.
例外:
SAMLException - if there is an error in processing input.

AssertionBase

public AssertionBase(String assertionID,
                     String issuer,
                     Date issueInstant,
                     Conditions conditions,
                     AdviceBase advice,
                     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.

パラメータ:
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.
例外:
SAMLException - if there is an error in processing input.
メソッドの詳細

isSigned

public boolean isSigned()
Returns whether the object is signed or not.

戻り値:
true if the object is signed; false otherwise.

isSignatureValid

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

戻り値:
true if the signature on the object is valid; false otherwise.

signXML

public void signXML()
             throws SAMLException
Signs the Assertion.

例外:
SAMLException - If it could not sign the Assertion.

signXML

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

パラメータ:
certAlias - certification Alias used to sign Assertion.
例外:
SAMLException - if it could not sign the Assertion.

getSignature

public Element getSignature()
Gets the Signature element of the Assertion.

戻り値:
Element the Signature of the Assertion in DOM element.

setSignature

public boolean setSignature(Element elem)
Sets the signature for the Request

パラメータ:
elem - ds:Signature element
戻り値:
A boolean value: true if the operation succeeds; false otherwise.

createAdvice

protected abstract AdviceBase createAdvice(Element adviceElement)
                                    throws SAMLException
Creates appropriate Advice instance

パラメータ:
adviceElement - the Advice Element
戻り値:
the Advice instance
例外:
SAMLException

createAuthorizationDecisionStatement

protected abstract AuthorizationDecisionStatementBase createAuthorizationDecisionStatement(Element authDecisionElement)
                                                                                    throws SAMLException
Create appropriate AuthorizationDecisionStatement instance

パラメータ:
authDecisionElement - the AuthorizationDecisionStatement Element
戻り値:
AuthorizationDecisionStatement instance
例外:
SAMLException

createAuthenticationStatement

protected abstract AuthenticationStatement createAuthenticationStatement(Element authenticationElement)
                                                                  throws SAMLException
Creates appropriate AuthenticationStatement instance

パラメータ:
authenticationElement - the AuthenticationStatement Element
戻り値:
AuthenticationStatement instance
例外:
SAMLException

createAttributeStatement

protected abstract AttributeStatement createAttributeStatement(Element attributeElement)
                                                        throws SAMLException
Creates appropriate AttributeStatement instance

パラメータ:
attributeElement - the AttributeStatement Element
戻り値:
AttributeStatement instance
例外:
SAMLException

createAssertionIDReference

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

パラメータ:
assertionIDRefElement - the AssertionIDReference Element
戻り値:
AssertionIDReference instance
例外:
SAMLException

createAssertionIDReference

protected abstract AssertionIDReference createAssertionIDReference(String assertionID)
                                                            throws SAMLException
Creates appropriate AssertionIDReference instance

パラメータ:
assertionID - the AssertionID String
戻り値:
AssertionIDReference instance
例外:
SAMLException

createConditions

protected abstract Conditions createConditions(Element conditionsElement)
                                        throws SAMLException
Creates appropriate Conditions instance

パラメータ:
conditionsElement - the Conditions Element
戻り値:
Conditions instance
例外:
SAMLException

isTimeValid

public boolean isTimeValid()
Gets the validity of the assertion evaluating its conditions if specified.

戻り値:
false if conditions is invalid based on it lying between NotBefore (current time inclusive) and NotOnOrAfter (current time exclusive) values and true otherwise or if no conditions specified.

addStatement

public boolean addStatement(Statement statement)
Adds a statement to this Assertion

パラメータ:
statement - Statement to be added
戻り値:
boolean indicating success or failure of operation.

setIssueInstant

protected boolean setIssueInstant(Date issueInstant)
Set the time when the assertion was issued

パラメータ:
issueInstant - : java.util.Date representing the time of the assertion
戻り値:
A boolean indicating the success of the operation.

setAssertionID

protected boolean setAssertionID(String assertionID)
Set the AssertionID for this assertion

パラメータ:
assertionID - : a String representing id of this assertion.
戻り値:
A boolean indicating the success of the operation.

setIssuer

protected boolean setIssuer(String issuer)
Sets the issuer for an assertion

パラメータ:
issuer - : a string representing the issuer of the assertion
戻り値:
A boolean indicating the success of the operation.

setAdvice

public boolean setAdvice(AdviceBase advice)
Sets the advice for an assertion

パラメータ:
advice - : a linked list representing the advice information
戻り値:
A boolean indicating the success of the operation.

setConditions

public boolean setConditions(Conditions conditions)
Sets the Conditions information for an assertion

パラメータ:
conditions - a linked list representing the conditions information
戻り値:
A boolean indicating the success of the operation.

getMinorVersion

public int getMinorVersion()
Returns the minor version number of an assertion.

戻り値:
The minor version number of an assertion.

setMinorVersion

public void setMinorVersion(int minorVersion)
Sets the minor version number of an assertion.

パラメータ:
minorVersion - minor version.

getMajorVersion

public int getMajorVersion()
Returns the major version number of an assertion.

戻り値:
The major version number of an assertion.

setMajorVersion

public void setMajorVersion(int majorVersion)
Sets the major version number of an assertion.

パラメータ:
majorVersion - major version.

getIssueInstant

public Date getIssueInstant()
Returns the time when the assertion was issued.

戻り値:
The time in java.util.Date format.

getIssuer

public String getIssuer()
Returns the issuer of an assertion.

戻り値:
The issuer of an assertion.

getAssertionID

public String getAssertionID()
Returns the assertion ID.

戻り値:
Assertion ID of the assertion.

getConditions

public Conditions getConditions()
Returns the conditions of an assertion.

戻り値:
Conditions object containing conditions for an assertion being valid.

getStatement

public Set getStatement()
Returns a set of Statement contained within this assertion.

戻り値:
a set of Statement contained within this assertion.

toString

public String toString()
Returns a String representation of the element.

オーバーライド:
クラス Object 内の toString
戻り値:
A string containing the valid XML for this element By default name space name is prepended to the element name example <saml:Assertion>.

toString

public String toString(boolean includeNS,
                       boolean declareNS)
Returns a String representation of the <Assertion> element.

パラメータ:
includeNS - if true prepends all elements by their Namespace name example <saml:Assertion>
declareNS - if true includes the namespace within the generated XML.
戻り値:
The valid XML for this element