Service Layer medium complexity mobile
0
Dependencies
0
Dependents
6
Entities
0
Integrations

Description

Triggers a re-fetch of the tenant bootstrap endpoint after a context switch, supplying the new organization ID to reload the module registry, enabled feature set, home widgets, and navigation structure for the incoming tenant. Integrates with the Module Registry Service to apply the refreshed module set.

Feature: Profile Switching

bootstrap-refresh-service

Sources & reasoning

Profile switching is only meaningful if navigation and home content update to reflect the new tenant's enabled modules. A dedicated bootstrap refresh service cleanly separates the concern of reloading tenant configuration from the context state notifier, and matches the module registry pattern described in the architecture.

No source references — this artifact was included based on reasoning alone (see above).

Responsibilities

  • Call the REST API bootstrap endpoint with the newly active organization ID
  • Deliver the refreshed module registry and navigation structure to the Module Registry Service
  • Signal completion so the Context Switch Transition Overlay can be dismissed
  • Handle network failures gracefully with retry and fallback to the last cached bootstrap payload

Interfaces

refreshForOrganization(organizationId: String): Future<BootstrapPayload>
onBootstrapReady: Stream<BootstrapPayload>