public interface PRSystemSettings
Dynamic System Settings
Dynamic values specific to this executing PRPC system that can be modified by configuration.
The ruleset name that 'owns' the setting is present to avoid name space conflicts in a multiple system environment. This name *should be set* to the name of the ruleset that contains the rule that creates/manages the setting.
These values are persisted in Data-Admin-System-Settings. the set() methods add an instance to this table. The remove() method deletes the named instance.
System Settings
System values specific to the server's 'production level' that are shipped as part of configuration.
These values are persisted in Rule-Admin-System-Settings, the key values in the database have one additional part in their keys which cannot be set in the request. That part in the name is the number of the production level that this value is visible for.
A request for "system/printer/postscript" would access the Rule record. The Rule record has an array of 5 entries representing each of the five "production levels" of the system. The appropriate one would be returned based on the production level of the system making the request:
The production level is set by the system name and the setting in Data-Admin-System for that system name. The set and remove methods cannot affect settings with the system/ top level node name.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT |
static java.lang.String |
VERSION |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
get(java.lang.String aOwningRuleset,
java.lang.String aKey)
returns a system setting's value, appropriate for the server's production level, by key.
|
int |
getCurrentEnvironmentLevel()
Get the current environment level for the system
|
java.lang.String |
getDynamic(java.lang.String aOwningRuleset,
java.lang.String aKey)
returns a dynamic setting's value by key.
|
java.lang.String |
getEnvironmentSetting(java.lang.String settingId,
java.lang.String category,
int envLevel)
API to get a environment setting value for given environment level.
|
java.lang.String |
getFSSetting(java.lang.String aName,
java.lang.String aDefault,
boolean aCheckIsDir,
boolean aCheckIsFile)
Get a (real) File System reference, using first a JNDI url lookup and then
using the value supplied in the configuration.
|
StringMap |
getSupportedEnvironmentLevels()
Return the supported environment levels by the current application.
|
java.lang.String |
lookupApplicationSetting(java.lang.String settingName,
java.lang.String owner,
java.lang.String envLevel) |
ClipboardPage |
lookupApplicationSettingPage(java.lang.String settingName,
java.lang.String owner)
Builder pattern based API to create new environment setting.
|
java.lang.String |
lookupEnvironmentSetting(java.lang.String settingName,
java.lang.String category,
StringMap additionalMetadataForKey)
Builder pattern based API to look up and load an existing environment setting.
|
java.lang.String |
normalizeDBSettingKey(java.lang.String aDBSettingKey)
Normalizes a key of the form 'prefix/<setting>/classification' by lower-casing the prefix and suffix and,
for 'prconfig' settings, normalizing the setting value according to the rules for prconfig settings.
|
boolean |
setDynamic(java.lang.String aOwningRuleset,
java.lang.String aKey,
java.lang.String aValue)
registers / replaces a dynamic setting key and its value.
|
static final java.lang.String VERSION
static final java.lang.String COPYRIGHT
java.lang.String get(java.lang.String aOwningRuleset, java.lang.String aKey)
aOwningRuleset
- name of the ruleset which 'owns' this keyaKey
- slash-separated path name similar to those specified in the prconfig.xml file.InvalidParameterException
- if the parameters are null or zero lengthjava.lang.String getDynamic(java.lang.String aOwningRuleset, java.lang.String aKey)
aOwningRuleset
- name of the ruleset which 'owns' this keyaKey
- slash-separated path name similar to those specified in the prconfig.xml file.InvalidParameterException
- if the parameters are null or zero lengthboolean setDynamic(java.lang.String aOwningRuleset, java.lang.String aKey, java.lang.String aValue)
aOwningRuleset
- name of the ruleset which 'owns' this keyaKey
- slash-separated path name similar to those specified in the prconfig.xml file.aValue
- the value to associate with this keytrue
if successful, false otherwiseInvalidParameterException
- if the parameters are null or zero lengthjava.lang.String normalizeDBSettingKey(java.lang.String aDBSettingKey) throws java.lang.IllegalArgumentException
aDBSettingKey
- A settings key of the form 'prefix/<setting>/classification'.java.lang.IllegalArgumentException
- If the provided key is null
or not of the format
'prefix/<setting>/classification'.java.lang.String getFSSetting(java.lang.String aName, java.lang.String aDefault, boolean aCheckIsDir, boolean aCheckIsFile)
aCheckIsDir
or aCheckIsFile
should be
set to true
, in which case the directory or file must exist prior to
calling this method.aName
- Name of the field to lookupaDefault
- default value to return if a value cannot be obtainedaCheckIsDir
- true
if the value must reference an existing directoryaCheckIsFile
- true
if the value must reference an existing fileStringMap getSupportedEnvironmentLevels()
int getCurrentEnvironmentLevel()
java.lang.String lookupEnvironmentSetting(java.lang.String settingName, java.lang.String category, StringMap additionalMetadataForKey)
settingName
- category
- additionalMetadataForKey
- empty string if no setting exists for given lookup keys.
-
getEnvironmentSetting
java.lang.String getEnvironmentSetting(java.lang.String settingId,
java.lang.String category,
int envLevel)
API to get a environment setting value for given environment level.
- Parameters:
settingId
-
category
-
envLevel
-
- Returns:
- setting value
-
lookupApplicationSettingPage
ClipboardPage lookupApplicationSettingPage(java.lang.String settingName,
java.lang.String owner)
Builder pattern based API to create new environment setting.
- Parameters:
settingName
-
category
-
label
-
ruleset
-
rulesetVersion
-
additionalMetadata
-
- Returns:
- environment setting handle
-
lookupApplicationSetting
java.lang.String lookupApplicationSetting(java.lang.String settingName,
java.lang.String owner,
java.lang.String envLevel)
Copyright © 2020 Pegasystems Inc. All Rights Reserved.