Dependencies Filters Implemented

This commit is contained in:
Luis Fernando Molina committed 2020-04-18 16:22:14 +02:00
1 parent 986f1cc7a1
commit 6ed401c50f
8 files changed
+148 -38

No files matched your search

+18 -2
View File
@@ -9,9 +9,12 @@
let thisObject = {
nodeArray: undefined,
dataSetsModulesArray: [],
isItADepenency: isItADepenency,
initialize: initialize
};
let filter = new Map()
return thisObject;
function initialize(callBackFunction) {
@@ -42,10 +45,17 @@
callBackFunction(global.DEFAULT_OK_RESPONSE);
return;
}
/* Session based dependency filters */
if (bot.DEPENDENCY_FILTER !== undefined) {
for (let i = 0; i < bot.DEPENDENCY_FILTER.length; i++) {
let key = bot.DEPENDENCY_FILTER[i]
filter.set(key, true)
}
}
/*
For each dependency declared at the nodeArray, we will initialize a DataSet as part of this initialization process.
*/
let alreadyCalledBack = false;
let addCount = 0;
@@ -92,4 +102,10 @@
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
}
}
function isItADepenency(timeFrame, product) {
let key = timeFrame + '-' + product
return filter.get(key)
}
};