Skip to content

Commit

Permalink
Fixing bugs with new APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
computate committed Nov 7, 2024
1 parent b2531eb commit 6cee5db
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 9 deletions.
40 changes: 32 additions & 8 deletions src/main/java/org/computate/frFR/java/EcrireApiClasse.java
Original file line number Diff line number Diff line change
Expand Up @@ -1902,12 +1902,18 @@ public void ecrireGenApiServiceImpl2(String classeLangueNom) throws Exception {
l("ServiceRequest ", i18nGlobale.getString(I18n.var_requeteService), ", Handler<AsyncResult<ServiceResponse>> ", i18nGlobale.getString(I18n.var_gestionnaireEvenements), ") {");
tl(2, i18nGlobale.getString(I18n.var_utilisateur), "(", i18nGlobale.getString(I18n.var_requeteService), ", ", classePartsRequeteSite.nomSimple(classeLangueNom), ".class, ", classePartsUtilisateurSite.nomSimple(classeLangueNom), ".class, ", classePartsUtilisateurSite.nomSimple(classeLangueNom), ".get", i18nGlobale.getString(I18n.var_ClasseApiAddresse), "(), \"post", classePartsUtilisateurSite.nomSimple(classeLangueNom), "Future\", \"patch", classePartsUtilisateurSite.nomSimple(classeLangueNom), "Future\").onSuccess(", i18nGlobale.getString(I18n.var_requeteSite), " -> {");
if(
StringUtils.containsAny(classeApiMethode, "POST", "PUT", "PATCH", "DELETE")
StringUtils.containsAny(classeApiMethode, "POST", "PUT", "PATCH", "DELETE"
, i18nGlobale.getString(I18n.var_PageEdition)
, i18nGlobale.getString(I18n.var_PageUtilisateur)
)
&& !(classeRoleSession || classeRoleUtilisateur || classeRoleChacun)
&& (
classeAuth
)
|| !StringUtils.containsAny(classeApiMethode, "POST", "PUT", "PATCH", "DELETE") && (
|| !StringUtils.containsAny(classeApiMethode, "POST", "PUT", "PATCH", "DELETE"
, i18nGlobale.getString(I18n.var_PageEdition)
, i18nGlobale.getString(I18n.var_PageUtilisateur)
) && (
BooleanUtils.isNotTrue(classeRoleSession)
&& BooleanUtils.isNotTrue(classePublicLire)
&& BooleanUtils.isNotTrue(classeRoleUtilisateur)
Expand Down Expand Up @@ -2014,12 +2020,18 @@ public void ecrireGenApiServiceImpl2(String classeLangueNom) throws Exception {
tl(6, "});");

if(
StringUtils.containsAny(classeApiMethode, "POST", "PUT", "PATCH", "DELETE")
StringUtils.containsAny(classeApiMethode, "POST", "PUT", "PATCH", "DELETE"
, i18nGlobale.getString(I18n.var_PageEdition)
, i18nGlobale.getString(I18n.var_PageUtilisateur)
)
&& !(classeRoleSession || classeRoleUtilisateur || classeRoleChacun)
&& (
classeAuth
)
|| !StringUtils.containsAny(classeApiMethode, "POST", "PUT", "PATCH", "DELETE") && (
|| !StringUtils.containsAny(classeApiMethode, "POST", "PUT", "PATCH", "DELETE"
, i18nGlobale.getString(I18n.var_PageEdition)
, i18nGlobale.getString(I18n.var_PageUtilisateur)
) && (
BooleanUtils.isNotTrue(classeRoleSession)
&& BooleanUtils.isNotTrue(classePublicLire)
&& BooleanUtils.isNotTrue(classeRoleUtilisateur)
Expand Down Expand Up @@ -2089,12 +2101,18 @@ public void ecrireGenApiServiceImpl2(String classeLangueNom) throws Exception {

tl(2, i18nGlobale.getString(I18n.var_utilisateur), "(", i18nGlobale.getString(I18n.var_requeteService), ", ", classePartsRequeteSite.nomSimple(classeLangueNom), ".class, ", classePartsUtilisateurSite.nomSimple(classeLangueNom), ".class, ", classePartsUtilisateurSite.nomSimple(classeLangueNom), ".get", i18nGlobale.getString(I18n.var_ClasseApiAddresse), "(), \"post", classePartsUtilisateurSite.nomSimple(classeLangueNom), "Future\", \"patch", classePartsUtilisateurSite.nomSimple(classeLangueNom), "Future\").onSuccess(", i18nGlobale.getString(I18n.var_requeteSite), " -> {");
if(
StringUtils.containsAny(classeApiMethode, "POST", "PUT", "PATCH", "DELETE")
StringUtils.containsAny(classeApiMethode, "POST", "PUT", "PATCH", "DELETE"
, i18nGlobale.getString(I18n.var_PageEdition)
, i18nGlobale.getString(I18n.var_PageUtilisateur)
)
&& !(classeRoleSession || classeRoleUtilisateur || classeRoleChacun)
&& (
classeAuth
)
|| !StringUtils.containsAny(classeApiMethode, "POST", "PUT", "PATCH", "DELETE") && (
|| !StringUtils.containsAny(classeApiMethode, "POST", "PUT", "PATCH", "DELETE"
, i18nGlobale.getString(I18n.var_PageEdition)
, i18nGlobale.getString(I18n.var_PageUtilisateur)
) && (
BooleanUtils.isNotTrue(classeRoleSession)
&& BooleanUtils.isNotTrue(classePublicLire)
&& BooleanUtils.isNotTrue(classePageRecherchePublicLire && classeApiMethode.equals(i18nGlobale.getString(I18n.var_PageRecherche)))
Expand Down Expand Up @@ -2400,12 +2418,18 @@ else if(classeApiMethode.equals(i18nGlobale.getString(I18n.var_PUTFusion)) || cl
}

if(
StringUtils.containsAny(classeApiMethode, "POST", "PUT", "PATCH", "DELETE")
StringUtils.containsAny(classeApiMethode, "POST", "PUT", "PATCH", "DELETE"
, i18nGlobale.getString(I18n.var_PageEdition)
, i18nGlobale.getString(I18n.var_PageUtilisateur)
)
&& !(classeRoleSession || classeRoleUtilisateur || classeRoleChacun)
&& (
classeAuth
)
|| !StringUtils.containsAny(classeApiMethode, "POST", "PUT", "PATCH", "DELETE") && (
|| !StringUtils.containsAny(classeApiMethode, "POST", "PUT", "PATCH", "DELETE"
, i18nGlobale.getString(I18n.var_PageEdition)
, i18nGlobale.getString(I18n.var_PageUtilisateur)
) && (
BooleanUtils.isNotTrue(classeRoleSession)
&& BooleanUtils.isNotTrue(classePublicLire)
&& BooleanUtils.isNotTrue(classePageRecherchePublicLire && classeApiMethode.equals(i18nGlobale.getString(I18n.var_PageRecherche)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2610,7 +2610,7 @@ else if("LocalDate".equals(entiteNomSimple)) {

//STUFF0
if(auteurGenPageEditionJinja != null) {
o = auteurGenPageEditionJinja;
o = auteurFormulaireRechercheJinja;
for(String classeApiMethode : classeApiMethodes) {
String classeApiOperationIdMethode = classeDoc.getString("classeApiOperationId" + classeApiMethode + "_" + langueNom + "_stored_string");
String classeApiUriMethode = classeDoc.getString("classeApiUri" + classeApiMethode + "_" + langueNom + "_stored_string");
Expand Down

0 comments on commit 6cee5db

Please sign in to comment.