AbstractModuleService

AbstractModuleService ⇐ Abstract

Kind: global abstract class
Extends: Abstract
Service:
Properties

NameTypeDescription
hasCornersBoolean

Flag that defines whether this module has corners or not

AbstractModuleService()

The module service is responsible to discover the modules, register and load them.

register(moduleName)

Register a module.

Kind: instance method of AbstractModuleService
Throws:

  • Will throw an error if the module is already registered or if input arg is wrong
ParamTypeDescription
moduleNameString

The moduleId to register

isModuleRegistered(moduleId) ⇒ boolean

Return true if the module has been registered

Kind: instance method of AbstractModuleService
Returns: boolean - true if registered

ParamTypeDescription
moduleIdString

The id of the module

load(moduleId) ⇒ * | CancelablePromise

Load the module

Kind: instance method of AbstractModuleService

ParamTypeDescription
moduleIdString

The id of the module

resolveModule(moduleId) ⇒ Promise.<Module>

Get module instance by id. Create the instance if not yet done (singleton pattern).

Kind: instance method of AbstractModuleService
Returns: Promise.<Module> - The instance of the module

ParamTypeDescription
moduleIdString

The id of the module, as defined by the @module annotation

getModuleById(moduleId) ⇒ Promise.<Module>

Get module instance by id. lazy-loading the instance, or provide the one already registered

Kind: instance method of AbstractModuleService
Returns: Promise.<Module> - The instance of the module
Throws:

  • Will throw an error if the module is not registered
ParamTypeDescription
moduleIdString

The id of the module, as defined by the @module annotation

getModuleIds() ⇒ Array.<String>

Return the list of module ids registered so far

Kind: instance method of AbstractModuleService
Returns: Array.<String> - An array of module ids

destroy()

Destroy the modules

Kind: instance method of AbstractModuleService

getSharedObject(type) ⇒ Object

Get shared objects of a certain type

Kind: instance method of AbstractModuleService

ParamType
typeString

getCornersSharedObject(type) ⇒ Object

Get shared objects of a certain type

Kind: instance method of AbstractModuleService

ParamType
typeString

__initializeCorners([options]) ⇒ Promise.<Array.<Module>>

Kind: instance abstract method of AbstractModuleService

ParamTypeDescription
[options]Object

Some options

[options.filter]function

_getCorners([options]) ⇒ Promise.<Array.<Module>>

Kind: instance abstract method of AbstractModuleService

ParamTypeDescription
[options]Object

Some options

[options.filter]function

_initialize() ⇒ Promise

Initialize all the modules registered so far.

Kind: instance method of AbstractModuleService
Returns: Promise - A promise resolved if all modules were successfully initialized, rejected otherwise
Emits: AbstractModule#event:initialized

_registerRoutes() ⇒ Promise

Register the routes declared in modules

Kind: instance method of AbstractModuleService
Returns: Promise - A promise resolved if all routes of all modules were successfully registered, rejected otherwise
Emits: AbstractModule#event:routesRegistered

_beforeShow() ⇒ Promise

Call the beforeShow extension points of all modules

Kind: instance method of AbstractModuleService

“loaded”

Fired when a module is loaded

Kind: event emitted by AbstractModuleService
Properties

NameTypeDescription
dataModule

The instance of the module