Reference Source
public class | source

FeaturesManager

Extends:

devapt-core-common/dist/js/base/errorable~ErrorablePluginsManager → FeaturesManager

Constructor Summary

Public Constructor
public

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

Create a features manager instance.

Member Summary

Public Members
public

instances: {"all": *}

public

Method Summary

Public Methods
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.

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.

Public Constructors

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

Create a features manager instance.

Override:

PluginsManager#constructor

Params:

NameTypeAttributeDescription
arg_log_context string | undefined

optional.

arg_logger_manager LoggerManager

logger manager object (optional).

Return:

nothing

Public Members

public instances: {"all": *} source

public is_features_manager: boolean source

Public Methods

public add_instance(arg_instance: object): nothing source

Register an instance which is created outside this plugins manager.

Params:

NameTypeAttributeDescription
arg_instance object

feature instance.

Return:

nothing

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

Create a feature instance by lookup on self contained plugins.

Params:

NameTypeAttributeDescription
arg_class_name string

type or class feature name.

arg_name string

feature name.

arg_settings object

feature settings plain object.

arg_state object

feature initial state plain object (optional).

Return:

object

feature instance.

public get_class(): string source

Get class name.

Override:

PluginsManager#get_class

Return:

string

public get_feature_class(arg_class_name: string): boolean source

Get a feature class.

Params:

NameTypeAttributeDescription
arg_class_name string

feature class name.

Return:

boolean

feature class found or not.

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

Get an instance.

Params:

NameTypeAttributeDescription
arg_class_name string

type or class feature name.

arg_name string

feature instance name.

Return:

object

feature instance

public has(arg_class_name: string): boolean source

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

Params:

NameTypeAttributeDescription
arg_class_name string

feature class name.

Return:

boolean

feature class found or not.

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

Has an instance?

Params:

NameTypeAttributeDescription
arg_class_name string

type or class feature name.

arg_name string

feature instance name.

Return:

boolean

feature instance found ?

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

Remove an instance.

Params:

NameTypeAttributeDescription
arg_class_name string

type or class feature name.

arg_name string

feature instance name.

Return:

nothing