@@ -2154,7 +2154,8 @@ public void ecrireGenApiServiceImpl2(String classeLangueNom) throws Exception {
2154
2154
&& BooleanUtils .isNotTrue (classePublicLire ) || !StringUtils .equals (classeApiMethodeMethode , "GET" )
2155
2155
) {
2156
2156
if (authPolitiqueGranulee ) {
2157
- tl (3 , "String " , classeVarId , " = " , i18nGlobale .getString (I18n .var_requeteSite ), ".get" , i18nGlobale .getString (I18n .var_RequeteService ), "().getParams().getJsonObject(\" path\" ).getString(\" " , classeVarId , "\" );" );
2157
+ if (classeVarId != null )
2158
+ tl (3 , "String " , classeVarId , " = " , i18nGlobale .getString (I18n .var_requeteSite ), ".get" , i18nGlobale .getString (I18n .var_RequeteService ), "().getParams().getJsonObject(\" path\" ).getString(\" " , classeVarId , "\" );" );
2158
2159
tl (3 , "MultiMap form = MultiMap.caseInsensitiveMultiMap();" );
2159
2160
tl (3 , "form.add(\" grant_type\" , \" urn:ietf:params:oauth:grant-type:uma-ticket\" );" );
2160
2161
tl (3 , "form.add(\" audience\" , config.getString(ComputateConfigKeys.AUTH_CLIENT));" );
@@ -2166,8 +2167,10 @@ public void ecrireGenApiServiceImpl2(String classeLangueNom) throws Exception {
2166
2167
tl (3 , "form.add(\" permission\" , String.format(\" %s#%s\" , " , classeNomSimple , "." , i18nGlobale .getString (I18n .var_CLASSE_NOM_SIMPLE ), ", \" DELETE\" ));" );
2167
2168
tl (3 , "form.add(\" permission\" , String.format(\" %s#%s\" , " , classeNomSimple , "." , i18nGlobale .getString (I18n .var_CLASSE_NOM_SIMPLE ), ", \" PATCH\" ));" );
2168
2169
tl (3 , "form.add(\" permission\" , String.format(\" %s#%s\" , " , classeNomSimple , "." , i18nGlobale .getString (I18n .var_CLASSE_NOM_SIMPLE ), ", \" PUT\" ));" );
2169
- tl (3 , "if(" , classeVarId , " != null)" );
2170
- tl (4 , "form.add(\" permission\" , String.format(\" %s-%s#%s\" , " , classeNomSimple , "." , i18nGlobale .getString (I18n .var_CLASSE_NOM_SIMPLE ), ", " , classeVarId , ", \" " , classeApiMethodeMethode , "\" ));" );
2170
+ if (classeVarId != null ) {
2171
+ tl (3 , "if(" , classeVarId , " != null)" );
2172
+ tl (4 , "form.add(\" permission\" , String.format(\" %s-%s#%s\" , " , classeNomSimple , "." , i18nGlobale .getString (I18n .var_CLASSE_NOM_SIMPLE ), ", " , classeVarId , ", \" " , classeApiMethodeMethode , "\" ));" );
2173
+ }
2171
2174
if (classeRoleUtilisateur ) {
2172
2175
tl (3 , i18nGlobale .getString (I18n .var_requeteSite ), ".set" , i18nGlobale .getString (I18n .var_PublicLire ), "(" , i18nGlobale .getString (I18n .var_classe ), i18nGlobale .getString (I18n .var_PublicLire ), ");" );
2173
2176
}
@@ -4099,8 +4102,12 @@ else if(classeApiMethode.contains(i18nGlobale.getString(I18n.var_Telechargement)
4099
4102
tl (3 , "}" );
4100
4103
} else {
4101
4104
tl (3 , "if(json == null) {" );
4102
- tl (4 , "String " , classeVarId , " = " , i18nGlobale .getString (I18n .var_requeteSite ), ".get" , i18nGlobale .getString (I18n .var_RequeteService ), "().getParams().getJsonObject(\" path\" ).getString(\" " , classeVarId , "\" );" );
4103
- tl (6 , "String m = String.format(\" " , i18nGlobale .getString (I18n .str_s_s_non_trouve ), "\" , \" " , classeNomAdjectifSingulier , "\" , " , classeVarId , ");" );
4105
+ if (classeVarId == null ) {
4106
+ tl (4 , "String m = String.format(\" " , i18nGlobale .getString (I18n .str_s_s_non_trouve ), "\" , \" " , classeNomAdjectifSingulier , "\" , null);" );
4107
+ } else {
4108
+ tl (4 , "String " , classeVarId , " = " , i18nGlobale .getString (I18n .var_requeteSite ), ".get" , i18nGlobale .getString (I18n .var_RequeteService ), "().getParams().getJsonObject(\" path\" ).getString(\" " , classeVarId , "\" );" );
4109
+ tl (4 , "String m = String.format(\" " , i18nGlobale .getString (I18n .str_s_s_non_trouve ), "\" , \" " , classeNomAdjectifSingulier , "\" , " , classeVarId , ");" );
4110
+ }
4104
4111
tl (4 , "promise.complete(new ServiceResponse(404" );
4105
4112
tl (6 , ", m" );
4106
4113
tl (6 , ", Buffer.buffer(new JsonObject().put(\" " , i18nGlobale .getString (I18n .var_message ), "\" , m).encodePrettily()), null));" );
0 commit comments