Skip to content

NavigationContext

NavigationContext is the presentation-layer entry point into the BOF Menu subsystem: constructing it for a given user loads the set of menu items that user is authorized to see, and its lookup methods resolve the currently-executing page's menu/authorization identity. It opens an Oracle BOF data connection scoped to a fixed MENU DB user and delegates the actual authorization query logic to SAIF.Business.Menu collection classes, which are out of scope for this library.

Purpose

  • Load and cache a user's authorized menu items on construction, enforcing BR-NC-001.
  • Resolve the current page's authorized menu item/page identity by application code, category, and link, preferring exact matches over fallback matches per BR-NC-002.
  • Cache application-code and menu-category lookups statically to avoid repeated data-layer round trips across requests.

Context

  • Namespace: SAIF.Presentation.Web.Core
  • Assembly/package: SAIF.Presentation.Web.Core.Infragistics103 (merged into SAIF.BOF.Presentation.Web.Infragistics103 NuGet package)

Public members

Member Signature Purpose
MenuAuthorizedItems Property MenuAuthorizedItems As clsMenuAuthorizedItemCollection Holds the set of menu items the constructed user is authorized to see; populated during construction.
ApplicationCodes ReadOnly Property ApplicationCodes As clsApplicationCodeCollection Returns the statically cached collection of active application codes, used to map a request's application path to an app code.
MenuCategories ReadOnly Property MenuCategories As clsMenuCategoryCodeCollection Returns the statically cached collection of menu category codes.
GetItemSeq Function GetItemSeq(inApplication As String, inCategory As String, inPageLink As String) As Decimal Returns the menu-item sequence number for the given application/category/link, or 0 if no match is found.
GetItem Function GetItem(inCategory As String, inLink As String, Optional inAnyApp As Boolean = False) As clsMenuAuthorizedItem Resolves the authorized menu item for the given category and link, optionally searching across all applications; returns Nothing if unresolved.
GetCurrentItem Function GetCurrentItem(inCategory As String) As clsMenuAuthorizedItem Resolves the authorized menu item for the current request's application/page, within the given category, preferring an exact match per BR-NC-002.
IsMenuItem Function IsMenuItem(inApplication As String, inItem As String) As Boolean Returns whether the given application/item combination exists as a resolvable menu page.
GetCurrentPage Function GetCurrentPage() As clsMenuAuthorizedItem Resolves the authorized menu item matching the current request's application and page link, preferring an exact match.
New() Protected Friend Sub New() Parameterless constructor available only within the assembly/derived types; leaves MenuAuthorizedItems unpopulated.
New(inUser) Public Sub New(inUser As String) Constructs the data layer connection, retrieves the portal info, and loads the authorized menu items for inUser, enforcing BR-NC-001.

Behavioral notes

  • The public constructor hardcodes the Oracle BOF data-layer connection to a fixed MENU DB user account, reading MENU_ENVIRONMENT from ConfigurationManager.AppSettings.
  • No branch/error handling is visible in the constructor; failures surface as unhandled exceptions from the data layer or SAIF.Business.Menu collection calls.
  • ApplicationCodes and MenuCategories are cached via Static local variables in private shared helper functions, so the first successful lookup persists for the process lifetime*.

Constraints and usage notes

  • Requires a MENU_ENVIRONMENT application setting to be present in the consuming application's own configuration file; this project has no web.config/app.config of its own.
  • GetItem/GetCurrentItem/GetCurrentPage all depend on HttpContext.Current.Request being available, so they are only usable within an active web request context.

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.Web.Core.Infragistics103\NavigationContext.vb