Open Exchange
Global Masters
Home / Class Reference / ENSLIB namespace / Ens.Config.DefaultSettings
Private  Storage   


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

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


Parameters Properties Methods Queries Indices ForeignKeys Triggers
2 8 13 1 1 3


%Concurrency Deployable Description HostClassName ItemName
ProductionName SettingName SettingValue

%%OIDGet %1Check %AddJrnObjToSyncSet %AddToSaveSet
%AddToSyncSet %BMEBuilt %BindExport %BuildIndices
%BuildIndicesAsync %BuildIndicesAsyncResponse %BuildIndicesSegment %BuildObjectGraph
%CheckConstraints %CheckConstraintsForExtent %ClassIsLatestVersion %ClassName
%ClearSettings %ClearStudioDocuments %Close %ComposeOid
%ConstructClone %Delete %DeleteExtent %DeleteId
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %DowngradeConcurrency
%ExecuteAfterTriggers %ExecuteBeforeTriggers %Exists %ExistsId
%Export %ExportStudioDocuments %Extends %FileIndices
%FileIndicesBuffered %GUID %GUIDSet %GetLock
%GetParameter %GetSetting %GetSwizzleObject %Id
%Import %ImportStudioDocuments %IncrementCount %InsertBatch
%IsA %IsModified %IsNull %JournalObject
%KillExtent %KillExtentData %LoadFromMemory %LockExtent
%LockId %New %NormalizeObject %ObjectIsNull
%ObjectModified %Oid %OnBeforeAddToSync %OnDetermineClass
%Open %OpenId %OriginalNamespace %PackageName
%PhysicalAddress %PurgeIndices %Reload %RemoveFromSaveSet
%ResolveConcurrencyConflict %RollBack %SQLAcquireLock %SQLAcquireTableLock
%SQLAfterTriggers %SQLBeforeTriggers %SQLBuildIndices %SQLBuildPurgeIndexForRow
%SQLBuildPurgeIndices %SQLCheckUnique %SQLCheckUniqueIndices %SQLCheckUniqueKeys
%SQLCopyIcolIntoName %SQLCopyNameIntoIcol %SQLCreateInsDelTables %SQLDefineiDjVars
%SQLDelete %SQLDeleteChildren %SQLDeleteTempStreams %SQLEExit
%SQLExists %SQLFKeyDelLock %SQLFastInsert %SQLFieldValidate
%SQLGetLock %SQLGetOld %SQLGetOldAll %SQLGetOldIndex
%SQLInsert %SQLInsertComputes %SQLInsertStreams %SQLInvalid
%SQLInvalid2 %SQLMVDelete %SQLMVIndexDelete %SQLMVIndexInsert
%SQLMVIndexUpdate %SQLMVInsert %SQLMVUpdate %SQLMissing
%SQLNormalizeCompFields %SQLNormalizeFields %SQLPurgeIndices %SQLQuickBulkInsert
%SQLQuickBulkLoad %SQLQuickBulkSave %SQLQuickBulkUpdate %SQLQuickDelete
%SQLQuickDeleteChildren %SQLQuickFindPKeyByRowID %SQLQuickFindRowIDByPKey %SQLQuickInsert
%SQLQuickLoad %SQLQuickLoadChildren %SQLQuickLogicalToOdbc %SQLQuickOdbcToLogical
%SQLQuickUpdate %SQLReleaseLock %SQLReleaseTableLock %SQLStorageValidation
%SQLTrigDelTab %SQLTrigInsTab %SQLUnlock %SQLUnlock2
%SQLUnlockError %SQLUnlockRef %SQLUpdate %SQLUpdateComputes
%SQLUpdateStreams %SQLValidateCompFields %SQLValidateFields %SQLicompView
%SQLnBuild %Save %SaveDirect %SaveIndices
%SerializeObject %SetModified %SortBegin %SortEnd
%SyncObjectIn %SyncTransport %UnlockExtent %UnlockId
%UpgradeConcurrency %ValidateIndices %ValidateObject %XMLGenerate
UpdateProductionModFlags XMLAfterExport XMLBeforeExport XMLDTD
XMLExport XMLExportInternal XMLExportToStream XMLExportToString
XMLGetSchemaImports XMLImport XMLImportInternal XMLIsObjectEmpty
XMLNew XMLSchema XMLSchemaNamespace XMLSchemaType
getTimestamp updateTimestamp


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";
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.


• property %DeployablePreModified as %Boolean [ Private,InitialExpression = 0,Transient ];
• property Deployable as %Boolean [ InitialExpression = 0 ];
Indicates whether this system default setting can be exported for deployment.
• property Description as %String(MAXLEN=2000,XMLNAME="description",XMLPROJECTION="attribute");
Optional description for this item.
• property HostClassName as %String(MAXLEN=255,XMLNAME="class",XMLPROJECTION="attribute") [ InitialExpression = "*" ];
Host class name.
• property ItemName as %String(MAXLEN=255,XMLNAME="item",XMLPROJECTION="attribute") [ InitialExpression = "*" ];
Host config name.
• property ProductionName as %String(MAXLEN=255,XMLNAME="production",XMLPROJECTION="attribute") [ InitialExpression = "*" ];
Production name.
• property SettingName as %String(MAXLEN=255,XMLNAME="setting",XMLPROJECTION="attribute") [ InitialExpression = "*" ];
Setting name.
• property SettingValue as %String(MAXLEN=2000,XMLNAME="value",XMLPROJECTION="attribute");
Setting value.


• 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:
	<item production="*" class="MyPkg.MyClass" name="MyName" setting="PortNumber" value="1961"/>
• 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 %Status
Ensure that we track changes to the production configuration. Update the timestamp for the settings whenever an entry is added or updated that is deployable.
• private method %OnBeforeSave(insert As %Boolean) as %Status
This callback method is invoked by the %Save method to provide notification that the object is being saved. It is called before any data is written to disk.

insert will be set to 1 if this object is being saved for the first time.

If this method returns an error then the call to %Save will fail.

• classmethod UpdateProductionModFlags(pProduction As %String = "*")
Update the flags that track modifications to production settings.
• classmethod getTimestamp() as %TimeStamp
Helper method for getting the timestamp of a settings table.
• classmethod updateTimestamp(pDeployable As %Boolean)
Helper method for updating the timestamp of a settings table.


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


•index (IdKey on ProductionName,ItemName,HostClassName,SettingName) [IdKey];


•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.