Construct and load a user's preferences¶
This operation runs on every clsPreferences construction path. It establishes an Oracle data portal for the fixed user CLM, then eagerly loads every stored preference record for the effective (data-portal) user into memory, so that subsequent reads incur no further database round trips.
| Field | Value |
|---|---|
| Operation ID | OP-PRES-001 |
| Trigger | Caller invokes New clsPreferences(inUserID, inApplication) or the three-argument overload |
| Inputs | inUserID, inApplication (the third preferencesRootDirectory parameter is accepted but ignored) |
| Outputs | A populated in-memory List(Of Preference) |
| Primary components | clsPreferences.New, clsPreferences.Initialize, clsPreferences.Load |
| Entry point | SAIF.Presentation/clsPreferences.vb |
Steps¶
- Log method entry via
clsLogTrace.MethodBegin(). Delegates toSAIF.Framework.Logging; the callee's own steps are not visible from this repository.** - Store the application name and allocate an empty
List(Of Preference)(BR-PRES-001). - Construct
clsMSOracleDataLayerwith the hard-coded database userCLMand the database name returned byAppGlobal.EnvironmentService.GetConfigSetting(EnvironmentConfigKeys.OracleDatabase)(BR-PRES-002). - This step delegates to the SAIF framework environment service and BOF data layer; their internal step sequences are not visible from this repository.**
- Obtain an
IDataPortalInfofrom the data layer (m_DAL.DataPortalInfo()). The portal supplies the effectiveUserIDused for all subsequent reads and writes (BR-PRES-003). - Construct
PreferenceData(m_DPI)and callGetPreferencesForUser(m_DPI.UserID.Trim.ToLower()), storing the result in_Preferences(BR-PRES-004, BR-PRES-005). - Delegates to
SAIF.Framework.Preferences.PreferenceData.GetPreferencesForUser(packageSAIF.BOF.Framework); the underlying data access is owned by that package and is not visible from this repository.** - Note: the
inUserIDconstructor argument is not used for the load — the user identity actually used ism_DPI.UserIDfrom the data portal. - Null the local
PreferenceDatareference and log method exit.
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([New clsPreferences]) --> S1[Log method entry]
S1 --> S2[Store application name, allocate empty list]
S2 --> S3[Construct clsMSOracleDataLayer with user CLM]
S3 --> S4[Obtain IDataPortalInfo]
S4 --> S5[PreferenceData.GetPreferencesForUser]
S5 --> S6[Store result in _Preferences]
S6 --> EndOk([In-memory preference set ready])
Failure and edge-case behavior¶
- No explicit error handling exists in
Load()itself; an exception from the data layer or the framework preference service propagates unhandled to the caller.*
Related documentation¶
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