resolveAccessPolicies
fun resolveAccessPolicies(policies: List<AccessPolicy<*>>, hosted: Set<AggregateType>, aggregatesOf: (Class<*>) -> List<AggregateType>, declaring: Map<AggregateType, List<String>>, strict: Boolean = true): Map<AggregateType, AccessPolicy<*>>
The aggregate each of policies governs, as a node resolves them once, for its reads and its commands alike: the one it names, else the one of aggregatesOf its state type among the node's aggregates (hosted). It refuses, naming the policy or the aggregate:
a policy whose state is no aggregate's of the node (when strict, a node hosting every context of the service; otherwise such a policy is an aggregate's another node hosts, and is left out), or the state of several without naming one, or naming an aggregate whose state it is not;
two policies of one aggregate;
an aggregate of declaring, one of the node that declares access attributes (with their names), without a policy: nothing is granted by omission.