diff --git a/trivial-doc/modules/developement/examples/sequenceJoinGame.puml b/trivial-doc/modules/developement/examples/sequenceJoinGame.puml index c3c626594bc2ba475eefd3d3ccd40c42bbc0e51c..5b66695f86b21692521f1f3c3bc6a68994e0770d 100644 --- a/trivial-doc/modules/developement/examples/sequenceJoinGame.puml +++ b/trivial-doc/modules/developement/examples/sequenceJoinGame.puml @@ -1,79 +1,29 @@ @startuml +title Connection participant Client -participant Controller -participant WebSocketMiddleware as WebSocket -participant Service +participant HTTPRedirectServer +participant OAuthService +participant UserController +participant UserService +participant GameDao database Database autonumber -Client -> Controller : menu() -activate Controller -Controller -> Service : getAvailableGames() -activate Service -Service -> Database : -activate Database -Database --> Service -deactivate Database -Service --> Controller -deactivate Service -Controller --> Client -deactivate Controller -Client -> Client : render(gamesList) - -Client -> Controller : POST /game/connect/gameId -activate Client -note left -POST request -sending data -{user, gameId} -end note -activate Controller -Controller -> Service : connectToGame() -activate Service -Service -> Database : getGameById(gameId) - -group alt - activate Database - Database --> Service : Game game - deactivate - Service -> Service : addPlayer(user, game) - activate Service - Service -> Database : storeGame(game) - deactivate Service - Service --> Controller : game - deactivate Service - Controller --> Client : game - deactivate Controller - Client -> Client : renderGameBoard(game) - activate Client - deactivate - Client -> Client : connectToSocket(gameId) - activate Client - - Client -> WebSocket : GET /webSocketURLendPoint - note left - WebSocket connexion - end note - WebSocket --> Client - Client -> WebSocket : subscribe(url/gameId, data) - WebSocket --> Client - deactivate Client - deactivate Client +Client --> HTTPRedirectServer : GET .../games +group ref [OAuth abstraction] +OAuthService --> Client : token +end +HTTPRedirectServer --> UserController : menu() +UserController --> UserService : getAvailableGames() +UserService --> GameDao : getAll() +GameDao --> UserService : gameInterface +UserService --> UserController +UserController --> HTTPRedirectServer +HTTPRedirectServer --> Client -else Game not found or not available - activate Database - activate Service - activate Controller - Database --> Service : Error - deactivate Database - Service --> Controller : Error - deactivate Service - Controller --> Client : Error - deactivate Controller -end @enduml \ No newline at end of file diff --git a/trivial-doc/modules/developement/pages/composants.adoc b/trivial-doc/modules/developement/pages/composants.adoc index d0025c7ecbe2d2ad0f0a814c4d2df6eadafa4162..8a5dc9b42b9699963294a41c362536a8f2deb2e4 100644 --- a/trivial-doc/modules/developement/pages/composants.adoc +++ b/trivial-doc/modules/developement/pages/composants.adoc @@ -196,7 +196,7 @@ Interface PawnInterface{ == Interactions -.Rejoindre une partie +.Rejoindre une partief [plantuml] .... include::example$sequenceJoinGame.puml[]