Class: AggregatorService<T>
Service that aggregate several CoreModel into one
Similar to a Mapper except that the target is constant
Webda Modda
Aggregator
Extends
Type parameters
• T extends AggregatorParameters
= AggregatorParameters
Constructors
new AggregatorService(webda, name, params)
new AggregatorService<
T
>(webda
,name
,params
):AggregatorService
<T
>
Parameters
• webda: Core
<CoreEvents
>
The main instance of Webda
• name: string
The name of the service
• params: DeepPartial
<T
>= {}
The parameters block define in the configuration file
Returns
Inherited from
Source
packages/core/src/services/service.ts:334
Properties
_createException
_createException:
string
Inherited from
MapperService
._createException
Source
packages/core/src/services/service.ts:315
_initException
_initException:
any
=undefined
Inherited from
Source
packages/core/src/services/service.ts:317
_initTime
_initTime:
number
Inherited from
Source
packages/core/src/services/service.ts:316
_name
protected
_name:string
Service name
Inherited from
Source
packages/core/src/services/service.ts:308
_webda
protected
_webda:Core
<CoreEvents
>
Webda Core object
Inherited from
Source
packages/core/src/services/service.ts:304
logger
protected
logger:Logger
Logger with class context
Inherited from
Source
packages/core/src/services/service.ts:321
metrics?
protected
metrics?:any
Get metrics
Inherited from
Source
packages/core/src/services/service.ts:325
parameters
protected
parameters:T
Hold the parameters for your service
It will be bring from the webda.config.json
Inherited from
Source
packages/core/src/services/service.ts:314
sourceService
sourceService:
Store
<CoreModel
,StoreParameters
,StoreEvents
>
Inherited from
Source
packages/core/src/stores/mapper.ts:71
targetStore
targetStore:
Store
<CoreModel
&Object
,StoreParameters
,StoreEvents
>
Inherited from
Source
packages/core/src/stores/mapper.ts:68
captureRejectionSymbol
static
readonly
captureRejectionSymbol: typeofcaptureRejectionSymbol
Inherited from
MapperService
.captureRejectionSymbol
Source
packages/core/node_modules/@types/node/events.d.ts:328
captureRejections
static
captureRejections:boolean
Sets or gets the default captureRejection value for all emitters.
Inherited from
MapperService
.captureRejections
Source
packages/core/node_modules/@types/node/events.d.ts:333
defaultMaxListeners
static
defaultMaxListeners:number
Inherited from
MapperService
.defaultMaxListeners
Source
packages/core/node_modules/@types/node/events.d.ts:334
errorMonitor
static
readonly
errorMonitor: typeoferrorMonitor
This symbol shall be used to install a listener for only monitoring 'error'
events. Listeners installed using this symbol are called before the regular
'error'
listeners are called.
Installing a listener using this symbol does not change the behavior once an
'error'
event is emitted, therefore the process will still crash if no
regular 'error'
listener is installed.
Inherited from
Source
packages/core/node_modules/@types/node/events.d.ts:327
Methods
__clean()
__clean():
Promise
<void
>
Clean the service data, can only be used in test mode
Returns
Promise
<void
>
Inherited from
Abstract
Source
packages/core/src/services/service.ts:642
_handleCreatedMap()
_handleCreatedMap(
source
,target
):Promise
<Date
>
Add the mapper for a newly created object
Parameters
• source: CoreModel
• target: CoreModel
Returns
Promise
<Date
>
Inherited from
MapperService
._handleCreatedMap
Source
packages/core/src/stores/mapper.ts:240
_handleDeletedMap()
_handleDeletedMap(
source
,target
):Promise
<Date
>
Remove the mapper for a deleted object
Parameters
• source: CoreModel
• target: CoreModel
Returns
Promise
<Date
>
Inherited from
MapperService
._handleDeletedMap
Source
packages/core/src/stores/mapper.ts:216
_handleMapFromPartial()
_handleMapFromPartial(
uid
,updateDate
,property
):Promise
<void
>
Handle the map from a partial update
Parameters
• uid: string
• updateDate: Date
• property: string
| string
[]= undefined
Returns
Promise
<void
>
Inherited from
MapperService
._handleMapFromPartial
Source
packages/core/src/stores/mapper.ts:263
_handleUpdatedMap()
_handleUpdatedMap(
source
,target
,updates
):Promise
<Date
>
Update a mapper after source object was modified
Parameters
• source: CoreModel
• target: CoreModel
• updates: any
Returns
Promise
<Date
>
Inherited from
MapperService
._handleUpdatedMap