Package org.opensaml.saml.saml1.core.impl

# Class AssertionImpl

java.lang.Object
org.opensaml.core.xml.AbstractXMLObject
org.opensaml.xmlsec.signature.AbstractSignableXMLObject
org.opensaml.saml.common.AbstractSignableSAMLObject
org.opensaml.saml.saml1.core.impl.AssertionImpl

All Implemented Interfaces:
  `XMLObject`, `SAMLObject`, `SignableSAMLObject`, `Assertion`, `Evidentiary`, `SignableXMLObject`

public class AssertionImpl extends AbstractSignableSAMLObject implements Assertion
This class implements the SAML 1 `Assertion` statement.

## Field Summary

Fields
Modifier and Type
Field
Description
`private Advice`
`advice`
(Possibly null) Singleton object version of the `Advice` element.
`private Conditions`
`conditions`
(Possibly null) Singleton object version of the `Conditions` element.
`private String`
`id`
The `AssertionID` attrribute.
`private Instant`
`issueInstant`
Object version of the `IssueInstant` attribute.
`private String`
`issuer`
Object version of the `Issuer` attribute.
`private final IndexedXMLObjectChildrenList<Statement>`
`statements`
Object representation of all the `Statement` elements.
`private SAMLVersion`
`version`
SAML version of this assertion.

### Fields inherited from interface org.opensaml.saml.saml1.core.Assertion

`ASSERTIONID_ATTRIB_NAME, DEFAULT_ELEMENT_LOCAL_NAME, DEFAULT_ELEMENT_NAME, ID_ATTRIB_NAME, ISSUEINSTANT_ATTRIB_NAME, ISSUEINSTANT_ATTRIB_QNAME, ISSUER_ATTRIB_NAME, MAJORVERSION_ATTRIB_NAME, MINORVERSION_ATTRIB_NAME, TYPE_LOCAL_NAME, TYPE_NAME`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`AssertionImpl(String namespaceURI, String elementLocalName, String namespacePrefix)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`Advice`
`getAdvice()`
advice is a (singleton) Object, representing the `Advice` sub element.
`List<AttributeStatement>`
`getAttributeStatements()`
Return all the `AttributeStatement` elements.
`List<AuthenticationStatement>`
`getAuthenticationStatements()`
Return the List representing all the `AuthenticationStatement` sub elements.
`List<AuthorizationDecisionStatement>`
`getAuthorizationDecisionStatements()`
Return the List representing all the `AuthorizationStatement` sub elements.
`Conditions`
`getConditions()`
Return the (singleton) Object, representing the `Conditions` sub element.
`String`
`getID()`
Set the ID.
`Instant`
`getIssueInstant()`
Get the IssueInstant (attribute).
`String`
`getIssuer()`
Get the Issuer (which is an attribute) .
`Integer`
`getMajorVersion()`
Get the MajorVersion attribute.
`Integer`
`getMinorVersion()`
Get the MinorVersion attribute.
`List<XMLObject>`
`getOrderedChildren()`
Gets an unmodifiable list of child elements in the order that they will appear in the DOM.
`String`
`getSignatureReferenceID()`
Gets the value of the ID attribute for this SAML object which will be used as its signature reference.
`List<Statement>`
`getStatements()`
Return the List representing all the `Statement` sub elements.
`List<Statement>`
`getStatements(QName typeOrName)`
Return the List representing all the `Statement` sub elements with a given schema type or element name.
`List<SubjectStatement>`
`getSubjectStatements()`
Return the List representing all the `SubjectStatement` sub elements.
`SAMLVersion`
`getVersion()`
Gets the SAML version for this message.
`void`
`setAdvice(Advice adv)`
Set the Object representing the `Advice` sub element.
`void`
`setConditions(Conditions c)`
Set the Object representing the `Conditions` Sub element.
`void`
`setID(String newID)`
Get the ID.
`void`
`setIssueInstant(Instant instant)`
Set the IssueInstance (attribute).
`void`
`setIssuer(String iss)`
Set the Issuer (attribute).
`void`
`setVersion(SAMLVersion newVersion)`
Set the SAML version of this assertion.

### Methods inherited from class org.opensaml.saml.common.AbstractSignableSAMLObject

`equals, hashCode, setSignature`

### Methods inherited from class org.opensaml.xmlsec.signature.AbstractSignableXMLObject

`getSignature, isSigned`

### Methods inherited from class org.opensaml.core.xml.AbstractXMLObject

`detach, ensureDOM, getDOM, getElementQName, getIDIndex, getNamespaceManager, getNamespaces, getNoNamespaceSchemaLocation, getObjectMetadata, getParent, getSchemaLocation, getSchemaType, hasChildren, hasParent, isNil, isNilXSBoolean, manageQualifiedAttributeNamespace, prepareAttributeValueForAssignment, prepareElementContentForAssignment, prepareForAssignment, prepareForAssignment, prepareForAssignment, registerOwnID, releaseChildrenDOM, releaseDOM, releaseParentDOM, releaseThisAndChildrenDOM, releaseThisandParentDOM, resolveID, resolveIDFromRoot, setDOM, setElementNamespacePrefix, setElementQName, setNil, setNil, setNoNamespaceSchemaLocation, setParent, setSchemaLocation, setSchemaType`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.opensaml.xmlsec.signature.SignableXMLObject

`getSignature, isSigned, setSignature`

### Methods inherited from interface org.opensaml.core.xml.XMLObject

`detach, ensureDOM, getDOM, getElementQName, getIDIndex, getNamespaceManager, getNamespaces, getNoNamespaceSchemaLocation, getObjectMetadata, getParent, getSchemaLocation, getSchemaType, hasChildren, hasParent, isNil, isNilXSBoolean, releaseChildrenDOM, releaseDOM, releaseParentDOM, resolveID, resolveIDFromRoot, setDOM, setNil, setNil, setNoNamespaceSchemaLocation, setParent, setSchemaLocation`

## Field Details

### id

@Nullable private String id
The `AssertionID` attrribute.

### version

@Nullable private SAMLVersion version
SAML version of this assertion.

### issuer

@Nullable private String issuer
Object version of the `Issuer` attribute.

### issueInstant

@Nullable private Instant issueInstant
Object version of the `IssueInstant` attribute.

### conditions

@Nullable private Conditions conditions
(Possibly null) Singleton object version of the `Conditions` element.

### advice

@Nullable private Advice advice
(Possibly null) Singleton object version of the `Advice` element.

### statements

@Nonnull private final IndexedXMLObjectChildrenList<Statement> statements
Object representation of all the `Statement` elements.

## Constructor Details

### AssertionImpl

protected AssertionImpl(@Nullable String namespaceURI, @Nonnull String elementLocalName, @Nullable String namespacePrefix)
Constructor.

Parameters:
  `namespaceURI` - the namespace the element is in
  `elementLocalName` - the local name of the XML element this Object represents
  `namespacePrefix` - the prefix for the given namespace

## Method Details

### getMajorVersion

@Nullable public Integer getMajorVersion()
Get the MajorVersion attribute.

Deprecated, use `Assertion.getVersion()`.

Specified by:
  `getMajorVersion` in interface `Assertion`
Returns:
  the stored MajorVersion

### getMinorVersion

@Nullable public Integer getMinorVersion()
Get the MinorVersion attribute.

Deprecated, use `Assertion.getVersion()`.

Specified by:
  `getMinorVersion` in interface `Assertion`
Returns:
  the stored MinorVersion

### getVersion

@Nullable public SAMLVersion getVersion()
Gets the SAML version for this message.

Specified by:
  `getVersion` in interface `Assertion`
Returns:
  SAML version for this message

### setVersion

public void setVersion(@Nullable SAMLVersion newVersion)
Set the SAML version of this assertion.

Specified by:
  `setVersion` in interface `Assertion`
Parameters:
  `newVersion` - the SAML version of this assertion

### getID

@Nullable public String getID()
Set the ID.

Specified by:
  `getID` in interface `Assertion`
Returns:
  the ID

### setID

public void setID(@Nullable String newID)
Get the ID.

Specified by:
  `setID` in interface `Assertion`
Parameters:
  `newID` - what to set

### getIssuer

@Nullable public String getIssuer()
Get the Issuer (which is an attribute) .

Specified by:
  `getIssuer` in interface `Assertion`
Returns:
  the Issuer

### setIssuer

public void setIssuer(@Nullable String iss)
Set the Issuer (attribute).

Specified by:
  `setIssuer` in interface `Assertion`
Parameters:
  `iss` - the value to set

### getIssueInstant

@Nullable public Instant getIssueInstant()
Get the IssueInstant (attribute).

Specified by:
  `getIssueInstant` in interface `Assertion`
Returns:
  the Issue Instant (as a Date)

### setIssueInstant

public void setIssueInstant(@Nullable Instant instant)
Set the IssueInstance (attribute).

Specified by:
  `setIssueInstant` in interface `Assertion`
Parameters:
  `instant` - the issue instant value to set

### getConditions

@Nullable public Conditions getConditions()
Return the (singleton) Object, representing the `Conditions` sub element.

Specified by:
  `getConditions` in interface `Assertion`
Returns:
  the Conditions object.

### setConditions

public void setConditions(@Nullable Conditions c)
Set the Object representing the `Conditions` Sub element.

Specified by:
  `setConditions` in interface `Assertion`
Parameters:
  `c` - the condition to List

### getAdvice

@Nullable public Advice getAdvice()
advice is a (singleton) Object, representing the `Advice` sub element.

Specified by:
  `getAdvice` in interface `Assertion`
Returns:
  the advice object in this assertion

### setAdvice

public void setAdvice(@Nullable Advice adv)
Set the Object representing the `Advice` sub element.

Specified by:
  `setAdvice` in interface `Assertion`
Parameters:
  `adv` - the object to set

### getStatements

@Nonnull @Live public List<Statement> getStatements()
Return the List representing all the `Statement` sub elements.

Specified by:
  `getStatements` in interface `Assertion`
Returns:
  the List representing all the statements

### getStatements

@Nonnull @Live public List<Statement> getStatements(@Nonnull QName typeOrName)
Return the List representing all the `Statement` sub elements with a given schema type or element name.

Specified by:
  `getStatements` in interface `Assertion`
Parameters:
  `typeOrName` - the schema type or element name
Returns:
  the List representing all the statements

### getSubjectStatements

@Nonnull @Live public List<SubjectStatement> getSubjectStatements()
Return the List representing all the `SubjectStatement` sub elements.

Specified by:
  `getSubjectStatements` in interface `Assertion`
Returns:
  all the SubjectStatements

### getAuthenticationStatements

@Nonnull @Live public List<AuthenticationStatement> getAuthenticationStatements()
Return the List representing all the `AuthenticationStatement` sub elements.

Specified by:
  `getAuthenticationStatements` in interface `Assertion`
Returns:
  all the AuthenticationStatements

### getAttributeStatements

@Nonnull @Live public List<AttributeStatement> getAttributeStatements()
Return all the `AttributeStatement` elements.

Specified by:
  `getAttributeStatements` in interface `Assertion`
Returns:
  all the attributeStatements

### getAuthorizationDecisionStatements

@Nonnull @Live public List<AuthorizationDecisionStatement> getAuthorizationDecisionStatements()
Return the List representing all the `AuthorizationStatement` sub elements.

Specified by:
  `getAuthorizationDecisionStatements` in interface `Assertion`
Returns:
  all the authorizationDecisionStatements.

### getSignatureReferenceID

@Nullable public String getSignatureReferenceID()
Gets the value of the ID attribute for this SAML object which will be used as its signature reference.

Specified by:
  `getSignatureReferenceID` in interface `SignableSAMLObject`
Returns:
  the value of this SAMLObject ID attribute

### getOrderedChildren

@Nullable @NotLive @Unmodifiable public List<XMLObject> getOrderedChildren()
Gets an unmodifiable list of child elements in the order that they will appear in the DOM.

Specified by:
  `getOrderedChildren` in interface `XMLObject`
Returns:
  ordered list of child elements