refactor: Streamlined the API of the services
authorKai Moritz <kai@juplo.de>
Sun, 8 Jan 2023 15:28:17 +0000 (16:28 +0100)
committerKai Moritz <kai@juplo.de>
Sun, 15 Jan 2023 18:37:26 +0000 (19:37 +0100)
commitf9b0d9a71a85741983a451a51fdbd1c38632be87
tree65e720c3dd7277d24197bd603e853d5212e701c3
parent2e9c772ba87cb848babce496dc3a044f8d5e9ccc
refactor: Streamlined the API of the services

- `ChatRoomService` and `ChatHomeService` both return only reactive types.
- The decission stems from the wish, to become reactive all the way from
  the client to the technical implementation of the backend-services.
- This faciliates the mapping of the results in `ChatBackendController`.
- The refactoring already simplified lots of code, where a `Flux` has
  to derived from the `Stream`, yielding a good feeling about the plan,
  that is pursued with this refactoring.
- The refactoring also lead to the decision that `UnknownChatroomException`
  realy is a business-logic-exception (that according refactoring was
  already performed in the previous commits, to ceap this commit clean).
src/main/java/de/juplo/kafka/chat/backend/ChatBackendApplication.java
src/main/java/de/juplo/kafka/chat/backend/api/ChatBackendController.java
src/main/java/de/juplo/kafka/chat/backend/domain/ChatHome.java
src/test/java/de/juplo/kafka/chat/backend/api/ChatBackendControllerTest.java
src/test/java/de/juplo/kafka/chat/backend/persistence/LocalJsonFilesStorageStrategyIT.java