|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.identity.saml.assertion.Assertion
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 | |
boolean |
addStatement(Statement statement)
Add a statement to this Assertion |
Advice |
getAdvice()
Returns the advice of an assertion. |
java.lang.String |
getAssertionID()
Returns the assertion ID. |
Conditions |
getConditions()
Returns the conditions of an assertion. |
java.util.Date |
getIssueInstant()
Returns the time when the assertion was issued. |
java.lang.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. |
org.w3c.dom.Element |
getSignature()
Get the Signature element of the Assertion. |
java.util.Set |
getStatement()
Returns a set of Statement contained within this assertion. |
boolean |
isSignatureValid()
Return whether the signature on the object is valid or not. |
boolean |
isSigned()
Return whether the object is signed or not. |
boolean |
isTimeValid()
Gets the validity of the assertion evaluating its conditions if specified. |
boolean |
setAdvice(Advice advice)
Set the advice for an assertion |
boolean |
setConditions(Conditions conditions)
Set the Conditions information 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(org.w3c.dom.Element elem)
Set the signature for the Request |
void |
signXML()
Sign the Assertion. |
void |
signXML(java.lang.String certAlias)
Signs the Assertion. |
java.lang.String |
toString()
Returns a String representation of the element. |
java.lang.String |
toString(boolean includeNS,
boolean declareNS)
Returns a String representation of the <Assertion>
element. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Assertion(org.w3c.dom.Element assertionElement) throws SAMLException
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
objectSAMLException
- if it could not process the Element properly,
implying that there is an error in the sender or in the
element definition.public Assertion(java.lang.String assertionID, java.lang.String issuer, java.util.Date issueInstant, java.util.Set statements) throws SAMLException
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.public Assertion(java.lang.String assertionID, java.lang.String issuer, java.util.Date issueInstant, Conditions conditions, java.util.Set statements) throws SAMLException
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.public Assertion(java.lang.String assertionID, java.lang.String issuer, java.util.Date issueInstant, Conditions conditions, Advice advice, java.util.Set statements) throws SAMLException
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.Method Detail |
public boolean isSigned()
public boolean isSignatureValid()
public void signXML() throws SAMLException
SAMLException
- If it could not sign the Assertion.public void signXML(java.lang.String certAlias) throws SAMLException
certAlias
- certification Alias used to sign Assertion.SAMLException
- if it could not sign the Assertion.public org.w3c.dom.Element getSignature()
public boolean setSignature(org.w3c.dom.Element elem)
elem
- ds:Signature elementpublic boolean isTimeValid()
NotBefore
(current time inclusive) and
NotOnOrAfter
(current time exclusive) values
and true otherwise or if no conditions specified.public boolean addStatement(Statement statement)
Assertion
statement
- Statement
to be addedpublic boolean setAdvice(Advice advice)
advice
- : a linked list representing the advice informationpublic boolean setConditions(Conditions conditions)
conditions
- a linked list representing the conditions informationpublic int getMinorVersion()
public void setMinorVersion(int minorVersion)
minorVersion
- minor version.public int getMajorVersion()
public void setMajorVersion(int majorVersion)
majorVersion
- major version.public java.util.Date getIssueInstant()
java.util.Date
format.public java.lang.String getIssuer()
public java.lang.String getAssertionID()
public Conditions getConditions()
Conditions
object containing conditions for an
assertion being valid.public Advice getAdvice()
Advice
object containing advice information of the
assertion.public java.util.Set getStatement()
Statement
contained within this assertion.Statement
contained within this assertion.public java.lang.String toString()
toString
in class java.lang.Object
<saml:Assertion>
.public java.lang.String toString(boolean includeNS, boolean declareNS)
<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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |