Skip to content

Internals Settings

Stefan Crkvenjakov edited this page Oct 7, 2026 · 1 revision

Settings internals

Framework Internals · Developer guide

Settings uses DatabaseManager to join awt_setting with package names, builds SettingModel objects and defines SETT_... constants containing those objects. Config computes a normalized constant name and returns the corresponding object or null. setValue writes the row directly and changes the object's current value.

Settings values are persisted as scalar strings in a VARCHAR column; value_type/category/required_permission_level are metadata, not automatic type conversion or enforced access checks. createSetting returns 0 if a package/name record exists. Repeated initSettings guards the wrong unprefixed name before defining SETT_..., so reinitialization can attempt duplicate constant definitions. Config normalizes hyphens while SettingModel only normalizes spaces. Use consistent names and initialize settings once during normal bootstrap.

Component reference

Clone this wiki locally