ILocator
pentaho.service. ILocator
The interface of service locator AMD/RequireJS loader plugins.
The service locator allows JavaScript components to declare dependency on other components in terms of the name of a logical service. Other modules that provide such logical service should register as such. See pentaho.service.locator
.
AMD Plugin Usage: "pentaho/service!{logical-module-name}?meta&single&ids"
{logical-module-name}
— the name of a required logical module.single
— if present, the module resolves as a single value, the first declared dependency.meta
— if present, the module resolves as an array where each member is an object with two properties,moduleId
andvalue
.ids
- if present, the module resolves as an array of the identifiers of the registered modules and does not load them; you can also use this module'spentaho.service.ILocator#getRegisteredIds
method, to be able to know the registered module ids synchronously.
Logical service type
There are no a priori constraints on the type of value of a logical service. When a logical service has a certain value type, that should be described in its documentation. More often than not, the value type can be precisely defined as an interface or class.
Currently, the plugin mechanism provides no assurances on the type of value of registered service provider modules. However, components requesting a logical module should trust that the provided dependencies respect any documented contract.
Source: doc-js/pentaho/service/ILocator.jsdoc, line 17
See also: pentaho.service.locator
Extends
Methods
Name | Description |
---|---|
getRegisteredIds(name) : Array.<<code>string > | Gets the identifiers of modules registered as dependencies of a given logical module. |
load(name, require, onLoad, config) | Loads a logical module given its name. |
normalize(name, normalize) : string | Normalizes the name of a logical module. |
Methods Details
getRegisteredIds(name) : Array.<<code>string > | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Gets the identifiers of modules registered as dependencies of a given logical module. Source: doc-js/pentaho/service/ILocator.jsdoc, line 54
|
load(name, require, onLoad, config) | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Loads a logical module given its name. Source: doc-js/pentaho/IAmdLoaderPlugin.jsdoc, line 45 Inherited From: IAmdLoaderPlugin#load
|
normalize(name, normalize) : string | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Normalizes the name of a logical module. Converts several names that refer to the same logical module to its canonical name, to ensure that the modules are recognized as being the same and are correctly cached. This is an optional method. Source: doc-js/pentaho/IAmdLoaderPlugin.jsdoc, line 59 Inherited From: IAmdLoaderPlugin#normalize
|