Skip to content

SAIF.Presentation business rules

clsPreferences contains almost no explicit validation/business-rule logic; the rules below are implicit behavioral constraints inferred from code structure, not named/enforced business rules with an AddErrorMessage()-style validation pattern (that pattern was not found in this file).

BR-PREF-001: Preference scoping by application and page

Field Value
Statement A preference lookup is scoped by the combination of application name and page name (except WebLevel, which is page-agnostic).*
Trigger Any Item read or Add/Remove/Clear write.
Enforcement PageKey(scope) returns an empty string for non-PageLevel scopes; comparisons in Item/Add/Remove/Clear filter by (ApplicationName, Pagename).
Outcome Reads/writes only affect the matching application+scope group; cross-scope leakage does not occur by design.
Source SAIF.Presentation\clsPreferences.vb

BR-PREF-002: Preference key case normalization

Field Value
Statement Preference keys are always normalized to lower-case before storage or lookup.*
Trigger Any Add, Remove, or Item access.
Enforcement inKey.ToString().ToLower() performed uniformly in Add, all Item getters, and Remove.
Outcome Key comparisons and storage are case-insensitive from the caller's perspective.
Source SAIF.Presentation\clsPreferences.vb

BR-PREF-003: Save scoped to current application

Field Value
Statement Save() only persists preference groups belonging to the current application (m_Application), even though _Preferences may contain groups for other applications loaded for the same user.*
Trigger Calling Save().
Enforcement Save() iterates _Preferences and invokes SavePreferences only when pref.ApplicationName = m_Application.
Outcome Preference groups for other applications (loaded in the same user session) are never written back by this instance.
Source SAIF.Presentation\clsPreferences.vb

BR-PREF-004: Save() return value is unreliable

Field Value
Statement Save()'s boolean return value is not a reliable success indicator; it always returns False regardless of outcome.*
Trigger Any call to Save().
Enforcement Unreachable clsLogTrace.MethodEnd() and unset result variable in Save(), caused by the Return result statement executing before it.
Outcome Callers must not rely on Save()'s return value to detect failure; only a thrown ApplicationException signals a save error.
Source SAIF.Presentation\clsPreferences.vb

BR-PREF-005: Fixed Oracle database user

Field Value
Statement The Oracle database user backing all preference persistence is fixed to "CLM", independent of the calling application.*
Trigger Every Load() call (i.e., every clsPreferences construction).
Enforcement Hard-coded m_DBUserName = "CLM" field, used to construct clsMSOracleDataLayer.
Outcome All preference data across all consuming applications is stored/read under the same DB schema/user context.
Source SAIF.Presentation\clsPreferences.vb

Notes

  • These rules describe implicit behavioral constraints derived from code structure rather than named validation logic.

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • SAIF.Presentation\clsPreferences.vb