JDito System Modules and System Variables
This chapter serves as a reference for two closely related topics in JDito:
- the built-in system modules that provide platform functionality, and
- the system variables through which ADITO exposes context-specific state to JDito processes.
When to use this chapter
Use this chapter mainly as a reference when
- you need to identify the correct system module for a technical task,
- you need to understand the scope or lifetime of a system variable, or
- you want to inspect variables that are available in a specific process context.
System Modules
In JDito, all functionality beyond core JavaScript is provided through system modules. Each module groups methods and constants for a specific topic or technical domain.
Purpose and Use of Modules
A module typically contains all methods and constants related to its domain. For example, system.calendar contains functions for calendar entries, while system.db provides interfaces for database operations.
Constants act as readable aliases for cryptic values to improve code clarity. For example, instead of using the numeric value 7 to identify Apache Derby as a database type, JDito provides the constant db.DBTYPE_DERBY10 for better readability.
Methods allow developers to control ADITO behavior, for example by querying a database or updating a UI component. These methods are not the same as JDito functions written by developers in processes. JDito methods are implemented by the interpreter and expose core ADITO functionality.
To use any module, it must be imported at the beginning of the JDito process.
The import statements must always appear at the very top of a process. If placed elsewhere, an error will occur.
Import Example
import { result } from "@aditosoftware/jdito-types";
// Code begins here
result.string("My result");
Available System Modules
A complete JDito API documentation is available.
JDito provides a range of system modules. Each module must be imported explicitly and provide access to a specific part of the ADITO platform.
Here is a list of the most important system modules:
| System Module | Description |
|---|---|
vars | Methods for reading and setting variable values (component, field, system, local, image). |
result | Methods for returning values to the ADITO core (used in value or display processes and server-processes). |
util | Utility functions such as BASE64 encoding/decoding and UUID generation via getNewUUID(). |
text | Methods for working with multi-string encoding/decoding, text formatting, parsing, and hashing. |
logging | Provides logging functionality. |
db | Provides methods and constants for interacting with databases: SELECT, UPDATE, DELETE, etc. |
tools | Despite its name, this module handles user and role management. |
translate | Provides access to the ADITO translation subsystem. |
datetime | Includes methods and constants for handling dates, timestamps, and time zones. |
fileIO | Methods and constants for server-side file input/output operations. |
eMath | Offers safe arithmetic operations (add, subtract, multiply, divide, round) on String-based numbers. Supports both integer and decimal operations, along with rounding constants. |
calendars | Groups all methods and constants for working with calendars and calendar entries. |
mail | Methods and constants for sending emails and handling email objects. |
cti | Contains methods and constants for integrating with telephone systems. |
indexsearch | Contains methods and constants for indexing and searching with Solr. |
net | Allows REST/SOAP web service calls, URL validation, and retrieval of URL contents. |
neon | Methods and constants for controlling the Neon web client. |
notification | Methods and constants for working with the ADITO notification system. |
project | Methods and constants for accessing deployed project models, such as getAlias(), getDatamodel(), getInstanceConfigValue(). |
process | Provides methods and constants for executing JDito processes immediately or on schedule. |
report | Interfaces with the ADITO reporting engine. |
pack | Methods and constants for ZIP archive operations. |
plugin | Enables calling ADITO plugins on the server side. |
System Variables
System variables contain values provided by the ADITO core or assigned within JDito code. They always use the $
prefix and are accessed through system.vars via vars.get() and vars.set().
See Entity Model → System Variables for more information about system variables in the Entity Model environment.