define([
'extensions.dt/js/spi/ExtensionManager'
], function (
ExtensionManager
) {
'use strict';
/**
* SPI object extending generic {@link extensions.dt/js/spi/ExtensionManager ExtensionManager} and providing more detailed capability which can be used for implemeting
* {@link bop/js/spi/BOP BOP} extensions.
*
* @AbcsExtension stable
* @version 17.1.1
* @exports bop.dt/js/spi/BOPExtensionManager
* @augments extension.dt/js/spi/ExtensionManager
*
* @constructor
* @private
*
* @see {@link bop/js/spi/BOP BOP}
* @see {@link extensions.dt/js/spi/ExtensionManager ExtensionManager}
*/
var BOPExtensionManager = function () {
AbcsLib.checkThis(this);
};
AbcsLib.extend(BOPExtensionManager, ExtensionManager);
/**
* Gets an array of {@link extensions.dt/js/api/CustomParameter CustomParameter}s.
*
* <p>
* Should be used if the related {@link bop/js/spi/BOP BOP} needs some parameter values for its initialization. All parameters defined here will show up in
* the first step of the Wizard opened when ABCS Business User is registering instance of {@link bop/js/spi/BOP BOP}. That allows client to pass proper values
* before the {@link bop/js/spi/BOP BOP} is initialized.
* </p>
*
* <p>
* By default empty array is returned which signs that no {@link extensions.dt/js/api/CustomParameter CustomParameter}s are needed for initialization.
* </p>
*
* @AbcsExtension stable
* @version 17.1.1
*
* @returns {Promise<extensions.dt/js/api/CustomParameter[]>}
*
* @see {@link extensions.dt/js/api/CustomParameter CustomParameter}
* @see {@link extensions.dt/js/api/CustomParameter.createSimple CustomParameter.createSimple(..)} to create simple key-value parameter
* @see {@link extensions.dt/js/api/CustomParameter.createEnum CustomParameter.createEnum(..)} to create parameter with multiple predefined enumeration values
*
* @example
* <caption>
* Example of typical implementation of custom {@link bop.dt/js/spi/BOPExtensionManager BOPExtensionManager} with a two {@link extensions.dt/js/api/CustomParameter CustomParameter}s included.
* One of them is simple key-value pair and the other has value set from predefined enumeration values.
* </caption>
*
* define([
* 'extensions.dt/js/api/CustomParameter'
* ], function (
* CustomParameter
* ) {
*
* var CustomBOPExtension = function () {
* };
*
* CustomBOPExtension.prototype.getCustomParameters = function () {
* return [
* CustomParameter.createSimple('SourceURL', 'String value poiting to the source URL of this BOP'),
* CustomParameter.createEnum({
* key: 'environment',
* displayName: 'Choose type of the environment you want to work with',
* values: [
* 'Development',
* 'Testing',
* 'Production'
* ]
* })
* ];
* };
*
* return new CustomBOPExtension();
* });
*/
BOPExtensionManager.prototype.getCustomParameters = function() {
return Promise.resolve([]);
};
return BOPExtensionManager;
});