Module: alfresco/services/serviceRegistry

alfresco/services/serviceRegistry

Application-level registry for ensuring that only one service of each type can be registered using the same pubSubScope.
Since:
  • 1.0.32
Author:
  • Dave Draper
License:
Source:

Methods

register(id, pubSubScope) → {boolean}

This function should is called by the constructor of the BaseService to ensure that multiple instances of the extending service are not being created for the same pubSubScope. This can occur when a page contains multiple Surf Components that each render Aikau content. The function will return true if another instance of the same service has not been registered to use the same pubSubScope.
Parameters:
Name Type Description
id string The ID of the service
pubSubScope string The pubSubScope used by the service
Source:
Returns:
Indicates whether or not this service was the first with this ID and scope to be registered
Type
boolean