Feat enabling 726 add dto on communication#1004
Conversation
216fbec to
6c15893
Compare
a99baec to
c19eb4b
Compare
194562b to
fbe7968
Compare
fbe7968 to
e9763b1
Compare
9a71dce to
7fc913d
Compare
02da02e to
e6985f6
Compare
7fc913d to
ffa92b6
Compare
042ff72 to
bef2d4b
Compare
374ec46 to
8a8cc32
Compare
3b07390 to
3e0ba32
Compare
ffa92b6 to
d34430f
Compare
| }); | ||
| } | ||
|
|
||
| private static <T> JsonArray serialize(JsonArray arr, Function<JsonObject, T> mapper) { |
There was a problem hiding this comment.
Ce genre de méthodes il faudrait plutôt qu'on les mette dans web-utils pour les réutiliser partout
| import java.util.List; | ||
|
|
||
| @JsonInclude(JsonInclude.Include.NON_NULL) | ||
| public class BusUserDTO { |
There was a problem hiding this comment.
Pour des raisons d'immutabilité, on est partis sur des DTO immuables.
There was a problem hiding this comment.
C'est possible mais incompatible avec l'usage de @dataobject car par design les mappers générés utilisent des setter
| import io.vertx.core.json.JsonObject; | ||
| import org.entcore.communication.dto.rest.BusUserDTO; | ||
|
|
||
| public class BusUserDtoMapper { |
There was a problem hiding this comment.
Au lieu d'écrire ces mappers à la mano on pourrait les générer avec @dataobject et vertxgen
https://github.com/eclipse-vertx/vertx-codegen/tree/master/vertx-codegen-processor#data-objects
There was a problem hiding this comment.
C'est possible mais incompatible avec l'immutabilité car par design les mappers générés utilisent des setter
| neo4j.execute(query, params, validResultHandler(handler)); | ||
| } | ||
|
|
||
| private static <T> Future<T> toFuture(java.util.function.Consumer<Handler<Either<String, T>>> call) { |
There was a problem hiding this comment.
Comme plus haut, ce genre de fonctions utilitaires on les mettra dans web-utils
c173a6f to
75b90ec
Compare
d34430f to
9930207
Compare
|



Description
Please include a summary of the changes and the related issue.
Fixes
(Enter here Jira or Redmine ticket(s) links)
Type of change
Please check options that are relevant.
Which packages changed?
Please check the name of the package you changed
Tests
Reminder
Security flaws
Performance impacts (think bulk !)
Unit tests were replayed
Unit tests were added and/or changed
I have updated the reminder for the version including my modifications
All done ! 😃