Skip to main content
Version: 0.9.0-beta.2

Class: ProblemsService

molecule.ProblemsService

Hierarchy

Implements

Constructors

constructor

new ProblemsService()

Overrides

Component.constructor

Defined in

src/services/problemsService.ts:54

Properties

builtinService

Private Readonly builtinService: IBuiltinService

Defined in

src/services/problemsService.ts:53


state

Protected state: IProblems<any>

Implementation of

IProblemsService.state

Overrides

Component.state

Defined in

src/services/problemsService.ts:51


statusBarService

Private Readonly statusBarService: IStatusBarService

Defined in

src/services/problemsService.ts:52

Methods

add

add<T>(item): void

Add single or multiple items data

Type parameters

Name
T

Parameters

NameType
itemIProblemsItem<T> | IProblemsItem<T>[]

Returns

void

Implementation of

IProblemsService.add

Defined in

src/services/problemsService.ts:67


count

count(name): number

Count the service event

Parameters

NameTypeDescription
namestringEvent name

Returns

number

Implementation of

IProblemsService.count

Inherited from

Component.count

Defined in

src/common/event/eventBus.ts:28


emit

emit(name, ...args): void

Emit the service event

Parameters

NameTypeDescription
namestringEvent name
...argsanyArguments

Returns

void

Implementation of

IProblemsService.emit

Inherited from

Component.emit

Defined in

src/common/event/eventBus.ts:20


forceUpdate

forceUpdate(): void

Force to update the Component

Returns

void

Implementation of

IProblemsService.forceUpdate

Inherited from

Component.forceUpdate

Defined in

src/react/component.ts:79


getProblemsMarkers

Private getProblemsMarkers(data): Object

Parameters

NameType
dataIProblemsItem<any>[]

Returns

Object

NameType
errorsnumber
infosnumber
warningsnumber

Defined in

src/services/problemsService.ts:167


getState

getState(): IProblems<any>

Get the Component state

Returns

IProblems<any>

Implementation of

IProblemsService.getState

Inherited from

Component.getState

Defined in

src/react/component.ts:83


onUpdateState

onUpdateState(callback): void

Listen to the Component state update event

Parameters

NameType
callback(prevState: IProblems<any>, nextState: IProblems<any>) => void

Returns

void

Implementation of

IProblemsService.onUpdateState

Inherited from

Component.onUpdateState

Defined in

src/react/component.ts:71


remove

remove(id): void

Remove the specific problem items

Parameters

NameType
idUniqueId | UniqueId[]

Returns

void

Implementation of

IProblemsService.remove

Defined in

src/services/problemsService.ts:113


removeOnUpdateState

removeOnUpdateState(): void

Remove the Component update event listening

Returns

void

Implementation of

IProblemsService.removeOnUpdateState

Inherited from

Component.removeOnUpdateState

Defined in

src/react/component.ts:75


render

render(nextState?): void

Initiative notify the component to render the view by the state

Parameters

NameType
nextState?IProblems<any>

Returns

void

Implementation of

IProblemsService.render

Inherited from

Component.render

Defined in

src/react/component.ts:67


reset

reset(): void

Reset the ProblemsService state data

Returns

void

Implementation of

IProblemsService.reset

Defined in

src/services/problemsService.ts:138


setState

setState(values, callback?): void

Set the state values, and notify the view component to re render

Parameters

NameTypeDescription
valuesPartial<IProblems<any>>update target state values
callback?(prevState: IProblems<any>, nextState: IProblems<any>) => void-

Returns

void

Implementation of

IProblemsService.setState

Inherited from

Component.setState

Defined in

src/react/component.ts:54


subscribe

subscribe(name, callback): void

Subscribe the service event

Parameters

NameTypeDescription
namestring | string[]Event name
callbackFunctionCallback function

Returns

void

Implementation of

IProblemsService.subscribe

Inherited from

Component.subscribe

Defined in

src/common/event/eventBus.ts:11


toggleProblems

toggleProblems(): void

Toggle the Problems view between display or hidden

Returns

void

Implementation of

IProblemsService.toggleProblems

Defined in

src/services/problemsService.ts:61


unsubscribe

unsubscribe(name): void

Unsubscribe the specific event

Parameters

NameTypeDescription
nameanyThe event name

Returns

void

Implementation of

IProblemsService.unsubscribe

Inherited from

Component.unsubscribe

Defined in

src/common/event/eventBus.ts:37


update

update<T>(item): void

Update the specific data

Type parameters

Name
T

Parameters

NameType
itemIProblemsItem<T> | IProblemsItem<T>[]

Returns

void

Implementation of

IProblemsService.update

Defined in

src/services/problemsService.ts:89


updateStatus

Private updateStatus<T>(item): void

Type parameters

Name
T

Parameters

NameType
itemIStatusBarItem<T>

Returns

void

Defined in

src/services/problemsService.ts:163


updateStatusBar

Private updateStatusBar<T>(): void

Type parameters

Name
T

Returns

void

Defined in

src/services/problemsService.ts:149