Target filter
Search Kotlin docs
  • Platforms
  • Tealium Prism Kotlin
core/com.tealium.prism.core.api.rules/Condition

Condition

data class Condition : DataItemConvertible, Matchable<DataObject>

A class modelling the possible conditions used by both transformations and load rules to determine whether or not to execute.

If the variable to access resides in a sub-object, then use the path variable to extract the value from the appropriate location.

Although Condition instances can be made manually, there are many helper functions to make creations more straightforward and easy to read.

With the exception of isDefined/isNotDefined which explicitly check for the existence of values at given keys, Operators are typically expected to

  • throw MissingDataItemException if the data item is not found in the payload

  • throw MissingFilterException if the filter is null

  • throw NumberParseException if it requires a numeric value in the payload or filter, but they were not parseable as such

  • throw UnsupportedOperatorException if the operator is not supported for the type of data found in the payload

Parameters

variable

The actual key in the DataObject to get the value from

operator

The behavior of this Condition

filter

The target value, in String format.

Types

Companion
Link copied to clipboard
object Companion
Converter
Link copied to clipboard
object Converter : DataItemConverter<Condition>
Operator
Link copied to clipboard
interface Operator : DataItemConvertible

A Condition.Operator is a specific type of predicate, that applies some functionality to a given DataItem, and determines if it matches a given target filter value.

Properties

filter
Link copied to clipboard
val filter: StringContainer?
operator
Link copied to clipboard
val operator: Condition.Operator
variable
Link copied to clipboard
val variable: ReferenceContainer

Functions

asDataItem
Link copied to clipboard
open override fun asDataItem(): DataItem

Should return an instance of a DataItem that represents all required properties of the implementing class, such that it could be:

matches
Link copied to clipboard
open override fun matches(input: DataObject): Boolean

Returns whether or not the this Matchable matches the given input.

Generated by Dokka
(c) Tealium 2026