Interface: Extension

x2node-records. Extension

Interface for record type library extensions. All interface methods and properties are optional.

Members


<readonly> requiredExtensions :Array.<module:x2node-records.Extension>

List of extensions that need to be added to the library before this one. The library makes sure that no extension is added more than once.
Type:

Methods


extendPropertiesContainer(ctx, container)

Extend record type descriptor. The function is called on the extension right after the record type descriptor instance is created and passed through the previously added extensions. This happens before the properties are added to the descriptor. To perform work on the descriptor after the properties are added, the extension can use onContainerComplete() method on the context.
Parameters:
Name Type Description
ctx module:x2node-records~LibraryConstructionContext Library construction context.
container module:x2node-records~PropertiesContainer Properties container.
Returns:
Extended properties container.
Type
module:x2node-records~PropertiesContainer

extendPropertyDescriptor(ctx, propDesc)

Extend property descriptor. The function receives the property descriptor after it is passed through the previously added extensions.
Parameters:
Name Type Description
ctx module:x2node-records~LibraryConstructionContext Library construction context.
propDesc module:x2node-records~PropertyDescriptor Property descriptor.
Returns:
Extended property descriptor.
Type
module:x2node-records~PropertyDescriptor

extendRecordTypesLibrary(ctx, recordTypes)

Extend record types library. The function is called on the extension right after the record types library instance is created and passed through the previously added extensions. This happens before the record types are added to the library. To perform work on the library after the record types are added, the extension can use onLibraryComplete() method on the context.
Parameters:
Name Type Description
ctx module:x2node-records~LibraryConstructionContext Library construction context.
recordTypes module:x2node-records~RecordTypesLibrary Record types library instance.
Returns:
Extended record types library instance.
Type
module:x2node-records~RecordTypesLibrary