Skip to content

Commit

Permalink
Add new ProjectHelper to copy static files recursively from platform
Browse files Browse the repository at this point in the history
  • Loading branch information
computate committed Dec 19, 2023
1 parent 27e8dd3 commit 370280f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/main/java/org/computate/frFR/java/ConfigCles.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ public class ConfigCles {
public static final String var_ACTIVER_SUPPRIME = "var_ACTIVER_SUPPRIME";
public static final String var_ACTIVER_UTILISATEUR_CLE = "var_ACTIVER_UTILISATEUR_CLE";
public static final String var_ACTIVER_VERTX = "var_ACTIVER_VERTX";
public static final String var_CLASSE_API_ADDRESSE = "var_CLASSE_API_ADDRESSE";
public static final String var_addresse = "var_addresse";
public static final String var_Adjectif = "var_Adjectif";
public static final String var_AdjectifPluriel = "var_AdjectifPluriel";
Expand Down Expand Up @@ -118,6 +117,8 @@ public class ConfigCles {
public static final String var_CLASSE_NOM_SIMPLE = "var_CLASSE_NOM_SIMPLE";
public static final String var_classe = "var_classe";
public static final String var_Classe = "var_Classe";
public static final String var_CLASSE_API_ADDRESSE = "var_CLASSE_API_ADDRESSE";
public static final String var_ClasseApiAddresse = "var_ClasseApiAddresse";
public static final String var_classeNomCanonique = "var_classeNomCanonique";
public static final String var_classeNomsCanoniques = "var_classeNomsCanoniques";
public static final String var_classeNomSimple = "var_classeNomSimple";
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/computate/frFR/java/EcrireApiClasse.java
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ public void ecrireGenApiService(String classeLangueNom) throws Exception {
tl(8, "protected WebClient ", classeLangueConfig.getString(ConfigCles.var_clientWeb), ";");

auteurGenApiService.tl(1, "static void ", classeLangueConfig.getString(ConfigCles.var_enregistrer), "Service(EventBus eventBus, JsonObject config, WorkerExecutor ", classeLangueConfig.getString(ConfigCles.var_executeurTravailleur), ", PgPool pgPool, KafkaProducer<String, String> kafkaProducer, WebClient ", classeLangueConfig.getString(ConfigCles.var_clientWeb), activerOpenIdConnect ? ", OAuth2Auth oauth2AuthenticationProvider, AuthorizationProvider authorizationProvider" : "", classePage ? ", HandlebarsTemplateEngine templateEngine" : "", ", Vertx vertx) {");
auteurGenApiService.tl(2, "new ServiceBinder(vertx).setAddress(", classeNomSimple, ".", classeLangueConfig.getString(ConfigCles.var_CLASSE_API_ADDRESSE), ").register(", classeNomSimpleGenApiService, ".class, new ", classeNomSimpleApiServiceImpl, "(eventBus, config, ", classeLangueConfig.getString(ConfigCles.var_executeurTravailleur), ", pgPool, kafkaProducer, ", classeLangueConfig.getString(ConfigCles.var_clientWeb), activerOpenIdConnect ? ", oauth2AuthenticationProvider, authorizationProvider" : "", classePage ? ", templateEngine" : "", "));");
auteurGenApiService.tl(2, "new ServiceBinder(vertx).setAddress(", classeNomSimple, ".get", classeLangueConfig.getString(ConfigCles.var_ClasseApiAddresse), "()).register(", classeNomSimpleGenApiService, ".class, new ", classeNomSimpleApiServiceImpl, "(eventBus, config, ", classeLangueConfig.getString(ConfigCles.var_executeurTravailleur), ", pgPool, kafkaProducer, ", classeLangueConfig.getString(ConfigCles.var_clientWeb), activerOpenIdConnect ? ", oauth2AuthenticationProvider, authorizationProvider" : "", classePage ? ", templateEngine" : "", "));");
auteurGenApiService.tl(1, "}");
auteurGenApiService.l();
for(String classeApiMethode : classeApiMethodes) {
Expand Down Expand Up @@ -1905,7 +1905,7 @@ public void ecrireGenApiServiceImpl2(String classeLangueNom) throws Exception {
tl(6, "params.put(\"query\", query);");
tl(6, "JsonObject context = new JsonObject().put(\"params\", params).put(\"user\", ", classeLangueConfig.getString(ConfigCles.var_requeteSite), ".getUserPrincipal());");
tl(6, "JsonObject json = new JsonObject().put(\"context\", context);");
tl(6, "eventBus.request(", classeNomSimple, ".", classeLangueConfig.getString(ConfigCles.var_CLASSE_API_ADDRESSE), ", json, new DeliveryOptions().addHeader(\"action\", \"", classeApiOperationIdMethode, "Future\")).onSuccess(a -> {");
tl(6, "eventBus.request(", classeNomSimple, ".get", classeLangueConfig.getString(ConfigCles.var_ClasseApiAddresse), "(), json, new DeliveryOptions().addHeader(\"action\", \"", classeApiOperationIdMethode, "Future\")).onSuccess(a -> {");
tl(7, "JsonObject responseMessage = (JsonObject)a.body();");
tl(7, "JsonObject responseBody = new JsonObject(Buffer.buffer(JsonUtil.BASE64_DECODER.decode(responseMessage.getString(\"payload\"))));");
if(classeModele)
Expand Down Expand Up @@ -2253,7 +2253,7 @@ else if(classeApiMethode.equals(classeLangueConfig.getString(ConfigCles.var_PUTF
tl(5, "params.put(\"query\", query);");
tl(5, "JsonObject context = new JsonObject().put(\"params\", params).put(\"user\", ", classeLangueConfig.getString(ConfigCles.var_requeteSite), ".getUserPrincipal());");
tl(5, "JsonObject json = new JsonObject().put(\"context\", context);");
tl(5, "eventBus.request(", classeNomSimple, ".", classeLangueConfig.getString(ConfigCles.var_CLASSE_API_ADDRESSE), ", json, new DeliveryOptions().addHeader(\"action\", \"", classeApiOperationIdMethode, "Future\")).onSuccess(a -> {");
tl(5, "eventBus.request(", classeNomSimple, ".get", classeLangueConfig.getString(ConfigCles.var_ClasseApiAddresse), "(), json, new DeliveryOptions().addHeader(\"action\", \"", classeApiOperationIdMethode, "Future\")).onSuccess(a -> {");
tl(6, "promise1.complete();");
tl(5, "}).onFailure(ex -> {");
tl(6, "LOG.error(String.format(\"", classeLangueConfig.getString(ConfigCles.var_liste), classeApiMethode, classeNomSimple, " ", classeLangueConfig.getString(ConfigCles.str_a_échoué), ". \"), ex);");
Expand Down Expand Up @@ -3917,7 +3917,7 @@ public void ecrireGenApiServiceImpl3(String classeLangueNom) throws Exception {
tl(5, "params.put(\"query\", query);");
tl(5, "JsonObject context = new JsonObject().put(\"params\", params).put(\"user\", ", classeLangueConfig.getString(ConfigCles.var_requeteSite), ".getUserPrincipal());");
tl(5, "JsonObject json = new JsonObject().put(\"context\", context);");
tl(5, "eventBus.request(", classeNomSimple, ".", classeLangueConfig.getString(ConfigCles.var_CLASSE_API_ADDRESSE), ", json, new DeliveryOptions().addHeader(\"action\", \"patch", classeNomSimple, "Future\")).onSuccess(c -> {");
tl(5, "eventBus.request(", classeNomSimple, ".get", classeLangueConfig.getString(ConfigCles.var_ClasseApiAddresse), "(), json, new DeliveryOptions().addHeader(\"action\", \"patch", classeNomSimple, "Future\")).onSuccess(c -> {");
tl(6, "JsonObject responseMessage = (JsonObject)c.body();");
tl(6, "Integer statusCode = responseMessage.getInteger(\"statusCode\");");
tl(6, "if(statusCode.equals(200))");
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/org/computate/frFR/java/EcrireGenClasse.java
Original file line number Diff line number Diff line change
Expand Up @@ -6027,7 +6027,12 @@ public void genCodeClasseFin(String langueNom, YAMLConfiguration langueConfig) t

l();
tl(1, "public static final String ", langueConfig.getString(ConfigCles.var_CLASSE_NOM_SIMPLE), " = \"", classeNomSimple, "\";");
tl(1, "public static final String ", classeLangueConfig.getString(ConfigCles.var_CLASSE_API_ADDRESSE), " = \"", siteNom, "-", classeLangueNom, "-", classeNomSimple, "\";");
if(classeApi) {
tl(0, "public static final String ", classeLangueConfig.getString(ConfigCles.var_CLASSE_API_ADDRESSE), "_", classeNomSimple, " = \"", siteNom, "-", classeLangueNom, "-", classeNomSimple, "\";");
tl(1, "public static String get", classeLangueConfig.getString(ConfigCles.var_ClasseApiAddresse), "() {");
tl(2, "return ", classeLangueConfig.getString(ConfigCles.var_CLASSE_API_ADDRESSE), "_", classeNomSimple, ";");
tl(1, "}");
}
s(wVarsStatic);

if(classeIndexe) {
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/org/computate/i18n/i18n_enUS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ var_ACTIVER_SESSION_ID: "ENABLE_SESSION_ID"
var_ACTIVER_SUPPRIME: "ENABLE_DELETED"
var_ACTIVER_UTILISATEUR_CLE: "ENABLE_USER_KEY"
var_ACTIVER_VERTX: "ENABLE_VERTX"
var_CLASSE_API_ADDRESSE: "CLASS_API_ADDRESS"
var_addresse: "address"
var_a_démarré: "started"
var_Adjectif: "Adjective"
Expand Down Expand Up @@ -336,6 +335,8 @@ var_CLASSE_CHEMIN_ABSOLU: "CLASS_ABSOLUTE_PATH"
var_CLASSE_NOM_SIMPLE: "CLASS_SIMPLE_NAME"
var_classe: "class"
var_Classe: "Class"
var_CLASSE_API_ADDRESSE: "CLASS_API_ADDRESS"
var_ClasseApiAddresse: "ClassApiAddress"
var_classeNomCanonique: "classCanonicalName"
var_classeNomsCanoniques: "classCanonicalNames"
var_classeNomSimple: "classSimpleName"
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/org/computate/i18n/i18n_frFR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ var_ACTIVER_SESSION_ID: "ACTIVER_SESSION_ID"
var_ACTIVER_SUPPRIME: "ACTIVER_SUPPRIMER"
var_ACTIVER_UTILISATEUR_CLE: "ACTIVER_UTILISATEUR_CLE"
var_ACTIVER_VERTX: "ACTIVER_VERTX"
var_CLASSE_API_ADDRESSE: "CLASSE_API_ADDRESSE"
var_addresse: "addresse"
var_Adjectif: "Adjectif"
var_AdjectifPluriel: "AdjectifPluriel"
Expand Down Expand Up @@ -101,6 +100,8 @@ var_CLASSE_CHEMIN_ABSOLU: "CLASSE_CHEMIN_ABSOLU"
var_CLASSE_NOM_SIMPLE: "CLASSE_NOM_SIMPLE"
var_classe: "classe"
var_Classe: "Classe"
var_CLASSE_API_ADDRESSE: "CLASSE_API_ADDRESSE"
var_ClasseApiAddresse: "ClasseApiAddresse"
var_classeNomCanonique: "classeNomCanonique"
var_classeNomsCanoniques: "classeNomsCanoniques"
var_classeNomSimple: "classeNomSimple"
Expand Down

0 comments on commit 370280f

Please sign in to comment.