From 9dadcff7626cefdfb66798f8f207e7f808b5bedf Mon Sep 17 00:00:00 2001 From: Christopher Tate Date: Sat, 27 Jul 2024 09:34:52 -0600 Subject: [PATCH] Adding helper methods for configuring UI for PageTemplates classes --- src/main/java/org/computate/frFR/java/EcrireApiClasse.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/computate/frFR/java/EcrireApiClasse.java b/src/main/java/org/computate/frFR/java/EcrireApiClasse.java index 534e2c26..497c07ff 100644 --- a/src/main/java/org/computate/frFR/java/EcrireApiClasse.java +++ b/src/main/java/org/computate/frFR/java/EcrireApiClasse.java @@ -296,8 +296,10 @@ public void ecrireGenApiService(String classeLangueNom) throws Exception { l(); tl(8, "protected WebClient ", i18nGlobale.getString(I18n.var_clientWeb), ";"); - auteurGenApiService.tl(1, "static void ", i18nGlobale.getString(I18n.var_enregistrer), "Service(EventBus eventBus, JsonObject config, WorkerExecutor ", i18nGlobale.getString(I18n.var_executeurTravailleur), ", PgPool pgPool, KafkaProducer kafkaProducer, WebClient ", i18nGlobale.getString(I18n.var_clientWeb), activerOpenIdConnect ? ", OAuth2Auth oauth2AuthenticationProvider, AuthorizationProvider authorizationProvider" : "", classePage ? ", Jinjava jinjava" : "", ", Vertx vertx) {"); - auteurGenApiService.tl(2, "new ServiceBinder(vertx).setAddress(", classeNomSimple, ".get", i18nGlobale.getString(I18n.var_ClasseApiAddresse), "()).register(", classeNomSimpleGenApiService, ".class, new ", classeNomSimpleApiServiceImpl, "(eventBus, config, ", i18nGlobale.getString(I18n.var_executeurTravailleur), ", pgPool, kafkaProducer, ", i18nGlobale.getString(I18n.var_clientWeb), activerOpenIdConnect ? ", oauth2AuthenticationProvider, authorizationProvider" : "", classePage ? ", jinjava" : "", "));"); + auteurGenApiService.tl(1, "static ", classeNomSimpleApiServiceImpl, " ", i18nGlobale.getString(I18n.var_enregistrer), "Service(EventBus eventBus, JsonObject config, WorkerExecutor ", i18nGlobale.getString(I18n.var_executeurTravailleur), ", PgPool pgPool, KafkaProducer kafkaProducer, WebClient ", i18nGlobale.getString(I18n.var_clientWeb), activerOpenIdConnect ? ", OAuth2Auth oauth2AuthenticationProvider, AuthorizationProvider authorizationProvider" : "", classePage ? ", Jinjava jinjava" : "", ", Vertx vertx) {"); + auteurGenApiService.tl(2, classeNomSimpleApiServiceImpl, " api = new ", classeNomSimpleApiServiceImpl, "(eventBus, config, ", i18nGlobale.getString(I18n.var_executeurTravailleur), ", pgPool, kafkaProducer, ", i18nGlobale.getString(I18n.var_clientWeb), activerOpenIdConnect ? ", oauth2AuthenticationProvider, authorizationProvider" : "", classePage ? ", jinjava" : "", ");"); + auteurGenApiService.tl(2, "new ServiceBinder(vertx).setAddress(", classeNomSimple, ".get", i18nGlobale.getString(I18n.var_ClasseApiAddresse), "()).register(", classeNomSimpleGenApiService, ".class, api);"); + auteurGenApiService.tl(2, "return api;"); auteurGenApiService.tl(1, "}"); auteurGenApiService.l(); for(String classeApiMethode : classeApiMethodes) {