Qorus Integration Engine® Enterprise Edition 6.0.19_prod
Loading...
Searching...
No Matches
QorusSystemPropService Class Reference

system prop service More...

Inherits QorusSystemService.

Public Member Methods

int reload ()
 reload service method More...
 
auto get (string domain, softstring key)
 get service method More...
 
string update (string domain, softstring key, auto value)
 update service method More...
 
hash updateMany (hash hash)
 updateMany service method More...
 
string export (*softlist domains, softbool yaml=False)
 export service method More...
 
nothing import (string data, *softlist domains)
 import service method More...
 

Detailed Description

system prop service

Member Function Documentation

◆ export()

string QorusSystemPropService::export ( *softlist  domains,
softbool  yaml = False 
)
inline

export service method

Exports properties as an XML or YAML string (not a file). Attributes in the "qorus_properties" tag are only informational and are not used with prop.import(). The system domain "omq" is not exported.

Example XML output:

<?xml version="1.0" encoding="UTF-8"?>
<qorus_properties instance="quark-1" schema-version="3.1.0" schema-compatibility="3.1.0" schema-load-compatibility="3.1.0">
<domain1>
    <key1>value</key1>
    <key2>value</key2>
</domain1>
</qorus_properties>

Example YAML output:

{qorus_properties: {domain1: {key1: "value", key2: "value"},
^attributes^: {instance: "quark-1", schema-version: "3.1.0",
schema-compatibility: "3.1.0", schema-load-compatibility: "3.1.0"}}}
Parameters
domainsif this value is set, then only the domains listed are exported
yamlexport as YAML instead of XML if this parameter is True
Note
- type information is only preserved when exporting as a YAML string
Deprecated:
use REST API call GET /api/latest/system/props?action=export instead

◆ get()

auto QorusSystemPropService::get ( string  domain,
softstring  key 
)
inline

get service method

Parameters
domainif the domain name is not sent, then a hash of all system properties is returned
keyif the key is not sent, then a hash of all properties in the domain is returned
Deprecated:
use prop_get() GET /api/latest/system/props/{domain}/{key} instead

◆ import()

nothing QorusSystemPropService::import ( string  data,
*softlist  domains 
)
inline

import service method

Parameters
datathe XML or YAML string to import
domainsan optional list of domains to import
Deprecated:
use REST API call PUT /api/latest/system/props?action=import instead

◆ reload()

int QorusSystemPropService::reload ( )
inline

reload service method

Returns
the number of domains loaded
Deprecated:
use REST API call PUT /api/latest/system/props?action=reload instead

◆ update()

string QorusSystemPropService::update ( string  domain,
softstring  key,
auto  value 
)
inline

update service method

Updates the value of the property in the domain passed. If the property does not exist then it is created. If the value is NOTHING (i.e. if no value is supplied) then the property will be deleted. Changes are committed to the database and the internal cache before the method call returns. No changes may be made in the system "omq" domain.

Parameters
domainthe domain of the property to set
keythe key to set
valuethe value to set in the property
Returns
the action code, "INSERT", "UPDATE", "DELETE", "IGNORED" (if a non-existent key should be deleted)
Exceptions
PARAMETER-ERRORif the domain or key arguments are empty strings
PROP-ERRORserialized value exceeds 4000 bytes (column limit)
UPDATE-ERRORchanges attempted in the "omq" domain
Deprecated:
use prop_update() or PUT /api/latest/system/props/{domain}/{key}?action=set instead

◆ updateMany()

hash QorusSystemPropService::updateMany ( hash  hash)
inline

updateMany service method

Updates the values of the properties in the domain corresponding to the top level keys of the hash passed and the keys corresponding to the second-level keys in the hash according to the rules for the prop.update() method.

The method returns a hash with "INSERT", "UPDATE", "DELETE" and "IGNORED" keys having integer values corresponding to the number of operations performed (deleting a non-existent key or domain causes a "IGNORED" value to be returned).

All changes are made atomically in a single transaction.

Parameters
hashin the format domain.key.value for updating, inserting, or deleting
Returns
a hash of action codes as keys, with the values of each key being the number of actions of that type executed
Exceptions
PROP-ERRORserialized value exceeds 4000 bytes (column limit)
UPDATE-ERRORchanges attempted in the "omq" domain
Deprecated:
use prop_update() or PUT /api/latest/system/props/{domain}?action=updateMany instead

The documentation for this class was generated from the following file: