From abd1cd4f1039fdbb847db2f03e9c2929d241b8c3 Mon Sep 17 00:00:00 2001 From: Arek Burdach Date: Tue, 10 Dec 2024 10:22:00 +0100 Subject: [PATCH] loadable config -> config loader + factory --- .run/NussknackerApp-dist-config.run.xml | 4 +- .run/NussknackerApp-postgres.run.xml | 4 +- .run/NussknackerApp.run.xml | 4 +- build.sbt | 8 +-- .../ui/configloader}/DesignerRootConfig.scala | 2 +- .../ProcessingTypeConfigsLoader.scala} | 9 ++- .../ProcessingTypeConfigsLoaderFactory.scala | 15 +++++ .../ui/LocalNussknackerWithSingleModel.scala | 11 ++-- .../touk/nussknacker/ui/NussknackerApp.scala | 7 +-- .../ui/api/description/DictApiEndpoints.scala | 3 +- .../ui/api/description/UserApiEndpoints.scala | 2 +- .../scenarioActivity/InputOutput.scala | 4 +- ...tConfigLoadableProcessingTypeConfigs.scala | 18 ------ ...ootConfigProcessingTypeConfigsLoader.scala | 16 ++++++ ...LoadableProcessingTypeConfigsFactory.scala | 25 --------- ...ypeConfigsLoaderFactoryServiceLoader.scala | 35 ++++++++++++ .../root/DesignerRootConfigLoader.scala | 23 ++++++-- .../root/LoadableDesignerRootConfig.scala | 18 ------ .../ui/db/entity/BaseEntityFactory.scala | 3 +- .../ui/db/entity/ProcessEntityFactory.scala | 3 +- .../QuestDbFEStatisticsRepository.scala | 2 +- .../ui/factory/NussknackerAppFactory.scala | 55 +++++++++++++++---- .../LocalProcessingTypeDataLoader.scala | 3 +- .../loader/ProcessingTypeDataLoader.scala | 2 - ...sConfigBasedProcessingTypeDataLoader.scala | 9 ++- .../server/AkkaHttpBasedRouteProvider.scala | 46 +++++----------- .../ui/server/NussknackerHttpServer.scala | 2 +- .../nussknacker/ui/server/RouteProvider.scala | 2 +- .../nussknacker/test/base/it/NuItTest.scala | 9 +-- .../test/base/it/NuResourcesTest.scala | 4 +- .../ui/api/NussknackerHttpServerSpec.scala | 2 +- ...nfigProcessingTypeConfigsLoaderSpec.scala} | 38 ++++++------- .../root}/ConfigurationTest.scala | 18 +++--- .../ProcessingTypeDataProviderSpec.scala | 2 - .../ScenarioParametersServiceTest.scala | 4 +- 35 files changed, 215 insertions(+), 197 deletions(-) rename designer/{loadable-config-api/src/main/scala/pl/touk/nussknacker/ui/loadableconfig => config-loader-api/src/main/scala/pl/touk/nussknacker/ui/configloader}/DesignerRootConfig.scala (92%) rename designer/{loadable-config-api/src/main/scala/pl/touk/nussknacker/ui/loadableconfig/LoadableProcessingTypeConfigs.scala => config-loader-api/src/main/scala/pl/touk/nussknacker/ui/configloader/ProcessingTypeConfigsLoader.scala} (60%) create mode 100644 designer/config-loader-api/src/main/scala/pl/touk/nussknacker/ui/configloader/ProcessingTypeConfigsLoaderFactory.scala delete mode 100644 designer/server/src/main/scala/pl/touk/nussknacker/ui/config/processingtype/EachTimeLoadingRootConfigLoadableProcessingTypeConfigs.scala create mode 100644 designer/server/src/main/scala/pl/touk/nussknacker/ui/config/processingtype/EachTimeLoadingRootConfigProcessingTypeConfigsLoader.scala delete mode 100644 designer/server/src/main/scala/pl/touk/nussknacker/ui/config/processingtype/LoadableProcessingTypeConfigsFactory.scala create mode 100644 designer/server/src/main/scala/pl/touk/nussknacker/ui/config/processingtype/ProcessingTypeConfigsLoaderFactoryServiceLoader.scala delete mode 100644 designer/server/src/main/scala/pl/touk/nussknacker/ui/config/root/LoadableDesignerRootConfig.scala rename designer/server/src/test/scala/pl/touk/nussknacker/ui/config/processingtype/{EachTimeLoadingRootConfigLoadableProcessingTypeConfigsSpec.scala => EachTimeLoadingRootConfigProcessingTypeConfigsLoaderSpec.scala} (70%) rename designer/server/src/test/scala/pl/touk/nussknacker/ui/{integration => config/root}/ConfigurationTest.scala (92%) diff --git a/.run/NussknackerApp-dist-config.run.xml b/.run/NussknackerApp-dist-config.run.xml index 3f27dd337b3..3ef7ee7f1ee 100644 --- a/.run/NussknackerApp-dist-config.run.xml +++ b/.run/NussknackerApp-dist-config.run.xml @@ -26,7 +26,7 @@