clsOnlineContext¶
clsOnlineContext is a clsContext specialization dedicated to the "Online" SAIF application: its constructor fixes ApplicationName to the literal "Online" and requires the caller to supply an already-established clsSecurityPrincipal, rather than relying on clsControllerBase.SecurityCheck to establish one. It also exposes a Shadows-declared savecontext wrapper around the inherited SaveContext, making that otherwise Protected Friend operation callable as a public method on this type.
Purpose¶
- Provides a ready-made context for the "Online" application that does not need
ApplicationNameset separately by the controller. - Accepts a pre-established security principal directly through its constructor, for callers that already have one rather than going through the standard
SecurityCheckpipeline. - Publicly exposes context persistence (
savecontext) so callers with aclsOnlineContextreference can trigger a save without going through aclsControllerBase.Navigatecall.
Context¶
- Namespace:
SAIF.Presentation.Web.MVC* - Assembly/package:
SAIF.Presentation.Web.MVC
This type inherits from clsContext, a local type in this same library (see clsContext); the members below include both its own new members and, per the self-containment rule, the complete inherited public surface it gains from clsContext.
Public members¶
| Member | Signature | Purpose |
|---|---|---|
New |
Public Sub New(ByVal inSecPrinc As clsSecurityPrincipal) |
Constructs the context with the given security principal and ApplicationName fixed to "Online" |
savecontext |
Public Shadows Sub savecontext(ByVal inSessionID As String) |
Publicly callable wrapper that calls the inherited (Protected Friend) SaveContext(inSessionID); see Persist context rows |
claimId (inherited) |
Public Property claimId() As Decimal |
Well-known context field carrying the current claim identifier |
policyNum (inherited) |
Public Property policyNum() As Integer |
Well-known context field carrying the current policy number |
SAIFClaimNum (inherited) |
Public Property SAIFClaimNum() As String |
Well-known context field carrying the SAIF-formatted claim number |
ProviderLocationSeqNum (inherited) |
Public Property ProviderLocationSeqNum() As Integer |
Well-known context field carrying a provider location sequence number |
SecurityPrincipal (inherited) |
Public Property SecurityPrincipal() As clsSecurityPrincipal |
The identity carried by this context; fixed at construction time by clsOnlineContext.New but still settable afterward through the inherited property |
UserName (inherited) |
Public ReadOnly Property UserName() As String |
Legacy accessor for the current user's name, derived from SecurityPrincipal |
UserID (inherited) |
Public ReadOnly Property UserID() As String |
Returns SecurityPrincipal.UserName.ToUpper(), or an empty string when no principal is set |
GetContext (inherited) |
Public Function GetContext(ByVal key As String) As String |
Reads a generic named context value previously set with SetContext |
SetContext (inherited) |
Public Sub SetContext(ByVal key As String, ByVal value As String) |
Writes a generic named context value into the in-memory context bag |
Behavioral notes¶
- Because the constructor sets
ApplicationNameto the fixed literal"Online"(viaMyBase.ApplicationName, bypassing theFriendsetter restriction from within the base class itself), any code holding aclsOnlineContextnever needs to set the application name separately. savecontextis declaredShadowsrather thanOverrides— it does not override a virtual member, it introduces a new public member with the same base name but different casing/accessibility that hides the inheritedProtected Friend SaveContextfrom consumers using the derived type's static type.
Constraints and usage notes¶
- Because the base class's
ApplicationNamesetter isFriend, external code cannot reassign the fixed"Online"application name on an existingclsOnlineContextinstance from outside this assembly.
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.Web.MVC/clsOnlineContext.vb
- SAIF.Presentation.Web.MVC/clsContext.vb