A2uiFunctionArgParser


public static class A2uiFunctionArgParser


Reusable utility methods to parse and validate dynamic arguments passed to catalog functions.

Summary

Public fields

static @NonNull A2uiFunctionArgParser

Public methods

final @NonNull Object
getArg(
    @NonNull Map<@NonNull String, @NonNull Object> args,
    @NonNull String key,
    @NonNull String path
)

Retrieves a raw argument value from the args map under the given key.

final boolean
getBooleanArg(
    @NonNull Map<@NonNull String, @NonNull Object> args,
    @NonNull String key,
    @NonNull String path
)

Retrieves a Boolean argument under key supporting either actual Booleans or the case-insensitive strings "true" and "false".

final @NonNull List<@NonNull Boolean>
getBooleanListArg(
    @NonNull Map<@NonNull String, @NonNull Object> args,
    @NonNull String key,
    @NonNull String path
)

Retrieves a List of Booleans under key supporting either actual Booleans or the case-insensitive strings "true" and "false".

final double
getDoubleArg(
    @NonNull Map<@NonNull String, @NonNull Object> args,
    @NonNull String key,
    @NonNull String path
)

Retrieves a Double argument under key.

final @NonNull List<@NonNull Double>
getDoubleListArg(
    @NonNull Map<@NonNull String, @NonNull Object> args,
    @NonNull String key,
    @NonNull String path
)

Retrieves a List of Doubles under key.

final long
getEpochMillisArg(
    @NonNull Map<@NonNull String, @NonNull Object> args,
    @NonNull String key,
    @NonNull String path
)

Retrieves a UTC epoch millisecond timestamp argument under key, supporting numeric timestamps (in seconds or milliseconds) and ISO 8601 date / date-time strings.

final int
getIntArg(
    @NonNull Map<@NonNull String, @NonNull Object> args,
    @NonNull String key,
    @NonNull String path
)

Retrieves an Int argument under key.

final @NonNull List<@NonNull Integer>
getIntListArg(
    @NonNull Map<@NonNull String, @NonNull Object> args,
    @NonNull String key,
    @NonNull String path
)

Retrieves a List of Ints under key.

final long
getLongArg(
    @NonNull Map<@NonNull String, @NonNull Object> args,
    @NonNull String key,
    @NonNull String path
)

Retrieves a Long argument under key.

final @NonNull List<@NonNull Long>
getLongListArg(
    @NonNull Map<@NonNull String, @NonNull Object> args,
    @NonNull String key,
    @NonNull String path
)

Retrieves a List of Longs under key.

final @NonNull String
getStringArg(
    @NonNull Map<@NonNull String, @NonNull Object> args,
    @NonNull String key,
    @NonNull String path
)

Retrieves a String argument under key.

final @NonNull List<@NonNull String>
getStringListArg(
    @NonNull Map<@NonNull String, @NonNull Object> args,
    @NonNull String key,
    @NonNull String path
)

Retrieves a List of Strings under key.

Public fields

INSTANCE

Added in 1.0.0-alpha01
public static @NonNull A2uiFunctionArgParser INSTANCE

Public methods

getArg

public final @NonNull Object getArg(
    @NonNull Map<@NonNull String, @NonNull Object> args,
    @NonNull String key,
    @NonNull String path
)

Retrieves a raw argument value from the args map under the given key.

Parameters
@NonNull Map<@NonNull String, @NonNull Object> args

The map of arguments.

@NonNull String key

The argument key to retrieve.

@NonNull String path

The parent context path. The final error path will be constructed as "${path}/${key}".

Returns
@NonNull Object

The raw argument value.

Throws
A2uiException.A2uiValidationException

if the argument is missing.

getBooleanArg

public final boolean getBooleanArg(
    @NonNull Map<@NonNull String, @NonNull Object> args,
    @NonNull String key,
    @NonNull String path
)

Retrieves a Boolean argument under key supporting either actual Booleans or the case-insensitive strings "true" and "false".

Parameters
@NonNull Map<@NonNull String, @NonNull Object> args

The map of arguments.

@NonNull String key

The argument key.

@NonNull String path

The parent context path. The final error path will be constructed as "${path}/${key}".

Returns
boolean

The resolved Boolean value.

Throws
A2uiException.A2uiValidationException

if the argument is missing or invalid.

getBooleanListArg

public final @NonNull List<@NonNull BooleangetBooleanListArg(
    @NonNull Map<@NonNull String, @NonNull Object> args,
    @NonNull String key,
    @NonNull String path
)

Retrieves a List of Booleans under key supporting either actual Booleans or the case-insensitive strings "true" and "false".

Parameters
@NonNull Map<@NonNull String, @NonNull Object> args

The map of arguments.

@NonNull String key

The argument key.

@NonNull String path

The parent context path. The final element path will be constructed with the index suffix, like ${path}/${key}/${index}.

Returns
@NonNull List<@NonNull Boolean>

The resolved List of Booleans.

Throws
A2uiException.A2uiValidationException

if the argument is missing or any element violates constraints.

getDoubleArg

public final double getDoubleArg(
    @NonNull Map<@NonNull String, @NonNull Object> args,
    @NonNull String key,
    @NonNull String path
)

Retrieves a Double argument under key.

Parameters
@NonNull Map<@NonNull String, @NonNull Object> args

The map of arguments.

@NonNull String key

The argument key.

@NonNull String path

The parent context path. The final error path will be constructed as "${path}/${key}".

Returns
double

The resolved Double value.

Throws
A2uiException.A2uiValidationException

if the argument is missing or invalid.

getDoubleListArg

public final @NonNull List<@NonNull DoublegetDoubleListArg(
    @NonNull Map<@NonNull String, @NonNull Object> args,
    @NonNull String key,
    @NonNull String path
)

Retrieves a List of Doubles under key.

Parameters
@NonNull Map<@NonNull String, @NonNull Object> args

The map of arguments.

@NonNull String key

The argument key.

@NonNull String path

The parent context path. The final element path will be constructed with the index suffix, like ${path}/${key}/${index}.

Returns
@NonNull List<@NonNull Double>

The resolved List of Doubles.

Throws
A2uiException.A2uiValidationException

if the argument is missing or any element violates constraints.

getEpochMillisArg

public final long getEpochMillisArg(
    @NonNull Map<@NonNull String, @NonNull Object> args,
    @NonNull String key,
    @NonNull String path
)

Retrieves a UTC epoch millisecond timestamp argument under key, supporting numeric timestamps (in seconds or milliseconds) and ISO 8601 date / date-time strings.

Date-only strings (e.g., "2026-06-15") are normalized to UTC start-of-day. Numeric values less than 10,000,000,000 are treated as epoch seconds, otherwise as epoch milliseconds.

Parameters
@NonNull Map<@NonNull String, @NonNull Object> args

The map of arguments.

@NonNull String key

The argument key.

@NonNull String path

The parent context path. The final error path will be constructed as "${path}/${key}".

Returns
long

The resolved timestamp in UTC epoch milliseconds.

Throws
A2uiException.A2uiValidationException

if the argument is missing or cannot be parsed as a date or timestamp.

getIntArg

public final int getIntArg(
    @NonNull Map<@NonNull String, @NonNull Object> args,
    @NonNull String key,
    @NonNull String path
)

Retrieves an Int argument under key.

Parameters
@NonNull Map<@NonNull String, @NonNull Object> args

The map of arguments.

@NonNull String key

The argument key.

@NonNull String path

The parent context path. The final error path will be constructed as "${path}/${key}".

Returns
int

The resolved Int value.

Throws
A2uiException.A2uiValidationException

if the argument is missing or invalid.

getIntListArg

public final @NonNull List<@NonNull IntegergetIntListArg(
    @NonNull Map<@NonNull String, @NonNull Object> args,
    @NonNull String key,
    @NonNull String path
)

Retrieves a List of Ints under key.

Parameters
@NonNull Map<@NonNull String, @NonNull Object> args

The map of arguments.

@NonNull String key

The argument key.

@NonNull String path

The parent context path. The final element path will be constructed with the index suffix, like ${path}/${key}/${index}.

Returns
@NonNull List<@NonNull Integer>

The resolved List of Ints.

Throws
A2uiException.A2uiValidationException

if the argument is missing or any element violates constraints.

getLongArg

public final long getLongArg(
    @NonNull Map<@NonNull String, @NonNull Object> args,
    @NonNull String key,
    @NonNull String path
)

Retrieves a Long argument under key.

Parameters
@NonNull Map<@NonNull String, @NonNull Object> args

The map of arguments.

@NonNull String key

The argument key.

@NonNull String path

The parent context path. The final error path will be constructed as "${path}/${key}".

Returns
long

The resolved Long value.

Throws
A2uiException.A2uiValidationException

if the argument is missing or invalid.

getLongListArg

public final @NonNull List<@NonNull LonggetLongListArg(
    @NonNull Map<@NonNull String, @NonNull Object> args,
    @NonNull String key,
    @NonNull String path
)

Retrieves a List of Longs under key.

Parameters
@NonNull Map<@NonNull String, @NonNull Object> args

The map of arguments.

@NonNull String key

The argument key.

@NonNull String path

The parent context path. The final element path will be constructed with the index suffix, like ${path}/${key}/${index}.

Returns
@NonNull List<@NonNull Long>

The resolved List of Longs.

Throws
A2uiException.A2uiValidationException

if the argument is missing or any element violates constraints.

getStringArg

public final @NonNull String getStringArg(
    @NonNull Map<@NonNull String, @NonNull Object> args,
    @NonNull String key,
    @NonNull String path
)

Retrieves a String argument under key.

Parameters
@NonNull Map<@NonNull String, @NonNull Object> args

The map of arguments.

@NonNull String key

The argument key.

@NonNull String path

The parent context path. The final error path will be constructed as "${path}/${key}".

Returns
@NonNull String

The resolved String value.

Throws
A2uiException.A2uiValidationException

if the argument is missing, invalid or violates constraints.

getStringListArg

public final @NonNull List<@NonNull StringgetStringListArg(
    @NonNull Map<@NonNull String, @NonNull Object> args,
    @NonNull String key,
    @NonNull String path
)

Retrieves a List of Strings under key.

Parameters
@NonNull Map<@NonNull String, @NonNull Object> args

The map of arguments.

@NonNull String key

The argument key.

@NonNull String path

The parent context path. The final element path will be constructed with the index suffix, like ${path}/${key}/${index}.

Returns
@NonNull List<@NonNull String>

The resolved List of Strings.

Throws
A2uiException.A2uiValidationException

if the argument is missing or any element violates constraints.