Home > Class Reference > ENSLIB namespace > Ens.Config.DefaultSettings

Ens.Config.DefaultSettings

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

SQL Table Name: Ens_Config.DefaultSettings

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

Property Inventory (Including Private)

Method Inventory (Including Private)

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 (Including Private)

property %DeployablePreModified as %Boolean [ Private , InitialExpression = 0 , Transient ];
Property methods: %DeployablePreModifiedDisplayToLogical(), %DeployablePreModifiedGet(), %DeployablePreModifiedIsValid(), %DeployablePreModifiedLogicalToDisplay(), %DeployablePreModifiedLogicalToXSD(), %DeployablePreModifiedNormalize(), %DeployablePreModifiedSet(), %DeployablePreModifiedXSDToLogical()
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 (Including Private)

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 %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="*" class="MyPkg.MyClass" name="MyName" 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.
private classmethod %OnAfterDelete(oid As %ObjectIdentity) as %Status
Ensure we track changes to the production configuration. Update the timestamp whenever a deployable row is removed from a table.
private method %OnAfterSave(insert As %Boolean) as