Skip to content

Feat enabling 726 add dto on communication#1004

Open
vbillard91 wants to merge 9 commits into
develop-b2schoolfrom
feat-ENABLING-726-add-dto-on-communication
Open

Feat enabling 726 add dto on communication#1004
vbillard91 wants to merge 9 commits into
develop-b2schoolfrom
feat-ENABLING-726-add-dto-on-communication

Conversation

@vbillard91
Copy link
Copy Markdown
Contributor

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.

  • Chore (PATCH)
  • Doc (PATCH)
  • Bug fix (PATCH)
  • New feature (MINOR)

Which packages changed?

Please check the name of the package you changed

  • admin
  • app-registry
  • archive
  • auth
  • cas
  • common
  • communication
  • conversation
  • directory
  • feeder
  • infra
  • portal
  • session
  • test
  • tests
  • timeline
  • workspace

Tests

  1. Describe here the tests you performed
  2. Step by step
  3. With expected results

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 ! 😃

@vbillard91 vbillard91 force-pushed the feat-ENABLING-726-add-dto-on-communication branch from 216fbec to 6c15893 Compare April 21, 2026 15:29
@damienromito damienromito force-pushed the develop-b2school branch 2 times, most recently from 194562b to fbe7968 Compare April 23, 2026 08:22
@vbillard91 vbillard91 force-pushed the feat-ENABLING-726-add-dto-on-communication branch 2 times, most recently from 9a71dce to 7fc913d Compare April 24, 2026 13:33
@juniorode juniorode force-pushed the feat-ENABLING-726-add-dto-on-communication branch from 7fc913d to ffa92b6 Compare April 28, 2026 12:41
@damienromito damienromito force-pushed the develop-b2school branch 2 times, most recently from 042ff72 to bef2d4b Compare April 29, 2026 14:38
@Romu-C Romu-C force-pushed the develop-b2school branch from 374ec46 to 8a8cc32 Compare April 30, 2026 07:49
@jenkinsEdificePublic jenkinsEdificePublic force-pushed the develop-b2school branch 2 times, most recently from 3b07390 to 3e0ba32 Compare May 4, 2026 11:56
@vbillard91 vbillard91 force-pushed the feat-ENABLING-726-add-dto-on-communication branch from ffa92b6 to d34430f Compare May 6, 2026 11:37
});
}

private static <T> JsonArray serialize(JsonArray arr, Function<JsonObject, T> mapper) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ce genre de méthodes il faudrait plutôt qu'on les mette dans web-utils pour les réutiliser partout

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

import java.util.List;

@JsonInclude(JsonInclude.Include.NON_NULL)
public class BusUserDTO {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pour des raisons d'immutabilité, on est partis sur des DTO immuables.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comme plus haut, ce genre de fonctions utilitaires on les mettra dans web-utils

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay

@vbillard91 vbillard91 force-pushed the feat-ENABLING-726-add-dto-on-communication branch from d34430f to 9930207 Compare May 12, 2026 12:07
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants