Reference Source
public class | source

Feature

Extends:

devapt-core-common/dist/js/base/loggable~LoggableNameTypeSettingsLoggable → Feature

Example:

	API
		->get_name():string - get command name (INHERITED).
		->get_type():string - get command type (INHERITED).
		->get_settings():object - get instance type (INHERITED).
		->is_valid():boolean - check if instance is valid (settings...) (INHERITED, SUBCLASSED).

		->get_author():string|object - get author id or record.
		->get_license():string - get license name.
		->get_about():string|object - get about doc content.
		->get_help():string|object - get about doc content.
		->get_refdoc():string|object - get about doc content.

Constructor Summary

Public Constructor
public

constructor(arg_runtime: object, arg_settings: object, arg_log_context: string | undefined): nothing

Creates an instance of Feature, do not use directly but in a sub class.

Member Summary

Public Members
public

Method Summary

Public Methods
public

Get About content.

public

Get Author.

public

Get Help content.

public

Get License name.

public

Get Referential Docs content.

public

Check if instance settings is valid.

Inherited Summary

From class NameTypeSettingsLoggable
public
private
private
private

_ui: *

public

Get instance name.

public

Get router.

public

Get runtime.

public

Get instance settings.

public

get_state_store(): Store

Get runtime state store.

public

Get instance type.

public

get_ui(): UI

Get UI.

public

Check if instance settings is valid.

Public Constructors

public constructor(arg_runtime: object, arg_settings: object, arg_log_context: string | undefined): nothing source

Creates an instance of Feature, do not use directly but in a sub class.

A Feature configuration is a simple object with this common attributes:

    - name:string  - unique name.
    - type:string  - type of commnand from command factory known types list (example: display).
    - about:string - string or doc object: { 'topicA':{ 'topicA1':'...' }, 'topicB':'...' }.
    - help:string  - string or doc object: { 'topicA':{ 'topicA1':'...' }, 'topicB':'...' }.
    - refdoc:string  - string or doc object: { 'topicA':{ 'topicA1':'...' }, 'topicB':'...' }.

Override:

NameTypeSettingsLoggable#constructor

Params:

NameTypeAttributeDescription
arg_runtime object

runtime.

arg_settings object

instance settings.

arg_log_context string | undefined

context of traces of this instance (optional).

Return:

nothing

Public Members

public is_feature: boolean source

Public Methods

public get_about(): string | object source

Get About content.

Return:

string | object

public get_author(): string | object source

Get Author.

Return:

string | object

author id string or author record object

public get_help(): string | object source

Get Help content.

Return:

string | object

public get_license(): string source

Get License name.

Return:

string

public get_refdoc(): string | object source

Get Referential Docs content.

Return:

string | object

public is_valid(): boolean source

Check if instance settings is valid.

Override:

NameTypeSettingsLoggable#is_valid

Return:

boolean