Package org.opensaml.saml.saml2.core.impl

# Class ConditionsImpl

java.lang.Object
org.opensaml.core.xml.AbstractXMLObject
org.opensaml.saml.saml2.core.impl.ConditionsImpl

All Implemented Interfaces:
  `XMLObject`, `SAMLObject`, `Conditions`

public class ConditionsImpl extends AbstractXMLObject implements Conditions
Concrete implementation of `Conditions`.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final IndexedXMLObjectChildrenList<Condition>`
`conditions`
A Condition.
`private Instant`
`notBefore`
Not Before conditions.
`private Instant`
`notOnOrAfter`
Not On Or After conditions.

### Fields inherited from interface org.opensaml.saml.saml2.core.Conditions

`DEFAULT_ELEMENT_LOCAL_NAME, DEFAULT_ELEMENT_NAME, NOT_BEFORE_ATTRIB_NAME, NOT_BEFORE_ATTRIB_QNAME, NOT_ON_OR_AFTER_ATTRIB_NAME, NOT_ON_OR_AFTER_ATTRIB_QNAME, TYPE_LOCAL_NAME, TYPE_NAME`

## Constructor Summary

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

## Method Summary

Modifier and Type
Method
Description
`List<AudienceRestriction>`
`getAudienceRestrictions()`
Gets the audience restriction conditions for the assertion.
`List<Condition>`
`getConditions()`
Gets all the conditions on the assertion.
`List<Condition>`
`getConditions(QName typeOrName)`
Gets the list of conditions that match a particular QName.
`Instant`
`getNotBefore()`
Get the date/time before which the assertion is invalid.
`Instant`
`getNotOnOrAfter()`
Gets the date/time on, or after, which the assertion is invalid.
`OneTimeUse`
`getOneTimeUse()`
Gets the OneTimeUse condition for the assertion.
`List<XMLObject>`
`getOrderedChildren()`
Gets an unmodifiable list of child elements in the order that they will appear in the DOM.
`ProxyRestriction`
`getProxyRestriction()`
Gets the ProxyRestriction condition for the assertion.
`void`
`setNotBefore(Instant newNotBefore)`
Sets the date/time before which the assertion is invalid.
`void`
`setNotOnOrAfter(Instant newNotOnOrAfter)`
Sets the date/time on, or after, which the assertion is invalid.

### 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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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

### conditions

@Nonnull private final IndexedXMLObjectChildrenList<Condition> conditions
A Condition.

### notBefore

@Nullable private Instant notBefore
Not Before conditions.

### notOnOrAfter

@Nullable private Instant notOnOrAfter
Not On Or After conditions.

## Constructor Details

### ConditionsImpl

protected ConditionsImpl(@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

### getConditions

@Nonnull @Live public List<Condition> getConditions()
Gets all the conditions on the assertion.

Specified by:
  `getConditions` in interface `Conditions`
Returns:
  all the conditions on the assertion

### getConditions

@Nonnull @Live public List<Condition> getConditions(@Nonnull QName typeOrName)
Gets the list of conditions that match a particular QName.

Specified by:
  `getConditions` in interface `Conditions`
Parameters:
  `typeOrName` - the QName of the conditions to return
Returns:
  the list of conditions that match the specified QName

### getAudienceRestrictions

@Nonnull @Live public List<AudienceRestriction> getAudienceRestrictions()
Gets the audience restriction conditions for the assertion.

Specified by:
  `getAudienceRestrictions` in interface `Conditions`
Returns:
  the audience restriction conditions for the assertion

### getOneTimeUse

@Nullable public OneTimeUse getOneTimeUse()
Gets the OneTimeUse condition for the assertion.

Specified by:
  `getOneTimeUse` in interface `Conditions`
Returns:
  the OneTimeUse condition for the assertion

### getProxyRestriction

@Nullable public ProxyRestriction getProxyRestriction()
Gets the ProxyRestriction condition for the assertion.

Specified by:
  `getProxyRestriction` in interface `Conditions`
Returns:
  the ProxyRestriction condition for the assertion

### getNotBefore

@Nullable public Instant getNotBefore()
Get the date/time before which the assertion is invalid.

Specified by:
  `getNotBefore` in interface `Conditions`
Returns:
  the date/time before which the assertion is invalid

### setNotBefore

public void setNotBefore(@Nullable Instant newNotBefore)
Sets the date/time before which the assertion is invalid.

Specified by:
  `setNotBefore` in interface `Conditions`
Parameters:
  `newNotBefore` - the date/time before which the assertion is invalid

### getNotOnOrAfter

@Nullable public Instant getNotOnOrAfter()
Gets the date/time on, or after, which the assertion is invalid.

Specified by:
  `getNotOnOrAfter` in interface `Conditions`
Returns:
  the date/time on, or after, which the assertion is invalid

### setNotOnOrAfter

public void setNotOnOrAfter(@Nullable Instant newNotOnOrAfter)
Sets the date/time on, or after, which the assertion is invalid.

Specified by:
  `setNotOnOrAfter` in interface `Conditions`
Parameters:
  `newNotOnOrAfter` - the date/time on, or after, which the assertion is invalid

### 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