SAIF.Business.View.Policy overview¶
Documentation context: Packaged Component (NuGet)
SAIF.Business.View.Policy is the read side of the policy domain. It assembles a policy header and everything that hangs off it — agency, addresses, policy periods, staff assignments, trading-as names, affiliated policies, and policy-to-policy associations — into aggregates that claim-facing and policy-facing applications can consume without writing SQL. It also owns the decision about whether the signed-in principal is allowed to see a given policy at all. The library has no write path: every type is retrieved through a shared factory method and is read-only thereafter.
Purpose¶
- Provide read-optimised policy aggregates to consuming applications, composing child objects lazily so that a caller pays only for the parts of a policy it touches.
- Decide, for the current security principal, whether a policy may be viewed and which policies make up that principal's permitted list.
- Ship as the
SAIF.BOF.Business.View.PolicyNuGet package, consumed by application and orchestration layers such asSAIF.Application.Policy.
Responsibilities¶
- Retrieve the policy header and its lazily loaded detail, including waiver existence (Retrieve policy header, Lazy-load policy detail).
- Resolve policy-to-policy associations through two coexisting subsystems: the legacy inline-SQL association list and the newer, code-table-driven association type model (Resolve policy associations, Resolve policy-header associations).
- Apply data-level policy authorization for every external audience — agents, policyholders, groups, loss-control consultants, and auditors (Authorize a policy for the current user, Build the permitted policy list).
- Supply the supporting aggregates a policy view needs: agency and agent contact, addresses, policy periods, team assignments, trading-as names, and non-employer accounts (Retrieve supporting policy aggregates).
- Mask policy, agency, and address detail for demonstration accounts, so masking cannot be bypassed by reading an aggregate directly (BR-013).
Key components¶
clsPolicyData: the central read-only policy header aggregate and the entry point for nearly every read in the library.clsPolicySecurity: the only authorization class; owns the per-policy access decision and the permitted policy list.clsAgency,clsPolicyAddress,clsPolicyPeriod(Collection),clsTeamAssignment(Collection),clsTradingAs(Collection),clsNonEmployerAccount: independent read-only supporting aggregates.PolicyAssociationListandPolicyAssociationExtensions: the legacy inline-SQL association subsystem.clsAssociationTypeCode,clsAssociationTypeFactory,clsPolicyHeaderAssociationFactory: the code-table-driven association subsystem that supersedes it.PolicyStatusEnums,AssociationTypes,clsPolicyData.UserAccessLevels: the vocabularies consumers compare against instead of raw codes.
Scope notes¶
- Configuration is minimal but architecturally significant: three settings configure a second, non-Oracle SQL Server data store used by the authorization path. See Configuration.
- Six
.vbfiles in the project folder are excluded from the<Compile>item group and are not part of the shipped assembly:clsMCOCollection.vb,clsPolicyMCO.vb,clsPolicyMCOCollection.vb,clsPayrollClassInfo.vb,clsPayrollClassInfoCollection.vb, andclsPolicySearch.vb. They are not documented as part of the public API surface. - The
Institutionstyped dataset is generated fromInstitutions.xsdand has no call site in this library.**
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.
Related documentation¶
- Index
- Architecture
- Dependencies
- Operations and processes
- Business rules
- Security and authorization
- Database tables
- SQL catalog
- Procedures
- API reference
Sources¶
Business/SAIF.Business.View.Policy/SAIF.BOF.Business.View.Policy.vbprojBusiness/SAIF.Business.View.Policy/SAIF.BOF.Business.View.Policy.nuspecBusiness/SAIF.Business.View.Policy/clsPolicyData.vbBusiness/SAIF.Business.View.Policy/clsPolicySecurity.vb