Skip to content

SAIF.Presentation operations and processes

This page is the operation catalog and cross-operation hub for this library. Each operation's detailed, step-by-step logic lives in its own page under operations/. SAIF.Presentation issues no SQL of its own — all persistence is delegated to SAIF.Framework.Preferences.PreferenceData in the SAIF.BOF.Framework package, so the Rules column below is the only cross-reference column populated for this library.

Operation catalog

Operation Intent Trigger Inputs Outputs Rules
Construct and load a user's preferences Load every stored preference for a user and application into memory A consuming application creates a preference store for the signed-in user inUserID, inApplication A populated in-memory List(Of Preference) BR-PRES-001, BR-PRES-002, BR-PRES-003, BR-PRES-004, BR-PRES-005
Read a preference value Look up a single preference item by key, scope, or explicit application/page Consuming code indexes into the preference store Key (and optionally scope, or explicit application + page) The stored value, or Nothing when not found BR-PRES-006, BR-PRES-007, BR-PRES-008, BR-PRES-009, BR-PRES-010, BR-PRES-011, BR-PRES-012
Add or update a preference value Upsert a preference item into the in-memory set Consuming code stores a preference (for example, a saved grid layout) Key, value, optional PrefScope (defaults to PageLevel) Mutated in-memory Preference record BR-PRES-006, BR-PRES-007, BR-PRES-013, BR-PRES-014, BR-PRES-015
Remove, clear, or delete preferences Reset a single preference, a scope, or all preferences in memory Consuming code resets a single preference, a scope, or all preferences Key and/or scope Mutated in-memory Preference records BR-PRES-006, BR-PRES-007, BR-PRES-016, BR-PRES-017, BR-PRES-018, BR-PRES-019
Persist preferences Serialize and persist in-memory preferences through the framework preference service Consuming code finishes a batch of Add / Remove / Clear calls The in-memory _Preferences list, m_DPI Persisted preference records; always returns False BR-PRES-020, BR-PRES-021, BR-PRES-022, BR-PRES-023, BR-PRES-024

Process flow diagram

The following diagram visualizes the primary operational flow across operations.

flowchart TD
    Start([Construct clsPreferences]) --> Load[Load all preferences for user]
    Load --> Ready[In-memory Preference set ready]
    Ready --> Read[Item: read a value]
    Ready --> Add[Add: upsert a value]
    Ready --> RemoveClear[Remove / Clear / Delete]
    Add --> Save[Save: persist to framework]
    RemoveClear --> Save
    Save --> Decision{PreferenceData.SavePreferences succeeds?}
    Decision -->|Yes| EndOk([Preferences persisted])
    Decision -->|No| EndErr([ApplicationException thrown])

Failure and edge-case behavior

  • A Nothing key passed to Item, Add, or Remove is a silent no-op rather than an error (BR-PRES-006).
  • If persistence fails inside PreferenceData.SavePreferences, the exception is wrapped and re-thrown as ApplicationException("Unable to save preferences.", ex) (BR-PRES-024).
  • Save() always returns False, even when persistence succeeds, because the result local is never assigned True — callers cannot rely on the return value to detect success or failure.*

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.

Sources

  • SAIF.Presentation/clsPreferences.vb