368 *hash<string, hash<ActionOptionInfo>>
options;
406 static hash<string, hash<DataProviderAppInfo>>
appcache;
412 static hash<string, hash<string, hash<DataProviderActionInfo>>>
app_actionmap;
415 static hash<string, list<hash<DataProviderActionInfo>>>
smap;
494 static int compareActions(hash<DataProviderActionInfo> act0, hash<DataProviderActionInfo> act1);
499 static int compareOptions(*hash<
string, hash<ActionOptionInfo>> opt0, *hash<
string, hash<ActionOptionInfo>> opt1);
523 static *hash<DataProviderAppInfo>
getApp(
string app);
535 static hash<DataProviderAppInfo>
getAppEx(
string app);
543 static *list<hash<DataProviderAppInfo>>
searchAppRegex(
string regex_pattern,
int regex_options = RE_Caseless);
552 static *list<hash<DataProviderAppInfo>>
searchAppSubstr(
string substr,
bool ignore_case = True);
568 static *hash<string, hash<DataProviderActionInfo>>
getActionHash(
string app);
588 static *list<hash<DataProviderActionInfo>>
getActions(
string app);
614 static *hash<DataProviderActionInfo>
getAppAction(
string app,
string action);
647 static *list<hash<DataProviderActionInfo>>
searchAppActionRegex(
string app,
string regex_pattern,
int regex_options = RE_Caseless);
658 static *list<hash<DataProviderActionInfo>>
searchAppActionSubstr(
string app,
string substr,
bool ignore_case = True);
671 static *list<hash<DataProviderActionInfo>>
searchAppActionRegexEx(
string app,
string regex_pattern,
int regex_options = RE_Caseless);
692 static *list<hash<DataProviderActionInfo>>
searchActionRegex(
string regex_pattern,
int regex_options = RE_Caseless);
700 static *list<hash<DataProviderActionInfo>>
searchActionSubstr(
string substr,
bool ignore_case = True);
753thread_local *
string _mod_init_ctx;
The AbstractDataProvider class.
Definition AbstractDataProvider.qc.dox.h:919
describes a data type
Definition AbstractDataProviderType.qc.dox.h:139
DataProvider action and application catalog class.
Definition DataProviderActionCatalog.qc.dox.h:390
static hash< string, hash< string, hash< DataProviderActionInfo > > > app_actionmap
Action cache, the key is the application key, the second key is the action string.
Definition DataProviderActionCatalog.qc.dox.h:412
static registerApp(hash< DataProviderAppInfo > app)
Registers a data provider application.
const DefaultDescription
Default description.
Definition DataProviderActionCatalog.qc.dox.h:430
static *hash< string, hash< DataProviderActionInfo > > getActionHash(string app)
Returns a hash of all actions for the given application.
static string normalizePath(string path)
Returns a normalized path to ensure that comparisons always work.
static *list< hash< DataProviderActionInfo > > searchAppActionSubstr(string app, string substr, bool ignore_case=True)
Searches for application actions whose descriptions match a substring.
static hash< string, hash< string, bool > > appmodmap
Maps apps to the modules that define them: app -> module path -> True.
Definition DataProviderActionCatalog.qc.dox.h:427
static *int checkName(string name)
Checks for a valid name.
static registerPendingAppAction(string app, string action, code init)
Registers an app action for deferred initialization / initialization on demand.
static hash< DataProviderAppInfo > getAppEx(string app)
Returns the application definition for the given application name.
static hash< string, hash< string, bool > > resolve_output_types
Set of actions requiring output type resolution; app -> action -> True.
Definition DataProviderActionCatalog.qc.dox.h:418
static int compareBaseTypes(*Type t0, *Type t1)
Compares two types for equality.
static *list< hash< DataProviderAppInfo > > getAllApps()
Returns all applications in the cache.
static *hash< DataProviderAppInfo > deregisterDynamicApp(string name)
Removes a dynamic data provider application.
static *list< hash< DataProviderAppInfo > > searchAppSubstr(string substr, bool ignore_case=True)
Searches for applications whose names or descriptions match a substring.
static hash< DataProviderActionInfo > checkAppActionOptions(string app, string action)
Check that the action has had its options initialized if necessary and return the possibly updated ac...
static registerPendingApp(string app, code init)
Registers an app for deferred initialization / initialization on demand.
static hash< string, hash< string, code > > initactionmap
Pending application action init handler map: app -> action -> init handler.
Definition DataProviderActionCatalog.qc.dox.h:424
static doInit(code init)
Runs initialization and catches exceptions.
static int compareActions(hash< DataProviderActionInfo > act0, hash< DataProviderActionInfo > act1)
Compares two actions for equality.
static hash< string, hash< auto > > initmap
Pending application init handler map: app -> init handler.
Definition DataProviderActionCatalog.qc.dox.h:421
static Mutex lck()
Mutex for atomic operations.
static AbstractDataProvider getDataProviderForAction(hash< DataProviderActionInfo > action, *reference< hash< auto > > options)
Returns a data provider option for the given action and options.
static *list< hash< DataProviderActionInfo > > searchAppActionSubstrEx(string app, string substr, bool ignore_case=True)
Searches for application actions whose descriptions match a substring.
static *list< hash< DataProviderAppInfo > > searchAppRegex(string regex_pattern, int regex_options=RE_Caseless)
Searches for applications whose names or descriptions match a regular expression pattern.
const RequiredAppKeys
Required application key set.
Definition DataProviderActionCatalog.qc.dox.h:394
static hash< DataProviderActionInfo > getAppActionEx(string app, string action)
Returns the application definition for the given application name.
static *hash< DataProviderAppInfo > getApp(string app)
Returns the application definition for the given application name.
static *list< string > getModulePathsForApp(string app)
Returns zero or more module paths for the given application.
static *list< hash< DataProviderActionInfo > > searchAppActionRegexEx(string app, string regex_pattern, int regex_options=RE_Caseless)
Searches for application actions whose descriptions match a regular expression pattern.
static *AbstractDataProviderType getTypeForActionOptions(hash< auto > action)
Returns a data type for the action options.
static *list< hash< DataProviderActionInfo > > getActionsForScheme(string scheme)
Returns all actions for a particular connection scheme.
static hash< string, hash< ActionOptionInfo > > getActionOptionFromFields(hash< auto > fields, *hash< auto > additional_fields)
Converts field definitions into option descriptions.
static *hash< DataProviderActionInfo > getAppAction(string app, string action)
Returns the action definition for the given application and action.
static *list< hash< DataProviderActionInfo > > searchActionSubstr(string substr, bool ignore_case=True)
Searches for actions whose descriptions match a substring.
static hash< string, hash< DataProviderActionInfo > > top_actionmap
Master action cache, the key <app>/<action>
Definition DataProviderActionCatalog.qc.dox.h:409
static doInit(hash< auto > h)
Runs initialization and catches exceptions.
static hash< string, list< hash< DataProviderActionInfo > > > smap
Scheme map; keys are connection schemes.
Definition DataProviderActionCatalog.qc.dox.h:415
static int compareOptions(*hash< string, hash< ActionOptionInfo > > opt0, *hash< string, hash< ActionOptionInfo > > opt1)
Compares two option hashes for equality.
static *list< hash< DataProviderActionInfo > > getActions(string app)
Returns all actions for the given application.
static *list< hash< DataProviderActionInfo > > searchAppActionRegex(string app, string regex_pattern, int regex_options=RE_Caseless)
Searches for application actions whose descriptions match a regular expression pattern.
static *bool deregisterAppIntern(string name)
Deregisters an app and all its actions if an exception occurs during the other module's initializatio...
static *list< hash< DataProviderActionInfo > > getAllActions()
Returns all actions in the cache.
static *list< hash< DataProviderAppInfo > > getAllAppsNoInit()
Returns all applications in the cache without initializing actions.
static *list< hash< DataProviderActionInfo > > searchActionRegex(string regex_pattern, int regex_options=RE_Caseless)
Searches for actions whose descriptions match a regular expression pattern.
static *bool deregisterApp(string name)
Deregisters an app and all its actions if an exception occurs during the other module's initializatio...
static *AbstractDataProviderType getTypeForActionOptions(hash< DataProviderActionInfo > action)
Returns a data type for the action options.
const RequiredActionKeys
Required action key set (without action_code and path_vars, which are checked separately)
Definition DataProviderActionCatalog.qc.dox.h:398
static hash< string, hash< DataProviderAppInfo > > appcache
Top-level master application cache keyed by application name.
Definition DataProviderActionCatalog.qc.dox.h:406
static list< hash< DataProviderActionInfo > > getActionsEx(string app)
Returns all actions for the given application; throws an exception if the app is not registered.
static resolveOutputTypes()
Resolves output fypes in actions.
static *hash< string, hash< DataProviderActionInfo > > getActionHashEx(string app)
Returns a hash of all actions for the given application.
static registerAction(hash< DataProviderActionInfo > action)
Registers a data provider action.
const DPAT_API
Data Provider Action Type: make an API call.
Definition DataProviderActionCatalog.qc.dox.h:139
const DPAT_FIND_SINGLE
Data Provider Action Type: find a single record.
Definition DataProviderActionCatalog.qc.dox.h:148
const DPAT_SEND_MESSAGE
Data Provider Action Type: send a message.
Definition DataProviderActionCatalog.qc.dox.h:142
const DPAT_EVENT
Definition DataProviderActionCatalog.qc.dox.h:136
const DPAT_UPDATE
Data Provider Action Type: update a record.
Definition DataProviderActionCatalog.qc.dox.h:157
const DPAT_DELETE
Data Provider Action Type: delete a record.
Definition DataProviderActionCatalog.qc.dox.h:160
const DPAT_UPSERT
Data Provider Action Type: upsert a record.
Definition DataProviderActionCatalog.qc.dox.h:154
const DPAT_CREATE
Data Provider Action Type: create a record.
Definition DataProviderActionCatalog.qc.dox.h:151
const DPAT_FIND
Data Provider Action Type: find all matching records.
Definition DataProviderActionCatalog.qc.dox.h:145
Qore AbstractDataField class definition.
Definition AbstractDataField.qc.dox.h:27
const ActionNameMap
Maps action type codes to a user-friendly name.
Definition DataProviderActionCatalog.qc.dox.h:175
const ActionAttrMap
Maps action type codes to a data provider attribute string.
Definition DataProviderActionCatalog.qc.dox.h:171
const ActionCodeFlagMap
Maps action type codes to app action flags.
Definition DataProviderActionCatalog.qc.dox.h:164
const AppActionFlags
List of app action flags.
Definition DataProviderActionCatalog.qc.dox.h:168
Private definitions.
Definition AbstractDataProviderType.qc.dox.h:454
Data provider action option definition.
Definition DataProviderActionCatalog.qc.dox.h:179
bool structural_determinate
Does the value of this option determine the structure of other options?
Definition DataProviderActionCatalog.qc.dox.h:283
auto example_value
An optional example value for the option.
Definition DataProviderActionCatalog.qc.dox.h:228
*softlist< hash< AllowedValueInfo > > element_allowed_values
List of allowed values for elements of list types (enum)
Definition DataProviderActionCatalog.qc.dox.h:222
*string group
The group name for the option, if any.
Definition DataProviderActionCatalog.qc.dox.h:193
*softlist< string > required_groups
Is the option part of a required group?
Definition DataProviderActionCatalog.qc.dox.h:201
AbstractDataProviderType type
Data type of the option.
Definition DataProviderActionCatalog.qc.dox.h:181
bool readonly
Is this option read-only?
Definition DataProviderActionCatalog.qc.dox.h:268
*softlist< softstring > depends_on
A list of other options that must be set before this option can be chosen.
Definition DataProviderActionCatalog.qc.dox.h:238
*string default_ref_data
A tag allowing the default value to be returned dynamically as reference data.
Definition DataProviderActionCatalog.qc.dox.h:259
*softlist< hash< AllowedValueInfo > > allowed_values
List of allowed values (enum)
Definition DataProviderActionCatalog.qc.dox.h:216
*string loc
Option location for record-based data providers and data providers provided by a class.
Definition DataProviderActionCatalog.qc.dox.h:280
*softlist< softstring > on_change
Any information about how to react to changes.
Definition DataProviderActionCatalog.qc.dox.h:286
bool required
Is the option required or not?
Definition DataProviderActionCatalog.qc.dox.h:196
bool disabled
Is this option disabled?
Definition DataProviderActionCatalog.qc.dox.h:271
auto default_value
Any default value for the option.
Definition DataProviderActionCatalog.qc.dox.h:207
*string dynamic_type
A tag allowing the type of the option to be retrieved at runtime.
Definition DataProviderActionCatalog.qc.dox.h:262
string short_desc
Short description of the option in plain text.
Definition DataProviderActionCatalog.qc.dox.h:187
*softlist< string > exclusive_with
Is the option exclusive with other options?
Definition DataProviderActionCatalog.qc.dox.h:204
bool preselected
If the option should be preselected.
Definition DataProviderActionCatalog.qc.dox.h:265
string desc
Description of the option with markdown rendering.
Definition DataProviderActionCatalog.qc.dox.h:190
bool allowed_values_creatable
Does the option accept values not defined in allowed_values too?
Definition DataProviderActionCatalog.qc.dox.h:219
*string element_ref_data
A tag allowing element allowed values to be returned dynamically as element reference data.
Definition DataProviderActionCatalog.qc.dox.h:252
bool sensitive
Is the option value sensitive?
Definition DataProviderActionCatalog.qc.dox.h:210
*string ref_data
A tag allowing allowed values to be returned dynamically as reference data.
Definition DataProviderActionCatalog.qc.dox.h:245
bool multiselect
Are allowed values elements of the list's element type that indicate what values the list can have?
Definition DataProviderActionCatalog.qc.dox.h:213
string display_name
Display name of the option.
Definition DataProviderActionCatalog.qc.dox.h:184
*string validation_regex
An optional regex pattern for validating string values.
Definition DataProviderActionCatalog.qc.dox.h:231
bool element_allowed_values_creatable
Does the option accept values not defined in element_allowed_values too?
Definition DataProviderActionCatalog.qc.dox.h:225
DataProvider action definition.
Definition DataProviderActionCatalog.qc.dox.h:305
string short_desc
Action short description, plain text formatting.
Definition DataProviderActionCatalog.qc.dox.h:334
*hash< DataProviderInfo > data_provider_info
Data provider static info, useful for record-based data providers.
Definition DataProviderActionCatalog.qc.dox.h:386
bool data_dependent_options
Do options depend on the data for the call?
Definition DataProviderActionCatalog.qc.dox.h:371
*string group
The action group within the app, if any.
Definition DataProviderActionCatalog.qc.dox.h:313
*string action_val
Message or event type.
Definition DataProviderActionCatalog.qc.dox.h:349
*code get_output_type
In case the output type is expensive to acquire or requires I/O, this closure can be used to set it.
Definition DataProviderActionCatalog.qc.dox.h:380
*hash< auto > set_add
Values to add to any "set" argument for record-based actions.
Definition DataProviderActionCatalog.qc.dox.h:365
string path
Data provider path to action.
Definition DataProviderActionCatalog.qc.dox.h:323
string display_name
The display name for the action.
Definition DataProviderActionCatalog.qc.dox.h:331
*AbstractDataProviderType output_type
Output type for the action.
Definition DataProviderActionCatalog.qc.dox.h:374
int action_code
Action type code.
Definition DataProviderActionCatalog.qc.dox.h:342
string app
Name of the application that provides the action.
Definition DataProviderActionCatalog.qc.dox.h:307
*hash< auto > where_add
Values to add to any "where" argument for record-based actions.
Definition DataProviderActionCatalog.qc.dox.h:359
bool has_dynamic_options
Does the action support dynamic options?
Definition DataProviderActionCatalog.qc.dox.h:377
*string subtype
Any data provider subtype.
Definition DataProviderActionCatalog.qc.dox.h:318
string desc
Action long description, markdown formatting.
Definition DataProviderActionCatalog.qc.dox.h:337
*hash< string, hash< DataProviderPathVarInfo > > path_vars
Description of any path variables.
Definition DataProviderActionCatalog.qc.dox.h:328
*hash< auto > options_add
Values to add to any "options" argument for record-based actions.
Definition DataProviderActionCatalog.qc.dox.h:362
*hash< string, hash< ActionOptionInfo > > options
Options that can be provided without a data provider.
Definition DataProviderActionCatalog.qc.dox.h:368
*string cls
The DataProvider class.
Definition DataProviderActionCatalog.qc.dox.h:356
*code get_dynamic_options
For the case when options should be generated dynamically.
Definition DataProviderActionCatalog.qc.dox.h:383
string action
The unique name for the action; unique in the application.
Definition DataProviderActionCatalog.qc.dox.h:310
Application information hash.
Definition DataProviderActionCatalog.qc.dox.h:33
string short_desc
A short description for the app, plain text formatting.
Definition DataProviderActionCatalog.qc.dox.h:43
data logo
The application logo.
Definition DataProviderActionCatalog.qc.dox.h:63
bool supports_messages
If the apps supports message actions.
Definition DataProviderActionCatalog.qc.dox.h:88
string desc
Description of the application with markdown formatting.
Definition DataProviderActionCatalog.qc.dox.h:46
string display_name
The display name for the application.
Definition DataProviderActionCatalog.qc.dox.h:40
*hash< auto > info
User-defined info about the app.
Definition DataProviderActionCatalog.qc.dox.h:127
bool dynamic
Was the application added dynamically?
Definition DataProviderActionCatalog.qc.dox.h:121
bool hidden
Should this app be hidden in the front end?
Definition DataProviderActionCatalog.qc.dox.h:124
bool supports_update
If the apps supports update actions.
Definition DataProviderActionCatalog.qc.dox.h:113
*string group
The application group, if any.
Definition DataProviderActionCatalog.qc.dox.h:52
string logo_mime_type
The mime type for logo.
Definition DataProviderActionCatalog.qc.dox.h:73
*string scheme
Connection scheme for the application.
Definition DataProviderActionCatalog.qc.dox.h:58
bool supports_events
If the apps supports event actions.
Definition DataProviderActionCatalog.qc.dox.h:78
string name
Unique application name.
Definition DataProviderActionCatalog.qc.dox.h:37
string legal
Any legal text, links, copyright notice(s), or disclaimer(s) related to the use of the app; markdown ...
Definition DataProviderActionCatalog.qc.dox.h:49
bool supports_find_single
If the apps supports find_single actions.
Definition DataProviderActionCatalog.qc.dox.h:98
string logo_file_name
The logo file name.
Definition DataProviderActionCatalog.qc.dox.h:66
bool supports_upsert
If the apps supports upsert actions.
Definition DataProviderActionCatalog.qc.dox.h:108
bool supports_apis
If the apps supports API actions.
Definition DataProviderActionCatalog.qc.dox.h:83
bool supports_create
If the apps supports create actions.
Definition DataProviderActionCatalog.qc.dox.h:103
bool supports_find
If the apps supports find actions.
Definition DataProviderActionCatalog.qc.dox.h:93
bool supports_delete
If the apps supports delete actions.
Definition DataProviderActionCatalog.qc.dox.h:118
DataProvider path var info.
Definition DataProviderActionCatalog.qc.dox.h:290
string desc
Action long description, markdown formatting.
Definition DataProviderActionCatalog.qc.dox.h:298
string display_name
The display name for the action.
Definition DataProviderActionCatalog.qc.dox.h:292
*string example_value
An optional example value for the option.
Definition DataProviderActionCatalog.qc.dox.h:301
string short_desc
Action short description, plain text formatting.
Definition DataProviderActionCatalog.qc.dox.h:295