Reference Source
public class | source

ServicesManager

Extends:

devapt-core-common/dist/js/base/errorable~ErrorablePluginsManagerFeaturesManager → ServicesManager

Services manager class for plugins managing.

Constructor Summary

Public Constructor
public

constructor(arg_log_context: string | undefined, arg_logger_manager: LoggerManager): nothing

Create a ServicesManager instance

Member Summary

Public Members
public

Method Summary

Public Methods
public

Get class name.

public

plugin_is_valid(arg_plugin: Plugin): boolean

Test if plugin is valid.

Inherited Summary

From class PluginsManager
public
public
public
private
public

enabled_plugin(arg_name: string): Plugin

Get a enabled plugin by its name.

public

error_already_registered(arg_plugin_name: string): nothing

Error wrapper - on registering an already registered plugin

public

error_not_registered(arg_plugin_name: string): nothing

Error wrapper - a plugin is not registered

public

Get class name.

public

get_plugins(): array

Get registered plugins list.

public
public

get_typed_plugins(arg_type_or_types: string | array): array

Get registered plugins list with a filtered type.

public

load(arg_plugins: array): nothing

Load a map of plugins.

public

load_at_first(arg_plugin: Plugin): nothing

Load plugin at first position

public

plugin(arg_name: string, arg_enabled: boolean): Plugin

Get a registered plugin by its name and its enabled flag.

public

register_plugin(arg_plugin: object, arg_position: integer): object

Register a plugin to be used later, do not active it now.

public

registered_plugin(arg_name: string): Plugin

Get a registered plugin by its name.

public

Unregister a registered plugin and disble it before if needed.

From class FeaturesManager
public

instances: {"all": *}

public
public

add_instance(arg_instance: object): nothing

Register an instance which is created outside this plugins manager.

public

create(arg_class_name: string, arg_name: string, arg_settings: object, arg_state: object): object

Create a feature instance by lookup on self contained plugins.

public

Get class name.

public

get_feature_class(arg_class_name: string): boolean

Get a feature class.

public

get_instance(arg_class_name: string, arg_name: string): object

Get an instance.

public

has(arg_class_name: string): boolean

Test if a feature class is known into self contained plugins.

public

has_instance(arg_class_name: string, arg_name: string): boolean

Has an instance?

public

remove_instance(arg_class_name: string, arg_name: string): nothing

Remove an instance.

Public Constructors

public constructor(arg_log_context: string | undefined, arg_logger_manager: LoggerManager): nothing source

Create a ServicesManager instance

Override:

FeaturesManager#constructor

Params:

NameTypeAttributeDescription
arg_log_context string | undefined

optional.

arg_logger_manager LoggerManager

logger manager object (optional).

Return:

nothing

Public Members

public is_service_manager: boolean source

Public Methods

public get_class(): string source

Get class name.

Override:

FeaturesManager#get_class

Return:

string

public plugin_is_valid(arg_plugin: Plugin): boolean source

Test if plugin is valid.

Params:

NameTypeAttributeDescription
arg_plugin Plugin

plugin instance.

Return:

boolean

given plugin is valid for this manager.