Load preferences for current user¶
This operation eagerly populates the in-memory preference cache for the currently authenticated data-portal user whenever a clsPreferences instance is constructed, establishing the Oracle connection context used for all subsequent reads and saves on that instance.
| Field | Value |
|---|---|
| Operation ID | OP-PREF-001 |
| Trigger | Constructing a clsPreferences instance via either public constructor |
| Inputs | inUserID (accepted but not used to filter the DB call — see step 2), inApplication |
| Outputs | A populated clsPreferences instance with _Preferences containing all Preference groups for the current portal user |
| Primary components | clsPreferences.Initialize, clsPreferences.Load |
| Entry point | SAIF.Presentation\clsPreferences.vb |
Steps¶
Initialize(inUserID, inApplication)setsm_Application = inApplicationand initializes_Preferencesto an empty list.Load()constructsclsMSOracleDataLayer("CLM", AppGlobal.EnvironmentService.GetConfigSetting(EnvironmentConfigKeys.OracleDatabase))and obtainsm_DPIvia.DataPortalInfo(). The constructor'sinUserIDparameter is not passed into this call — the user identity actually used ism_DPI.UserID(the data-portal's authenticated user context), not the passed-ininUserID* (BR-PREF-005).- On failure: no error handling exists around this construction; any exception from
clsMSOracleDataLayeror the environment service propagates uncaught to the caller. - Constructs
PreferenceData(m_DPI)and callsGetPreferencesForUser(m_DPI.UserID.Trim.ToLower()), assigning the result to_Preferences. - This step delegates to logic implemented in
SAIF.Framework.Preferences.PreferenceData, an external dependency library not present in this repository.
Origin: The retrieval SQL/BOF logic behind
GetPreferencesForUseris implemented inPreferenceData(SAIF.Framework.Preferences) and is out of scope for this library's analysis — its internal steps could not be traced here**. 4. No error handling wrapsLoad()as a whole; exceptions from the data layer propagate to the caller.
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([clsPreferences constructed]) --> S1[Initialize sets m_Application and empty _Preferences]
S1 --> S2[Load constructs clsMSOracleDataLayer with CLM user]
S2 --> S3[Obtain m_DPI via DataPortalInfo]
S3 --> S4[PreferenceData.GetPreferencesForUser m_DPI.UserID]
S4 --> EndOk([_Preferences populated])
Failure and edge-case behavior¶
- No error handling exists around
Load(); any exception fromclsMSOracleDataLayer, the environment service, orPreferenceData.GetPreferencesForUserpropagates uncaught to the constructor's caller. - The constructor's
inUserIDparameter is not used to filter the loaded data — the actual user context comes fromm_DPI.UserID, which may not match the caller's suppliedinUserID*.
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.
Related documentation¶
Sources¶
- SAIF.Presentation\clsPreferences.vb