AppManagerBase is the abstract lifecycle base every application manager in the solution (e.g. ClaimAppManager, and transitively LegalManagerBase and the LegalNet managers) inherits from clsBusinessBase. It owns identity binding, a lazily built data layer keyed to the authenticated user, the deny-by-default access classification, a de-duplicated message buffer, and the MustOverride extension points (OnInitialize, OnCreateDataLayer, OnCheckSecurity, OnValidContext, OnRetrieve, OnWrite, OnTransactionStart, OnTransactionStop) that derived managers must implement to complete the construct → initialize → validate-context → check-security → retrieve/write lifecycle.
Guarantees every manager instance is bound to a clsSecurityPrincipal at construction time, since the only constructor requires one (BR-APP-001).
Enforces deny-by-default access classification through a private, Mark*-only-writable AppSecurityRole field (BR-APP-002, BR-APP-003).
Lazily provisions a per-manager ApplicationDataAccess data layer using the authenticated user's name as the DB client id (BR-APP-007).
Accumulates de-duplicated user-facing messages with a swappable line separator for web vs. console rendering (BR-APP-005, BR-APP-010).
Declares the MustOverride contract for context validation, security evaluation, retrieve/write, and transaction bracketing, leaving all domain-specific implementation to derived managers (BR-APP-006).
Protected members (available to derived managers)¶
Member
Signature
Purpose
SecurityPrincipal
Protected ReadOnly Property As clsSecurityPrincipal
Caller-supplied identity used for authorization decisions and as the data-layer client id; not exposed publicly, so only derived managers (e.g. LegalManagerBase) can reach it directly.
DataLayer
Protected ReadOnly Property As ApplicationDataAccess
Lazily creates New ApplicationDataAccess(SecurityPrincipal.UserName.ToString) on first access (BR-APP-007).
ContextSet
Protected ReadOnly Property As Boolean
Whether business context (claim, case, etc.) has been supplied and validated.
AppendMessageLines
Protected Sub (IEnumerable(Of String)) / (String()) / (String)
Appends message lines, skipping empty text and duplicates (BR-APP-005).
MarkContextNotSet / MarkContextSet
Protected Sub
Toggle the context-validated flag read by ContextSet.
MarkUpdate / MarkViewOnly / MarkNoAccess
Protected Sub
The only writers of the access classification; called by a derived manager after evaluating security (BR-APP-003).
Initialize
Protected Sub
Template method: calls OnInitialize() then OnCreateDataLayer(), in that fixed order.
New
Protected Sub New(inSecurityPrincipal As clsSecurityPrincipal)
Only constructor; a manager cannot exist without an identity (BR-APP-001).
InjectDPI
Protected Sub (inKey As String, inDPI As IDataPortalInfo)
Registers an externally created data-portal handle under inKey in the data layer's DPI registry.
OnInitialize, OnCreateDataLayer, OnContextChanged, OnCheckSecurity, OnTransactionStart, OnTransactionStop(inCommit As Boolean)
Protected MustOverride Sub
Extension points every concrete manager must implement; OnCheckSecurity and OnContextChanged are declared but never invoked from within this library.
OnRetrieve, OnWrite, OnValidContext
Protected MustOverride Function As Boolean
Derived read/write/context-validation implementations backing Retrieve, Write, and ValidContext.
No parameterless constructor exists; a manager cannot be created without a clsSecurityPrincipal (BR-APP-001).
Field initializers set m_AppSecurityRole = NoAccess, m_ContextSet = False, m_Message = String.Empty, m_NewLineCharacter = "<BR>" at construction, establishing deny-by-default and empty-message state before Initialize() runs.
OnCheckSecurity() and OnContextChanged() are declared but never called from within this library — a derived manager that never calls OnCheckSecurity stays at NoAccess (fail-closed) but also never grants access.*
System.Web is referenced by the project and <BR> is the default message separator, so the message helpers are HTML-aware by convention even though this type has no compile-time UI dependency.*
SecurityRole and the derived Is* properties are read-only; the only way to change classification is through MarkUpdate / MarkViewOnly / MarkNoAccess, so no external caller can elevate its own rights (BR-APP-003).
Retrieve() and Write() are MustOverride; this type supplies no default read/write behavior — the reference implementation lives in SAIF.Application.Claim/ClaimAppManager.vb.
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.