Skip to content

ClaimAppManager

ClaimAppManager is the abstract base class every claim-oriented application manager in the LegalMaintenance solution inherits from. It fixes the claim lifecycle template — establish context, retrieve the claim, evaluate confidentiality, retrieve screen data, and (on save) run inside a bracketed transaction — and provisions the Oracle claim data portal (ClaimDPI) that every downstream business object uses. It never writes SQL itself; claim retrieval and the security-override lookup are delegated to SAIF.BOF.Business.View.Claim.

Purpose

  • Owns the only supported entry points for binding a manager to a claim or worker (BR-CLM-001).
  • Fixes the context-change pipeline order (retrieve → security → screen data) (BR-CLM-003).
  • Provisions the Oracle claim data portal and pins the database user to CLM (BR-CLM-013).
  • Brackets every claim save inside exactly one transaction (BR-CLM-015, BR-CLM-016).
  • Supplies consistently-configured ancillary handles (imaging client, claim task generator) to every derived manager.

Context

  • Namespace: SAIF.Application.Claim
  • Assembly/package: SAIF.Application.Claim (embedded, ProjectReference)

Public members

Member Signature Purpose
New Public Sub New(inSecurityPrincipal As clsSecurityPrincipal) Only constructor; forwards the identity to AppManagerBase.New.
ApplicationTitle Public Overridable ReadOnly Property As String Composes the claim-screen header from the SAIF claim number and worker name, or returns empty when no valid claim is loaded (BR-CLM-021).
ClaimSecurity Public Overridable ReadOnly Property As ClaimSecurity Lazily builds the per-claim confidentiality evaluator bound to the current security principal.
ClaimImageApiClient Public ReadOnly Property As ImagingAPI.Client.ImagingClient Lazily builds an imaging API client from the imagingapiurl configuration setting, giving every derived manager the same imaging endpoint (BR-CLM-022).
ClaimData Public ReadOnly Property As clsClaimData The claim business object retrieved for the current context; Nothing until a context is set.
EmployeeData Public ReadOnly Property As clsEmployeeData Lazily resolves the employee record of the logged-in user, cached for the manager's lifetime.**
DPI(inKey) Public ReadOnly Property (Optional inKey As String = ClaimAppConstants.DPIClaimKey) As IDataPortalInfo Returns the Oracle data-portal handle for inKey, defaulting to the claim portal key ClaimDPI.
MailMessage Public Overridable Property As String Buffer for an outbound notification body composed by derived managers.*
Context Protected Overridable ReadOnly Property As ClaimContext Current claim/worker context values.
Tasks Protected Overridable ReadOnly Property As clsClaimTaskGenerator Task generator for claim-related task creation; Nothing until NewTaskGenerator runs.
ConfidentialAccessDeniedMessage Protected ReadOnly Property As String Composes the adjuster-referral denial text, falling back to the generic confidential-claim message (BR-CLM-011).
SetClaimContext Public Overridable Sub (inClaimNumber As String) / (inClaimID As Decimal) Establishes claim context by SAIF claim number or claim id and runs the full context-change pipeline (BR-CLM-001).
SetWorkerContext Public Overridable Sub (inWorkerID As Decimal) Establishes context by worker id and runs the context-change pipeline.
Retrieve Public Overrides Function As Boolean Runs OnRetrieve() when the context is valid; always returns False regardless of outcome (BR-CLM-020).
Write Public Overrides Function As Boolean Runs the transaction-bracketed save: begin transaction → OnWrite → commit/rollback (BR-CLM-015, BR-CLM-016).
ChangeContext Protected Overridable Sub Runs the fixed pipeline OnContextChanged → OnCheckSecurity → OnRetrieve (BR-CLM-003).
GetClaimData Protected Overridable Sub Retrieves clsClaimData by claim id or claim number depending on the context.
NewTaskGenerator Protected Sub (Optional inMultiClaim As Boolean = False) Creates a clsClaimTaskGenerator bound to the current claim or to multiple claims (BR-CLM-017).
SaveTasks Protected Overridable Function As Boolean Saves pending tasks; succeeds trivially when there are none (BR-CLM-018).
CheckForSecurityOverride Protected Function As Boolean Looks up a per-claim, per-user override grant via ClaimServices.HasOverrideAcess.
OnContextChanged Protected Overrides Sub Loads the claim for the new context and marks context set/not-set based on validity (BR-CLM-004).
OnCheckSecurity Protected Overrides Sub Evaluates claim confidentiality and applies the only hard-blocking rule (conflict access) (BR-CLM-005, BR-CLM-006).
OnValidContext Protected Overrides Function As Boolean Returns whether the context is set, access is not denied, and the claim is valid (BR-CLM-019).
OnInitialize Protected Overrides Sub Pins the database user to CLM and seeds the initial prompt message (BR-CLM-013).
OnCreateDataLayer Protected Overrides Sub Creates the Oracle claim data portal; wraps connection failures as ApplicationException (BR-CLM-014).
OnTransactionStart Protected Overrides Sub Begins a database transaction only when none is already pending (BR-CLM-015).
OnTransactionStop Protected Overrides Sub (inCommit As Boolean) Commits or rolls back the pending transaction (BR-CLM-016).

Members left abstract for derived managers: OnRetrieve() and OnWrite() (still MustOverride from AppManagerBase).*

Inherited public members

Members in this section are inherited from AppManagerBase in SAIF.Application. They are available on this type through inheritance.

Member Signature Purpose Origin
SecurityRole Public ReadOnly Property As AppSecurityRole Coarse access classification (NoAccess/ViewOnly/Updateable) set by MarkNoAccess/MarkViewOnly/MarkUpdate.† SAIF.Application — AppManagerBase
MarkViewOnly / MarkNoAccess / MarkUpdate Protected Sub Set the coarse security role used by IsUpdateable/IsViewOnly/IsRestricted.† SAIF.Application — AppManagerBase
Message Public Property As String User-facing status/error text surfaced by context and save operations.† SAIF.Application — AppManagerBase
SecurityPrincipal Protected ReadOnly Property As clsSecurityPrincipal The identity supplied at construction, used throughout claim security evaluation.† SAIF.Application — AppManagerBase

Behavioral notes

  • Security decisions are advisory: OnCheckSecurity can only downgrade access to ViewOnly or NoAccess; a derived manager must call MarkUpdate() itself to enable editing (BR-CLM-005).
  • OnCheckSecurity dereferences ClaimData without a null guard; whether a worker-only context or a failed GetClaimData can reach this path in production is unknown.**
  • Every hand-written type in this library is <Serializable()>, consistent with WebForms session/view-state persistence of manager state.*

Constraints and usage notes

  • Derived managers must implement OnRetrieve() and OnWrite(); this base class supplies no default screen-retrieval or persistence behavior.
  • Retrieve() always returns False; callers must inspect Message, ValidContext, or manager state to determine success (BR-CLM-020).

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. Statements marked with † were retrieved from dependency library documentation via the Legends CLI RAG service. They describe inherited behavior from the indicated origin library and should be verified if the dependency version changes.

Sources

  • SAIF.Application.Claim/ClaimAppManager.vb