From 6abbad99059d97b5143ef451476d91a2cae11cc7 Mon Sep 17 00:00:00 2001 From: Jonas Haugland Date: Thu, 28 Apr 2022 12:54:00 +0200 Subject: [PATCH] Split sequenceDiagramManage into ManageTournament and ManageTeam --- .../sequenceDiagramManage.puml | 89 ------------------- .../sequenceDiagramManageTeam.puml | 62 +++++++++++++ .../sequenceDiagramManageTournament.puml | 80 +++++++++++++++++ 3 files changed, 142 insertions(+), 89 deletions(-) delete mode 100644 documentation/sequence_diagrams/sequenceDiagramManage.puml create mode 100644 documentation/sequence_diagrams/sequenceDiagramManageTeam.puml create mode 100644 documentation/sequence_diagrams/sequenceDiagramManageTournament.puml diff --git a/documentation/sequence_diagrams/sequenceDiagramManage.puml b/documentation/sequence_diagrams/sequenceDiagramManage.puml deleted file mode 100644 index 3ea117a..0000000 --- a/documentation/sequence_diagrams/sequenceDiagramManage.puml +++ /dev/null @@ -1,89 +0,0 @@ -@startuml Manage Tournament -title Manage Tournament -skinparam actorStyle awesome - -Actor Admin #palegreen -participant Website -database Server #brown -hide footbox - -alt Manage Teams - Admin->Website: manageTeamsButton() - activate Admin - activate Website - Website-->Admin: redirect(/tournament/{id}/teams) - opt Add - Admin->Website: addTeam(name) - opt Error - Website-->Admin: displayError(error) - end - Website->Server: addTeam(id,name) - activate Server - Server-->Website: postTeam(team) - deactivate Server - Website-->Admin: updateTeamList(team) - deactivate Admin - deactivate Website - end - opt Edit - Admin->Website: selectTeam(team) - activate Admin - activate Website - Website->Server: getTeam(team) - activate Server - Server-->Website: postTeam(team) - deactivate Server - Website-->Admin: showTeam(team) - deactivate Admin - deactivate Website - end - - opt Delete - Admin->Website: deleteTeam(team) - activate Admin - activate Website - Website->Server: removeTeam(team:id) - activate Server - Server-->Website: postTeam(team) - deactivate Server - Website-->Admin: updateTeamList(team) - opt Error - Website-->Admin: displayError(error) - end - deactivate Admin - deactivate Website - end -end - -alt Select Match Winner - Admin->Website: chooseWinner(match,team) - activate Admin - activate Website - Website->Server: updateMatch(id:matchID,winner:teamID) - activate Server - Server-->Website: updateParentOf(child:matchID) - deactivate Server - Website-->Admin: displayTournament(Tournament) -deactivate Admin -deactivate Website -end - -alt Delete Tournament - Admin->Website: removeTournament(tournament) - activate Admin - activate Website - Website-->Admin: confirm ? Yes : No; - opt Yes - activate Server - Website->Server: removeTournament(tournament:id) - Website-->Admin: redirect(/homePage) - deactivate Server - end - opt No - Website-->Admin: close(confirmationDialogue) - end - deactivate Admin - deactivate Website -end - -@enduml \ No newline at end of file diff --git a/documentation/sequence_diagrams/sequenceDiagramManageTeam.puml b/documentation/sequence_diagrams/sequenceDiagramManageTeam.puml new file mode 100644 index 0000000..2744bbc --- /dev/null +++ b/documentation/sequence_diagrams/sequenceDiagramManageTeam.puml @@ -0,0 +1,62 @@ +@startuml Manage Team +title Manage Team +skinparam actorStyle awesome + +Actor Admin #palegreen +participant Website +database Server #brown +hide footbox + +Admin->Website: manageTeams() +activate Admin +activate Website +Website-->Admin: redirect(/tournament/{id}/teams) + +alt Add + Admin->Website: addTeam(name) + opt Error + Website-->Admin: displayError(error) + end + Website->Server: addTeam(id,name) + activate Server + Server-->Website: postTeam(team) + deactivate Server + Website-->Admin: updateTeamList(team) + deactivate Admin + deactivate Website +end + +alt Edit + Admin->Website: selectTeam(team) + activate Admin + activate Website + opt Error + Website-->Admin: displayError(error) + end + Website->Server: getTeam(team) + activate Server + Server-->Website: postTeam(team) + deactivate Server + Website-->Admin: showTeam(team) + deactivate Admin + deactivate Website +end + +alt Delete +Admin->Website: deleteTeam(team) +activate Admin +activate Website + opt Error + Website-->Admin: displayError(error) + end + Website->Server: removeTeam(team:id) + activate Server + Server-->Website: postTeam(team) + deactivate Server + Website-->Admin: updateTeamList(team) + +deactivate Admin +deactivate Website +end + +@enduml \ No newline at end of file diff --git a/documentation/sequence_diagrams/sequenceDiagramManageTournament.puml b/documentation/sequence_diagrams/sequenceDiagramManageTournament.puml new file mode 100644 index 0000000..85a3674 --- /dev/null +++ b/documentation/sequence_diagrams/sequenceDiagramManageTournament.puml @@ -0,0 +1,80 @@ +@startuml Manage Tournament +title Manage Tournament +skinparam actorStyle awesome + +Actor Admin #palegreen +participant Website +database Server #brown +hide footbox + +alt Select Match Winner + Admin->Website: chooseWinner(match,team) + activate Admin + activate Website + opt Error + Website-->Admin: displayError(error) + end + Website->Server: updateMatch(id:matchID,winner:teamID) + activate Server + Server-->Website: updateParentOf(child:matchID) + deactivate Server + Website-->Admin: displayTournament(Tournament) +deactivate Admin +deactivate Website +end + +alt Undo Match Winner + Admin->Website: undoWinner(match,team) + activate Admin + activate Website + opt Error + Website-->Admin: displayError(error) + end + Website->Server: updateMatch(id:matchID,winner:teamID) + activate Server + Server-->Website: updateParentOf(child:matchID) + deactivate Server + Website-->Admin: displayTournament(Tournament) +deactivate Admin +deactivate Website +end + +alt Edit Tournament + Admin->Website: editTournament(Tournament) + activate Admin + activate Website + opt Error + Website-->Admin: displayError(error) + end + Website-->Admin: redirect(/tournament/{id}/manage) + Website->Server: updateTournament(Tournament) + activate Server + Server-->Website: displayTournament(Tournament) + deactivate Server + Website-->Admin: displayTournament(Tournament) + deactivate Admin +deactivate Website +end + +alt Delete Tournament + Admin->Website: removeTournament(tournament) + activate Admin + activate Website + Website-->Admin: confirm ? Yes : No; + opt Error + Website-->Admin: displayError(error) + end + opt Yes + activate Server + Website->Server: removeTournament(tournament:id) + Website-->Admin: redirect(/homePage) + deactivate Server + end + opt No + Website-->Admin: close(confirmationDialogue) + end + deactivate Admin + deactivate Website +end + +@enduml \ No newline at end of file