From 13bbf41d0b7735d80c8ac606fcdac4884a864d1f Mon Sep 17 00:00:00 2001 From: Christian Weimann Date: Tue, 14 Jan 2025 03:54:21 +0100 Subject: [PATCH] refactor(SceneController): rename SceneMgr to SceneController --- SceneMgr.js => SceneController.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename SceneMgr.js => SceneController.js (96%) diff --git a/SceneMgr.js b/SceneController.js similarity index 96% rename from SceneMgr.js rename to SceneController.js index e4db850..3f336fd 100644 --- a/SceneMgr.js +++ b/SceneController.js @@ -1,7 +1,7 @@ // Settings const ITEMPREFIX = "System_StatefulScene"; const DEBOUNCETIME = 3000; -const LOGGER = "org.openhab.js.SceneMgr"; +const LOGGER = "org.openhab.js.SceneController"; // Logging const log = Java.type('org.slf4j.LoggerFactory').getLogger(LOGGER); @@ -13,11 +13,11 @@ const tm = new TimerMgr(); const { ruleRegistry } = require('@runtime/RuleSupport'); // Functions -class SceneMgr { +class SceneController { constructor() { - // Log the initialization message for Scene Manager. - log.info('Initialization of SceneMgr'); + // Log the initialization message for SceneController. + log.info('Initialization of SceneController'); // Initialize the scenes map by reducing the array of scenes into an object with unique IDs as keys. this.scenes = this.getScenes().reduce((scenes, scene) => { @@ -259,11 +259,11 @@ class Scene { } // Load script -const sm = new SceneMgr(); +const sm = new SceneController(); // Unload script require('@runtime').lifecycleTracker.addDisposeHook(() => { - log.info('Deinitialization of SceneMgr'); + log.info('Deinitialization of SceneController'); sm.purgeUnusedSceneSwitchItems();