View

@Description(value = "A saved view of the view engine: a record view, an analysis view or a dashboard")
class View(state: ViewState)

A saved view. It belongs to its tenant and its owner, which is its audience: the kernel refuses a command whose owner is not the view's, whose expected version is stale, or that addresses a deleted view; the view refuses one from another application as not found.

Sharing and claiming move the view to another owner in place: the view decides them and records the new audience, and ViewAudienceSaga transfers the owner (wow.lifecycle.TransferOwner), the only command that changes it. The service's authorizer keeps TransferOwner from HTTP callers, so an owner changes only through these rules.

A view of the owner (system) is a stored system view: it is global, so it is created under the tenant (platform) only, and it never moves audience. Who may write one is the service's authorizer's decision.

Constructors

Link copied to clipboard
constructor(state: ViewState)

Functions

Link copied to clipboard
suspend fun onClaim(command: Command<ClaimView>, references: SharedBoardReferences): ViewClaimed?

Makes a shared view personal to the operator who sends the claim, as the owner (shared): the kernel admits the command only for a view that owner holds. A personal view claimed by its own owner changes nothing; one of anyone else is not claimed. A view some shared dashboard shows stays shared.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Makes a personal view shared. A view already shared changes nothing, so its revision does not move: the 9.x route answered that case without a command for the same reason.