|
static HashMap< String, Object > | getUserContextInfo () throws Throwable |
|
static Object | getGlobalConfigItemValue (String item, Map< String, Object > local_context, boolean expand_complex_values) throws Throwable |
|
static Object | getGlobalConfigItemValue (String item, Map< String, Object > local_context) throws Throwable |
|
static Object | getGlobalConfigItemValue (String item) throws Throwable |
|
static Object | getGlobalConfigItemValueWithDefault (String item, Object default_value, Map< String, Object > local_context) throws Throwable |
|
static Object | getGlobalConfigItemValueWithDefault (String item, Object default_value) throws Throwable |
|
static HashMap< String, Object > | getSystemInfo () throws Throwable |
|
static Object | getValueMap (String mapname, String key) throws Throwable |
|
static Object | expandTemplatedValue (Object value, Map< String, Object > local_context) throws Throwable |
|
static Object | expandTemplatedValue (Object value) throws Throwable |
|
static HashMap< String, Object > | propGet () throws Throwable |
|
static HashMap< String, Object > | propGet (String domain) throws Throwable |
|
static Object | propGet (String domain, String key) throws Throwable |
|
This class is used for callbacks for config item updates
ServiceApi.setConfigItemChangeCallback()
◆ expandTemplatedValue() [1/2]
static Object com.qoretechnologies.qorus.mapper.MapperApi.expandTemplatedValue |
( |
Object |
value, |
|
|
Map< String, Object > |
local_context |
|
) |
| throws Throwable |
|
inlinestatic |
Expands all variables in a templated string
- Parameters
-
- Returns
- the value of the string as substituted with all variables expanded recursively until there are no more expansions to perform (or the derived value is not a string)
- Exceptions
-
LIST-VALUE-ERROR | cannot parse list value expression |
REST-EXPRESSION-ERROR | cannot parse REST expression and argument |
NOT-WF-CONTEXT-ERROR | if WF specific context (e.g. static) variable is specified to be expanded |
UNSUPPORTED-CONTEXT-ERROR | if an unknown context variable is specified to be expanded |
FORMAT-ERROR | if the templated string doesn't have correct format (e.g. unescaped dollar sign that does not represent a variable) |
SENSITIVE-DATA-FORMAT-ERROR | if the "$sensitive:<skey>.<svalue>.field-ref..." value or "$sensitive-alias:<alias>.field-ref..." template string does not have the required format |
- See also
- Config Item / Building Block Template Substitution Strings
◆ expandTemplatedValue() [2/2]
static Object com.qoretechnologies.qorus.mapper.MapperApi.expandTemplatedValue |
( |
Object |
value | ) |
throws Throwable |
|
inlinestatic |
Expands all variables in a templated string
- Parameters
-
- Returns
- the value of the string as substituted with all variables expanded recursively until there are no more expansions to perform (or the derived value is not a string)
- Exceptions
-
LIST-VALUE-ERROR | cannot parse list value expression |
REST-EXPRESSION-ERROR | cannot parse REST expression and argument |
NOT-WF-CONTEXT-ERROR | if WF specific context (e.g. static) variable is specified to be expanded |
UNSUPPORTED-CONTEXT-ERROR | if an unknown context variable is specified to be expanded |
FORMAT-ERROR | if the templated string doesn't have correct format (e.g. unescaped dollar sign that does not represent a variable) |
SENSITIVE-DATA-FORMAT-ERROR | if the "$sensitive:<skey>.<svalue>.field-ref..." value or "$sensitive-alias:<alias>.field-ref..." template string does not have the required format |
- See also
- Config Item / Building Block Template Substitution Strings
◆ getGlobalConfigItemValue() [1/3]
static Object com.qoretechnologies.qorus.mapper.MapperApi.getGlobalConfigItemValue |
( |
String |
item, |
|
|
Map< String, Object > |
local_context, |
|
|
boolean |
expand_complex_values |
|
) |
| throws Throwable |
|
inlinestatic |
Returns the value of the given configuration item on global level; throws an exception if there is no value on global level for the configuration item
- Parameters
-
item | the name of the configuration item to retrieve the value |
local_context | the caller can supply its "local" context for template variables (plus user context info is added - see MapperApi.getUserContextInfo() method) |
expand_complex_values | if true then lists and hashes will have their string values expanded recursively |
- Returns
- the value of the given configuration item on global level
- Exceptions
-
CONFIG-ITEM-ERROR | thrown if the configuration item is not valid |
- Note
- the value is always substituted with UserApi::expandTemplatedValue(); make sure and escape any
"$"
characters with a backslash ("\"
) to avoid template substitution
- See also
- getGlobalConfigItemValueWithDefault()
◆ getGlobalConfigItemValue() [2/3]
static Object com.qoretechnologies.qorus.mapper.MapperApi.getGlobalConfigItemValue |
( |
String |
item, |
|
|
Map< String, Object > |
local_context |
|
) |
| throws Throwable |
|
inlinestatic |
Returns the value of the given configuration item on global level; throws an exception if there is no value on global level for the configuration item
- Parameters
-
item | the name of the configuration item to retrieve the value |
local_context | the caller can supply its "local" context for template variables (plus user context info is added - see MapperApi.getUserContextInfo() method) |
- Returns
- the value of the given configuration item on global level
- Exceptions
-
CONFIG-ITEM-ERROR | thrown if the configuration item is not valid |
- Note
- the value is always substituted with UserApi::expandTemplatedValue(); make sure and escape any
"$"
characters with a backslash ("\"
) to avoid template substitution
- See also
- getGlobalConfigItemValueWithDefault()
◆ getGlobalConfigItemValue() [3/3]
static Object com.qoretechnologies.qorus.mapper.MapperApi.getGlobalConfigItemValue |
( |
String |
item | ) |
throws Throwable |
|
inlinestatic |
Returns the value of the given configuration item on global level; throws an exception if there is no value on global level for the configuration item
- Parameters
-
item | the name of the configuration item to retrieve the value |
- Returns
- the value of the given configuration item on global level
- Exceptions
-
CONFIG-ITEM-ERROR | thrown if the configuration item is not valid |
- Note
- the value is always substituted with UserApi::expandTemplatedValue(); make sure and escape any
"$"
characters with a backslash ("\"
) to avoid template substitution
- See also
- getGlobalConfigItemValueWithDefault()
◆ getGlobalConfigItemValueWithDefault() [1/2]
static Object com.qoretechnologies.qorus.mapper.MapperApi.getGlobalConfigItemValueWithDefault |
( |
String |
item, |
|
|
Object |
default_value, |
|
|
Map< String, Object > |
local_context |
|
) |
| throws Throwable |
|
inlinestatic |
Returns the value of the given configuration item on global level; throws an exception if there is no value on global level for the configuration item
- Parameters
-
item | the name of the configuration item to retrieve the value |
default_value | the value to be returned if the value is not set |
local_context | the caller can supply its "local" context for template variables (plus user context info is added - see MapperApi.getUserContextInfo() method) |
- Returns
- the value of the given global configuration item or default_value, if no value is set at the global level for the given configuration item
- Note
-
- See also
- getGlobalConfigItemValue()
◆ getGlobalConfigItemValueWithDefault() [2/2]
static Object com.qoretechnologies.qorus.mapper.MapperApi.getGlobalConfigItemValueWithDefault |
( |
String |
item, |
|
|
Object |
default_value |
|
) |
| throws Throwable |
|
inlinestatic |
Returns the value of the given configuration item on global level; throws an exception if there is no value on global level for the configuration item
- Parameters
-
item | the name of the configuration item to retrieve the value |
default_value | the value to be returned if the value is not set |
- Returns
- the value of the given global configuration item or default_value, if no value is set at the global level for the given configuration item
- Note
-
- See also
- getGlobalConfigItemValue()
◆ getSystemInfo()
static HashMap<String, Object> com.qoretechnologies.qorus.mapper.MapperApi.getSystemInfo |
( |
| ) |
throws Throwable |
|
inlinestatic |
Returns a hash of system info
- Returns
- a hash of system info with the following keys:
-
instance-key
: value of the system option by the same name
-
session-id
: the session ID for the current Qorus application session
-
omq-version
: the version string for the Qorus server
-
omq-version-code
: a numeric code of the Qorus server version, wheremajor = (x / 10000),
minor = (x / 100) % 100, = x % 100
this value is suitable for comparisons (ex: for Qorus 2.6.0, omq-version-code
= 20600)
-
qore-version
: the version string for the qore build used
-
datamodel-version
: the datamodel version required by this version of Qorus
-
omq-schema
: the datasource string for the system schema (without the password)
-
omquser-schema
: the datasource string for the user schema (without the password)
-
starttime:
the date and time when the instance was started
-
hostname:
the hostname of the machine where the Qorus server is running
-
pid:
the PID of the Qorus server process
-
threads:
number of threads currently active
-
schema-properties
: a hash of schema properties with the following keys:
-
omq-schema-version
-
omq-schema-compatibility
-
omq-load-schema-compatibility
-
logfile:
the path for the system log file
◆ getUserContextInfo()
static HashMap<String, Object> com.qoretechnologies.qorus.mapper.MapperApi.getUserContextInfo |
( |
| ) |
throws Throwable |
|
inlinestatic |
Returns a hash for the current user context
- Example:
Map<String, Object> h = MapperApi::getUserContextInfo();
- Returns
- a hash describing the current user context or NOTHING if called outside a workflow, service, or job; hash keys are as follows:
-
when called in a service:
-
"type"
: "service"
-
"servicetype"
: the type of service ("user"
or "system"
)
-
"name"
: the name of the service
-
"version"
: the version of the service
-
"id"
: the service id
-
"context_user"
: the current username context, if any
-
when called in a job:
-
"type"
: "job"
-
"name"
: the name of the job
-
"version"
: the version of the job
-
"id"
: the job id
-
"job_instanceid"
: the job_instanceid of the current job instance
-
"context_user"
: the current username context, if any
-
when called in a workflow:
-
"type"
: "workflow"
-
"name"
: the name of the workflow
-
"version"
: the version of the workflow
-
"id"
: the workflow id
-
"workflow_instanceid"
: the workflow_instanceid of the current workflow instance (if available)
-
"stepname"
: the name of the current step (if available)
-
"stepversion"
: the version of the current step (if available)
-
"stepid"
: the id of the current step (if available)
-
"ind"
: the name of the current step index (if available)
-
"execid"
: the execution ID of the current workflow execution instance (if available)
-
"context_user"
: the current username context, if any
◆ getValueMap()
static Object com.qoretechnologies.qorus.mapper.MapperApi.getValueMap |
( |
String |
mapname, |
|
|
String |
key |
|
) |
| throws Throwable |
|
inlinestatic |
Gets a lookup value from the value map by a key; the value map must be registered to the current interface
- Parameters
-
mapname | name of the value map |
key | a key name |
- Returns
- the value assigned to the key
- Exceptions
-
VALUE-MAP-ERROR | the given value map is unknown or not registered to the current interface |
◆ propGet() [1/3]
static HashMap<String, Object> com.qoretechnologies.qorus.mapper.MapperApi.propGet |
( |
| ) |
throws Throwable |
|
inlinestatic |
Returns a hash of all system properties in all domains
- Example:
Map<String, Object> h = MapperApi::propGet();
- Returns
- a hash of all system properties in all domains; the top-level keys are domain keys which have as values hashes with all key-value pairs set in the domain
◆ propGet() [2/3]
static HashMap<String, Object> com.qoretechnologies.qorus.mapper.MapperApi.propGet |
( |
String |
domain | ) |
throws Throwable |
|
inlinestatic |
Returns a hash of all key-value pairs in the given domain or NOTHING if the system property domain does not exist
- Example:
Map<String, Object> h = MapperApi::propGet(domain);
- Returns
- a hash of all key-value pairs in the given domain or NOTHING if the system property domain does not exist
◆ propGet() [3/3]
static Object com.qoretechnologies.qorus.mapper.MapperApi.propGet |
( |
String |
domain, |
|
|
String |
key |
|
) |
| throws Throwable |
|
inlinestatic |
Returns the value of the given system property key in the given domain or NOTHING if the system property does not exist
- Example:
auto val = MapperApi::propGet(domain, key);
- Returns
- the value of the given system property key in the given domain
The documentation for this class was generated from the following file:
- /builds/qorus/qorus/java/com/qoretechnologies/qorus/mapper/MapperApi.java