Skip to content

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

  1. Log method entry via clsLogTrace.MethodBegin(). Delegates to SAIF.Framework.Logging; the callee's own steps are not visible from this repository.**
  2. Store the application name and allocate an empty List(Of Preference) (BR-PRES-001).
  3. Construct clsMSOracleDataLayer with the hard-coded database user CLM and the database name returned by AppGlobal.EnvironmentService.GetConfigSetting(EnvironmentConfigKeys.OracleDatabase) (BR-PRES-002).
  4. This step delegates to the SAIF framework environment service and BOF data layer; their internal step sequences are not visible from this repository.**
  5. Obtain an IDataPortalInfo from the data layer (m_DAL.DataPortalInfo()). The portal supplies the effective UserID used for all subsequent reads and writes (BR-PRES-003).
  6. Construct PreferenceData(m_DPI) and call GetPreferencesForUser(m_DPI.UserID.Trim.ToLower()), storing the result in _Preferences (BR-PRES-004, BR-PRES-005).
  7. Delegates to SAIF.Framework.Preferences.PreferenceData.GetPreferencesForUser (package SAIF.BOF.Framework); the underlying data access is owned by that package and is not visible from this repository.**
  8. Note: the inUserID constructor argument is not used for the load — the user identity actually used is m_DPI.UserID from the data portal.
  9. Null the local PreferenceData reference 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.*

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