Adaptive Framework
0.9.0
|
administrative adaptive functions.
const afw_value_t* afw_function_execute_extension_load | ( | afw_function_execute_t * | x | ) |
Adaptive Function extension_load
x | function execute parameter. |
Load an extension by its extension id if it is not already loaded. Loading an AFW package's manifest extension will register the manifest of all extensions in the package.
This function is not pure, so it may return a different result given exactly the same parameters and has side effects.
Declaration:
Parameters:
extension_id - (string) This is the object id of a /afw/_AdaptiveManifest_/ object.
Returns:
(boolean) If false the extension was already loaded. If true, the extension was successfully loaded which might have caused side effects such as environment registry changes. An error is thrown if there is a problem.
Definition at line 440 of file afw_function_administrative.c.
const afw_value_t* afw_function_execute_extension_load_by_module_path | ( | afw_function_execute_t * | x | ) |
Adaptive Function extension_load_by_module_path
x | function execute parameter. |
Load an extension by its module path. Loading an AFW package's manifest extension will register the manifest of all extensions in the package.
This function is not pure, so it may return a different result given exactly the same parameters and has side effects.
Declaration:
Parameters:
module_path - (string) This is the path to the dso containing the extension. If the extension is installed in the normal place, the library name without a file extension (.so) will suffice.
Returns:
(string) The extension id of the extension loaded.
Definition at line 496 of file afw_function_administrative.c.
const afw_value_t* afw_function_execute_flag_get_active | ( | afw_function_execute_t * | x | ) |
Adaptive Function flag_get_active
x | function execute parameter. |
Get a list of of the flagId of flags that are set in the current execution context (xctx).
This function is not pure, so it may return a different result given exactly the same parameters.
Declaration:
Parameters:
Returns:
(list string) This is a list of the flagId of flags that are set in the current execution context (xctx).
Definition at line 47 of file afw_function_administrative.c.
const afw_value_t* afw_function_execute_flag_get_active_defaults | ( | afw_function_execute_t * | x | ) |
Adaptive Function flag_get_active_defaults
x | function execute parameter. |
Get a list of the flagId of flags that are set by default when a new execution context (xctx) is created.
This function is not pure, so it may return a different result given exactly the same parameters.
Declaration:
Parameters:
Returns:
(list string) This is a list of the flagId of flags that are set by default when a new execution context (xctx) is created.
Definition at line 100 of file afw_function_administrative.c.
const afw_value_t* afw_function_execute_flag_get_defaults | ( | afw_function_execute_t * | x | ) |
Adaptive Function flag_get_defaults
x | function execute parameter. |
Get the list of the flagId of flags that are used to determine the default active flags when an execution context (xctx) is created. This list can contain the flagId of flags that have not yet been registered. Each of these flags and the flags they include are set as the active default flags.
This function is not pure, so it may return a different result given exactly the same parameters.
Declaration:
Parameters:
Returns:
(list string) This is a list of the flagId of flags used to determine the default active flags.
Definition at line 155 of file afw_function_administrative.c.
const afw_value_t* afw_function_execute_flag_modify_defaults | ( | afw_function_execute_t * | x | ) |
Adaptive Function flag_modify_defaults
x | function execute parameter. |
Add or remove flags from the list of the flagId of flags that are used to determine the default active flags when an execution context (xctx) is created. This list can contain the flagId of flags that have not yet been registered. These flags and the flags they include are set as the active default flags.
This change only lasts for the life of the current adaptive environment (e.g. until the adaptive server or afw command ends). If you want the change to persist, change the defaultFlags property in the application config.
This function is not pure, so it may return a different result given exactly the same parameters.
Declaration:
Parameters:
flagId - (list string) The flagId of flags to be added or removed.
add - (optional boolean) Specify true to add and false to remove flags. If not specified, flags are added.
Returns:
(null)
Definition at line 226 of file afw_function_administrative.c.
const afw_value_t* afw_function_execute_flag_replace_defaults | ( | afw_function_execute_t * | x | ) |
Adaptive Function flag_replace_defaults
x | function execute parameter. |
Completely replace the list of the flagId of flags that are used to determine the default active flags when an execution context (xctx) is created. This list can contain the flagId of flags that have not yet been registered. These flags and the flags they include are set as the active default flags.
This change only lasts for the life of the current adaptive environment (e.g. until the adaptive server or afw command ends). If you want the change to persist, change the defaultFlags property in the application config.
This function is not pure, so it may return a different result given exactly the same parameters.
Declaration:
Parameters:
flagId - (list string) The list of the flagId of flags used to determine the default active flags.
Returns:
(null)
Definition at line 311 of file afw_function_administrative.c.
const afw_value_t* afw_function_execute_flag_set | ( | afw_function_execute_t * | x | ) |
Adaptive Function flag_set
x | function execute parameter. |
Set or unset one or more active xctx (request) flags.
This function is not pure, so it may return a different result given exactly the same parameters.
Declaration:
Parameters:
flagId - (list string) List of flagId of flags to set or unset.
setTo - (optional boolean) Specify true to set and false to unset. If not specified, flags are set.
Returns:
(null)
Definition at line 358 of file afw_function_administrative.c.
const afw_value_t* afw_function_execute_registry_key_check | ( | afw_function_execute_t * | x | ) |
Adaptive Function registry_key_check
x | function execute parameter. |
This will check to see if a registry key exists for a specified registry type and optionally load it's associated extension if needed.
This function is not pure, so it may return a different result given exactly the same parameters and has side effects.
Declaration:
Parameters:
registryType - (string) This is the registry type, which is the object id of a /afw/_AdaptiveEnvironmentRegistryType_/ object.
key - (string) This is a key to check for existence in the specified registryType.
loadExtension - (optional boolean) Specifying true for this optional parameter will cause the associated extension to be loaded if needed.
Returns:
(boolean) If false the extension was already loaded. If true, the extension was successfully loaded which might have caused side effects such as environment registry changes. An error is thrown if there is a problem.
Definition at line 559 of file afw_function_administrative.c.
const afw_value_t* afw_function_execute_service_get | ( | afw_function_execute_t * | x | ) |
Adaptive Function service_get
x | function execute parameter. |
Get a service object.
This function is not pure, so it may return a different result given exactly the same parameters.
Declaration:
Parameters:
serviceId - (string) The serviceId of the service.
Returns:
(object AdaptiveService) AdaptiveService object for the service which will contain the current status of the service. If there is an error, the status property value will be "error" and "statusMessage" contain an error message.
Definition at line 638 of file afw_function_administrative.c.
const afw_value_t* afw_function_execute_service_restart | ( | afw_function_execute_t * | x | ) |
Adaptive Function service_restart
x | function execute parameter. |
Restart a service.
This function is not pure, so it may return a different result given exactly the same parameters and has side effects.
Declaration:
Parameters:
serviceId - (string) The serviceId of the service to restart.
Returns:
(object AdaptiveService) AdaptiveService object for the service which will contain the current status of the service. If there is an error, the status property value will be "error" and "statusMessage" contain an error message.
Definition at line 689 of file afw_function_administrative.c.
const afw_value_t* afw_function_execute_service_start | ( | afw_function_execute_t * | x | ) |
Adaptive Function service_start
x | function execute parameter. |
Start a service.
This function is not pure, so it may return a different result given exactly the same parameters and has side effects.
Declaration:
Parameters:
serviceId - (string) The serviceId of the service to start.
Returns:
(object AdaptiveService) AdaptiveService object for the service which will contain the current status of the service. If there is an error, the status property value will be "error" and "statusMessage" contain an error message.
Definition at line 742 of file afw_function_administrative.c.
const afw_value_t* afw_function_execute_service_stop | ( | afw_function_execute_t * | x | ) |
Adaptive Function service_stop
x | function execute parameter. |
Stop a service.
This function is not pure, so it may return a different result given exactly the same parameters and has side effects.
Declaration:
Parameters:
serviceId - (string) The serviceId of the service to stop.
Returns:
(object AdaptiveService) AdaptiveService object for the service which will contain the current status of the service. If there is an error, the status property value will be "error" and "statusMessage" contain an error message.
Definition at line 795 of file afw_function_administrative.c.