API object for (de)registering BOP instances from/to Application Builder data model.
- Version:
- 17.1.1
- Source:
- See:
Example
define([
'bop/js/api/BOPRegistry',
'{{package}}/js/CustomBOP'
], function (
BOPRegistry,
CustomBOP
) {
'use strict';
var CustomBOPExtension = function () {
};
CustomBOPExtension.prototype.initialise = function () {
var self = this;
var bop = new CustomBOP();
this._bop = bop;
return BOPRegistry.register(bop, self);
};
CustomBOPExtension.prototype.destroy = function () {
var self = this
return BOPRegistry.deregister(self._bop, self).then(function() {
self._bop = undefined;
});
};
CustomBOPExtension.prototype.generateRuntimeCode = function () {
// Include your code which generates static RT code
};
return AbcsLib.initSingleton(CustomBOPExtension);
});
Methods
deregister(bop, provider) → {Promise.<bop/js/spi/BOP>}
stable API
Deregister existing instance of BOP from Application Builder data model.
Parameters:
Name | Type | Description |
---|---|---|
bop |
bop/js/spi/BOP | |
provider |
extensions.dt/js/spi/ExtensionManager | An instance of the ExtensionManager which calls this method. |
- Version:
- 17.1.1
- Source:
Returns:
- Promise of BOP properly de-registered from Application Builder data model.
- Type
- Promise.<bop/js/spi/BOP>
register(bop, provider) → {Promise.<bop/js/spi/BOP>}
stable API
Register a new instance of BOP into the Application Builder data model.
Parameters:
Name | Type | Description |
---|---|---|
bop |
bop/js/spi/BOP | |
provider |
extensions.dt/js/spi/ExtensionManager | An instance of the ExtensionManager which calls this method. |
- Version:
- 17.1.1
- Source:
Returns:
- Promise of BOP properly registered into Application Builder data model.
- Type
- Promise.<bop/js/spi/BOP>