Skip to content

ClaimContext

ClaimContext is an immutable-after-construction value object owned by ClaimAppManager that represents "what claim/worker is currently in scope" — it holds the claim ID, claim number, worker ID, and a context-set flag, and is the input that drives claim retrieval and security enforcement whenever it changes.

Purpose

  • Represent the current claim/worker context boundary as a small, immutable value object, decoupling context state from the orchestration logic in ClaimAppManager.
  • Provide the ContextSet flag consumed by ClaimAppManager.ChangeContext() to decide whether to run OnCheckSecurity()/OnRetrieve().

Context

  • Namespace: SAIF.Application.Claim
  • Assembly/package: SAIF.Application.Claim

Public members

Member Signature Purpose
New() Public Sub New() Constructs an empty/unset context.
New(inClaimID, inWorkerID) Public Sub New(inClaimID As Decimal, inWorkerID As Decimal) Constructs a context scoped to a specific claim ID and/or worker ID, used by SetClaimContext(inClaimID)/SetWorkerContext.
New(inClaimNumber) Public Sub New(inClaimNumber As String) Constructs a context scoped to a specific claim number, used by SetClaimContext(inClaimNumber).
ContextSet Public ReadOnly Property ContextSet As Boolean Indicates whether the context has been successfully established; gates whether ChangeContext() proceeds to security enforcement and retrieval.
ClaimID Public ReadOnly Property ClaimID As Decimal The claim ID in scope, used by GetClaimData() to retrieve claim data by ID.
ClaimNumber Public ReadOnly Property ClaimNumber As String The claim number in scope, used by GetClaimData() to retrieve claim data by number.
WorkerID Public ReadOnly Property WorkerID As Decimal The worker ID in scope, set via SetWorkerContext.

Behavioral notes

  • Serializable (<Serializable> attribute), consistent with its role as a lightweight, transferable value object across the application-manager boundary*.
  • Immutable after construction — all properties are read-only, with values set only via the constructors.

Sources

  • SAIF.Application.Claim\ClaimContext.vb