tenantOf

open fun tenantOf(type: AggregateType, caller: Caller, target: TargetScope? = null): String

The tenant caller addresses an aggregate of type in, with the cross-scope target it may name (whether the caller may name one is checked apart): the type's fixed tenant, else the target's, else the caller's. A target that names another tenant than the type's fixed one is a TenantConflictException: it is refused, not ignored.