diff --git a/src/enricher/elements.ts b/src/enricher/elements.ts index 573e5557d..bbecca8e3 100644 --- a/src/enricher/elements.ts +++ b/src/enricher/elements.ts @@ -26,7 +26,7 @@ export class ElementEnricher { private getTechnologyCandidates(node: Node) { const candidates: TechnologyTemplateMap[] = [] - for (const plugin of this.graph.plugins.technology.filter(it => it.enabled())) { + for (const plugin of this.graph.plugins.technology.filter(it => it.backwards())) { candidates.push(...plugin.assign(node)) } return candidates @@ -39,7 +39,7 @@ export class ElementEnricher { */ private enrichImplementations() { // for backwards compatibility and testing purposed, continue if, e.g., no rules at all exists - if (utils.isEmpty(this.graph.plugins.technology.filter(it => it.enabled()))) return + if (utils.isEmpty(this.graph.plugins.technology.filter(it => it.backwards()))) return for (const node of this.graph.nodes.filter(it => it.managed).filter(it => utils.isPopulated(it.technologies))) { // Do not override manual assigned technologies but enrich them with an implementation diff --git a/src/technologies/plugins/rules/index.ts b/src/technologies/plugins/rules/index.ts index bb22b27ee..826edc2ef 100644 --- a/src/technologies/plugins/rules/index.ts +++ b/src/technologies/plugins/rules/index.ts @@ -39,7 +39,7 @@ export class TechnologyRulePlugin implements TechnologyPlugin { return rules } - enabled() { + backwards() { return this.hasRules() } diff --git a/src/technologies/types.ts b/src/technologies/types.ts index 8d71db0ac..a4625b2b8 100644 --- a/src/technologies/types.ts +++ b/src/technologies/types.ts @@ -10,7 +10,8 @@ export type TechnologyPluginBuilder = { } export type TechnologyPlugin = { - enabled: () => Boolean + // for backwards compatibility and testing purposed, continue if, e.g., no rules at all exists + backwards: () => Boolean // TODO: must assign technology.assign! assign: (node: Node) => TechnologyTemplateMap[]