Skip to main content

Ens.Config.DefaultSettings

persistent class Ens.Config.DefaultSettings extends %Library.Persistent, %XML.Adaptor [ Final ]

SQL Table Name: Ens_Config.DefaultSettings

This class stores and provides an API for system-wide Production default settings.

Property Inventory

Method Inventory

Parameters

parameter XMLIGNOREINVALIDATTRIBUTE = 0;
Inherited description: The XMLIGNOREINVALIDATTRIBUTE parameter allows the programmer to control handling of unexpected attributes in the XML input. By default (XMLIGNOREINVALIDATTRIBUTE = 1), will ignore unexpected attributes. If XMLIGNOREINVALIDATTRIBUTE is set = 0, then an unexpected attribute will be treated as an error.
parameter XMLNAME = item;
Inherited description: This parameter provides the default XMLNAME for the class. If it is empty then the class name will be used to construct a default XML name. The default XMLNAME is used as the top level tag when exporting objects and the export context did not provide an XML container name.

Properties

property Deployable as %Boolean [ InitialExpression = 0 ];
Indicates whether this system default setting can be exported for deployment.
Property methods: DeployableDisplayToLogical(), DeployableGet(), DeployableGetStored(), DeployableIsValid(), DeployableLogicalToDisplay(), DeployableLogicalToXSD(), DeployableNormalize(), DeployableSet(), DeployableXSDToLogical()
property Description as %String (MAXLEN = 2000, XMLNAME = "description", XMLPROJECTION = "attribute");
Optional description for this item.
Property methods: DescriptionDisplayToLogical(), DescriptionGet(), DescriptionGetStored(), DescriptionIsValid(), DescriptionLogicalToDisplay(), DescriptionLogicalToOdbc(), DescriptionNormalize(), DescriptionSet()
property HostClassName as %String (MAXLEN = 255, XMLNAME = "class", XMLPROJECTION = "attribute") [ InitialExpression = "*" , Required ];
Host class name.
Property methods: HostClassNameDisplayToLogical(), HostClassNameGet(), HostClassNameGetStored(), HostClassNameIsValid(), HostClassNameLogicalToDisplay(), HostClassNameLogicalToOdbc(), HostClassNameNormalize(), HostClassNameSet()
property ItemName as %String (MAXLEN = 255, XMLNAME = "item", XMLPROJECTION = "attribute") [ InitialExpression = "*" , Required ];
Host config name.
Property methods: ItemNameDisplayToLogical(), ItemNameGet(), ItemNameGetStored(), ItemNameIsValid(), ItemNameLogicalToDisplay(), ItemNameLogicalToOdbc(), ItemNameNormalize(), ItemNameSet()
property ProductionName as %String (MAXLEN = 255, XMLNAME = "production", XMLPROJECTION = "attribute") [ InitialExpression = "*" , Required ];
Production name.
Property methods: ProductionNameDisplayToLogical(), ProductionNameGet(), ProductionNameGetStored(), ProductionNameIsValid(), ProductionNameLogicalToDisplay(), ProductionNameLogicalToOdbc(), ProductionNameNormalize(), ProductionNameSet()
property SettingName as %String (MAXLEN = 255, XMLNAME = "setting", XMLPROJECTION = "attribute") [ InitialExpression = "*" , Required ];
Setting name.
Property methods: SettingNameDisplayToLogical(), SettingNameGet(), SettingNameGetStored(), SettingNameIsValid(), SettingNameLogicalToDisplay(), SettingNameLogicalToOdbc(), SettingNameNormalize(), SettingNameSet()
property SettingValue as %String (MAXLEN = 2000, XMLNAME = "value", XMLPROJECTION = "attribute");
Setting value.
Property methods: SettingValueDisplayToLogical(), SettingValueGet(), SettingValueGetStored(), SettingValueIsValid(), SettingValueLogicalToDisplay(), SettingValueLogicalToOdbc(), SettingValueNormalize(), SettingValueSet()

Methods

classmethod %ClearSettings(pProduction As %String = "")
Delete the contents of the Default Settings table.
If pProduction is provided then just clear settings for this production, otherwise clear all settings.
classmethod %ClearStudioDocuments(ByRef pIDsToKeep As %String = "")
Delete the deployable contents of the Default Settings table which are projected as one Studio document.
If pIDsToKeep array is passed in where the subscript is the settings id then those settings will not be deleted.
classmethod %Export(pFileName As %String = "", pProductionName As %String = "", pDeployable As %Boolean = "") as %Status
Export Default Settings data to file pFileName. If pProductionName is provided, then only export data that refers to this production.
If pDeployable is not defined, then export both Deployable and non Deployable. This is the default
If pDeployable is set to True, then only export data that is marked as Deployable.
If pDeployable is set to False, then only export data that is marked as not Deployable.
classmethod %ExportStudioDocuments(pStream As %String = "") as %Status
Export Default Settings that are deployable to stream pStream.
classmethod %GetMatchCriteria(pProductionName As %String, pItemName As %String, pHostClassName As %String, pTargetType As %String, pSettingName As %String, Output pMatchList As %String) as %Boolean
Method to identify the Default Settings ID Key constituent values for a match using %GetSetting.
classmethod %GetSetting(pProductionName As %String, pItemName As %String, pHostClassName As %String, pTargetType As %String, pSettingName As %String, Output pValue As %String) as %Boolean
Look up a setting value from the Default Settings table given the production name, class name, configured name, and setting property name.
Returns a boolean to indicate if the given setting is found or not. On return, pValue will contain the value of the setting if the setting is found.
classmethod %Import(pFileName As %String = "", Output pCount As %Integer, ByRef pIDsImported As %String = "") as %Status
Import Default Settings data from the xml file pFileName.
Lookup data is in the form:
  <defaultSettings>
  <item production="*" item="MyName" class="MyPkg.MyClass" setting="PortNumber" value="1961"/>
  </defaultSettings>
  
classmethod %ImportStudioDocuments(pStream As %String = "") as %Status
Import method for rows projected in studio document and then remove those that weren't imported after.
classmethod UpdateProductionModFlags(pProduction As %String = "*")
Update the flags that track modifications to production settings.

Queries

query EnumerateSettings()
SQL Query:
SELECT ID,ProductionName,ItemName,HostClassName,SettingName,SettingValue,Deployable FROM DefaultSettings

Indexes

index (IdKey on ProductionName,ItemName,HostClassName,SettingName) [IdKey, Type = key];
Index methods: IdKeyCheck(), IdKeyDelete(), IdKeyExists(), IdKeyOpen(), IdKeySQLCheckUnique(), IdKeySQLExists(), IdKeySQLFindPKeyByConstraint(), IdKeySQLFindRowIDByConstraint()

Triggers

trigger AuditChange (BEFORE event INSERT/UPDATE/DELETE);
trigger OnChange (AFTER event INSERT/UPDATE/DELETE);
Ensure that SQL updates to the Default Settings are tracked.
trigger OnDelete (AFTER event DELETE);
Update the timestamp whenever a deployable row is removed from a table.
trigger OnModify (AFTER event INSERT/UPDATE);
Update the timestamp for the settings whenever an entry is added or updated that is deployable.

Inherited Members

Inherited Methods

Storage

Storage Model: Storage (Ens.Config.DefaultSettings)

^Ens.Config.DefaultSettingsD(ID)
=
SettingValue
Description
Deployable
FeedbackOpens in a new tab