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 551869f06eccea332351c5600b5dccb3272275c4..2d2fa6c8f4e9fb19ca26c331160ecb2eb1fb3704 100644 (file)
@@ -1,9 +1,7 @@
-import type AbstractUIService from './AbstractUIService';
-import UIService001 from './UIService001';
-import { ProtocolVersion } from '../../../types/UIProtocol';
-import type { AbstractUIServer } from '../AbstractUIServer';
+import { ProtocolVersion } from '../../../types';
+import { type AbstractUIServer, type AbstractUIService, UIService001 } from '../../internal';
 
-export default class UIServiceFactory {
+export class UIServiceFactory {
   private constructor() {
     // This is intentional
   }
@@ -11,12 +9,10 @@ export default class UIServiceFactory {
   public static getUIServiceImplementation(
     version: ProtocolVersion,
     uiServer: AbstractUIServer
-  ): AbstractUIService | null {
+  ): AbstractUIService {
     switch (version) {
       case ProtocolVersion['0.0.1']:
         return new UIService001(uiServer);
-      default:
-        return null;
     }
   }
 }