Module: caf_sharing/AggregateMap

AggregateMap links a set of Shared Maps so that a query return the values in any of them.

The set of maps is defined by a starting entry map and a well-known key in any map that links to other maps in the set. We compute the transitive closure to find this set.

The main use of AggregateMap is implementing linked local name spaces (SDSI) for authorization.

Source:

Methods

AggregateMap(firstMapName, findMap, linkKeyopt)

Constructor.

An object that links a set of Shared Maps. Queries return values in any of them.

Parameters:
Name Type Attributes Description
firstMapName string

Starting map name.

findMap function

A function with signature function(string, cbType) to return a map in the callback. The first argument to findMap is the map name.

linkKey string <optional>

Optional default link key. The default is __link_key__.

Source:

assemble(cb)

Scans the linked maps to create a consistent snapshot.

Parameters:
Name Type Description
cb cbType

A callback to return a reference to the snapshot. A snapshot implements a function getAll(key:string):Array.<Object> that finds all the values for a particular key in a collection of maps.

Source:

getMaps() → {Object}

Gets all the searched Shared Maps.

Source:
Returns:

An object with keys the names of the linked maps, and with values containing references to maps.

Type
Object