Home > Class Reference > %SYS namespace > %ZHSLIB.PackageManager.Developer.AbstractSettings

%ZHSLIB.PackageManager.Developer.AbstractSettings

abstract persistent class %ZHSLIB.PackageManager.Developer.AbstractSettings extends %Library.Persistent, %ZHSLIB.PackageManager.Core.Singleton, %ZHSLIB.PackageManager.Developer.IConfigurable

SQL Table Name: %ZHSLIB_PackageManager_Developer.AbstractSettings

Intended use case: If you want a configuration-related class of which there will be at most one instance, that has settings with names defined in code (not just magic strings, and possibly with default values) that are configurable via the "init" command in the Package Manager shell and the Package Manager > Configuration menu item, extend AbstractSettings and add some properties, and you get all that. The description of the settings is taken from the triple-slash documentation for them.

Property Inventory (Including Private)

Method Inventory (Including Private)

Parameters

parameter SETTINGS = ..GetSettingsParameterValue();
A delimited string in the format: Key:Description[|Key:Description...]

Properties (Including Private)

property Key as %String [ InitialExpression = "Settings" , Required , ReadOnly ];
Property methods: KeyCheck(), KeyDelete(), KeyDisplayToLogical(), KeyExists(), KeyGet(), KeyIsValid(), KeyLogicalToDisplay(), KeyLogicalToOdbc(), KeyNormalize(), KeyOpen(), KeySQLCheckUnique(), KeySQLExists(), KeySQLFindPKeyByConstraint(), KeySQLFindRowIDByConstraint()

Methods (Including Private)

private method %OnOpen() as %Status [ Language = objectscript ]
For properties without a defined value in data, automatically populates with the InitialExpression for that property. (Only handles properties in the default storage for the class.)
classmethod ClearSettingValue(pName As %String) as %Status [ Language = objectscript ]
Clears value of setting pName
classmethod GetSettingType(pName As %String) as %String [ Language = objectscript ]
Returns the datatype of a setting, as one of: boolean, string The default implementation is to always return "string"
classmethod GetSettingValue(pName As %String) as %String [ Language = objectscript ]
Clears value of setting pName
classmethod GetSettingsParameterValue() as %String [ Language = objectscript ]
Returns a list of all properties available as "settings" (for IConfigurable), along with their triple-slash comments as descriptions. Omits calculated, multidimensional, transient, and read-only properties.
classmethod SetSettingValue(pName As %String, pValue As %String) as %Status [ Language = objectscript ]
Sets setting pName to pValue. Should return an error %Status if pValue is invalid.
classmethod SettingIsDefined(pName As %String) as %Boolean [ Language = objectscript ]
Returns true if a value is defined for setting pName.

Indexes

index (Key on Key) [IdKey, Type = key, Unique];
Index methods: KeyCheck(), KeyDelete(), KeyDisplayToLogical(), KeyExists(), KeyGet(), KeyIsValid(), KeyLogicalToDisplay(), KeyLogicalToOdbc(), KeyNormalize(), KeyOpen(), KeySQLCheckUnique(), KeySQLExists(), KeySQLFindPKeyByConstraint(), KeySQLFindRowIDByConstraint()

Inherited Members

Inherited Properties (Including Private)

Inherited Methods (Including Private)

Subclasses

Feedback