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>
Mon, 9 Jan 2023 19:57:47 +0000 (20:57 +0100)
commit2c9068fec6871e14e94c08d30a908a27ed8b21e5
tree3111441dc490baeab9714cc4542e904e7cf7063c
parentb510ee93a7771e391f0374d1a6606383ce026f64
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