A2uiFunction


interface A2uiFunction

Known direct subclasses
A2uiAndFunction

Evaluates a list of boolean values using logical AND.

A2uiEmailFunction

Validates if a string is a valid email address.

A2uiFormatCurrencyFunction

Formats a number as a currency string.

A2uiFormatDateFunction

Formats a timestamp into a date string.

A2uiFormatNumberFunction

Formats a number with grouping and decimal precision.

A2uiFormatStringFunction

Performs string interpolation of data model values and other functions.

A2uiLengthFunction

Validates string length limits.

A2uiNotFunction

Negates a boolean value.

A2uiNumericFunction

Validates numeric range limits.

A2uiOpenUrlFunction

Opens a URL in a browser or handler.

A2uiOrFunction

Evaluates a list of boolean values using logical OR.

A2uiPluralizeFunction

Chooses a plural string form based on a numeric value.

A2uiRegexFunction

Validates a string against a regular expression pattern.

A2uiRequiredFunction

Validates that a value is present and not empty.


Represents a function supported by A2UI including its definition and implementation.

Summary

Public functions

Any?
execute(args: Map<StringAny>, executionContext: A2uiExecutionContext)

Executes the function logic.

Public properties

A2uiFunctionDefinition

The definition of the function.

Public functions

execute

fun execute(args: Map<StringAny>, executionContext: A2uiExecutionContext): Any?

Executes the function logic.

Parameters
args: Map<StringAny>

statically resolved arguments where dynamic properties are resolved beforehand

executionContext: A2uiExecutionContext

context allowing to execute other functions, evaluate dynamic payloads and resolving data bindings

Returns
Any?

raw evaluated result

Public properties

definition

Added in 1.0.0-alpha01
val definitionA2uiFunctionDefinition

The definition of the function.