Package: system

Basic system APIs.

API

error

method error(errorText as string)

Raises an error and terminates execution.

errorIf

method errorIf(condition as bool, errorText as string)

If the condition is true raises an error and terminates execution.

digest

function digest(message as string) as string

Creates a SHA1 digest of message.

sequence

function sequence(start as int, count as int, step as int) as collection of int

Creates and returns a collection of integers starting at start with count items with the step as increment.

getCurrentUser

function getCurrentUser() as user

type user { var name as string; var idOrganization as int; var idBusinessUnit as int; var key as int; }

Returns the current user.

randomUUID

function randomUUID() as string

Creates and returns a new random UUID.

randomString

function randomUUID() as string

Creates and returns a new random string.

secureRandom

function secureRandom() as string

Creates and returns a new random string using a cryptographically strong random number generator.

flushCache

method flushCache()

Flushes the system cache.

isAtomic

function isAtomic() as bool

Returns true if the current method is part of a transaction.

Since 1.5.1

encryptHmacMD5

function encryptHmacMD5(data as string, key as string) as string

Computes a Hash-based Message Authentication Code (HMAC) by using the MD5 hash function.

Since 1.5.1