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

# Class ConditionsImpl

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

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

public class ConditionsImpl extends AbstractXMLObject implements Conditions
This is a concrete implementation of the `Conditions` interface.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final IndexedXMLObjectChildrenList<Condition>`
`conditions`
Set containing all the Conditions.
`private Instant`
`notBefore`
Value saved in the NotBefore attribute.
`private Instant`
`notOnOrAfter`
Value saved in the NotOnOrAfter attribute.

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

`DEFAULT_ELEMENT_LOCAL_NAME, DEFAULT_ELEMENT_NAME, NOTBEFORE_ATTRIB_NAME, NOTBEFORE_ATTRIB_QNAME, NOTONORAFTER_ATTRIB_NAME, NOTONORAFTER_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<AudienceRestrictionCondition>`
`getAudienceRestrictionConditions()`
Get the audience restriction conditions.
`List<Condition>`
`getConditions()`
Get the conditions.
`List<Condition>`
`getConditions(QName typeOrName)`
Get the conditions with the given schema type or element name.
`List<DoNotCacheCondition>`
`getDoNotCacheConditions()`
Get the "do not cache" conditions.
`Instant`
`getNotBefore()`
Get the "not before" condition.
`Instant`
`getNotOnOrAfter()`
Get the "not on or after" condition.
`List<XMLObject>`
`getOrderedChildren()`
Gets an unmodifiable list of child elements in the order that they will appear in the DOM.
`void`
`setNotBefore(Instant dt)`
Set the "not before" condition.
`void`
`setNotOnOrAfter(Instant dt)`
Set the "not on or after" condition.

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

### notBefore

@Nullable private Instant notBefore
Value saved in the NotBefore attribute.

### notOnOrAfter

@Nullable private Instant notOnOrAfter
Value saved in the NotOnOrAfter attribute.

### conditions

@Nonnull private final IndexedXMLObjectChildrenList<Condition> conditions
Set containing all the 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

### getNotBefore

@Nullable public Instant getNotBefore()
Get the "not before" condition.

Specified by:
  `getNotBefore` in interface `Conditions`
Returns:
  the "not before" condition

### setNotBefore

public void setNotBefore(@Nullable Instant dt)
Set the "not before" condition.

Specified by:
  `setNotBefore` in interface `Conditions`
Parameters:
  `dt` - the "not before" condition

### getNotOnOrAfter

@Nullable public Instant getNotOnOrAfter()
Get the "not on or after" condition.

Specified by:
  `getNotOnOrAfter` in interface `Conditions`
Returns:
  the "not on or after" condition

### setNotOnOrAfter

public void setNotOnOrAfter(@Nullable Instant dt)
Set the "not on or after" condition.

Specified by:
  `setNotOnOrAfter` in interface `Conditions`
Parameters:
  `dt` - the "not on or after" condition

### getConditions

@Nonnull @Live public List<Condition> getConditions()
Get the conditions.

Specified by:
  `getConditions` in interface `Conditions`
Returns:
  the conditions

### getConditions

@Nonnull @Live public List<Condition> getConditions(@Nonnull QName typeOrName)
Get the conditions with the given schema type or element name.

Specified by:
  `getConditions` in interface `Conditions`
Parameters:
  `typeOrName` - the schema type or element name
Returns:
  the matching conditions

### getAudienceRestrictionConditions

@Nonnull @Live public List<AudienceRestrictionCondition> getAudienceRestrictionConditions()
Get the audience restriction conditions.

Specified by:
  `getAudienceRestrictionConditions` in interface `Conditions`
Returns:
  the audience restriction conditions

### getDoNotCacheConditions

@Nonnull @Live public List<DoNotCacheCondition> getDoNotCacheConditions()
Get the "do not cache" conditions.

Specified by:
  `getDoNotCacheConditions` in interface `Conditions`
Returns:
  the "do not cache" conditions

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