refactor: add helper to build content addressable key for id tags cache
[e-mobility-charging-stations-simulator.git] / src / charging-station / ui-server / ui-services / UIServiceFactory.ts
index d4f92c10d30345845aff373e5bbb29cb995252ce..2d2fa6c8f4e9fb19ca26c331160ecb2eb1fb3704 100644 (file)
@@ -1,22 +1,18 @@
-import AbstractUIService from './AbstractUIService';
-import { ProtocolVersion } from '../../../types/UIProtocol';
-import UIService001 from './UIService001';
-import UIWebSocketServer from '../UIWebSocketServer';
+import { ProtocolVersion } from '../../../types';
+import { type AbstractUIServer, type AbstractUIService, UIService001 } from '../../internal';
 
-export default class UIServiceFactory {
+export class UIServiceFactory {
   private constructor() {
     // This is intentional
   }
 
   public static getUIServiceImplementation(
     version: ProtocolVersion,
-    uiServer: UIWebSocketServer
-  ): AbstractUIService | null {
+    uiServer: AbstractUIServer
+  ): AbstractUIService {
     switch (version) {
       case ProtocolVersion['0.0.1']:
         return new UIService001(uiServer);
-      default:
-        return null;
     }
   }
 }