diff --git a/documentation/domainModel.puml b/documentation/domainModel.puml index 66b736e..d6d971d 100644 --- a/documentation/domainModel.puml +++ b/documentation/domainModel.puml @@ -25,14 +25,15 @@ class Tournament { Teams } -class Administrator { +class Admin { *admin_id Name Email + google_id Manager-status } -class User { +class Guest { } @@ -40,8 +41,8 @@ Team "2..*" -- "1..*" Tournament : "Plays in" Tournament "1" -- "1..*" Match : "Contains" Team "2..2" -- "1..*" Match : "Competes in" -Administrator "1..*" -- "0..*" Tournament : "Manages" -Administrator "1..*" -- "0..*" Team : "Manages" -User "0..*" --> "0..*" Tournament : "View overview" +Admin "1..*" -- "0..*" Tournament : "Manages" +Admin "1..*" -- "0..*" Team : "Manages" +Guest "0..*" --> "0..*" Tournament : "View overview" @enduml \ No newline at end of file diff --git a/documentation/screenshots/user_manual/manage_teams.png b/documentation/screenshots/user_manual/manage_teams.png index 059efeb..fc4ad44 100644 Binary files a/documentation/screenshots/user_manual/manage_teams.png and b/documentation/screenshots/user_manual/manage_teams.png differ diff --git a/documentation/sequence_diagrams/sequenceDiagramCreate.puml b/documentation/sequence_diagrams/sequenceDiagramCreate.puml index a07e577..09309e8 100644 --- a/documentation/sequence_diagrams/sequenceDiagramCreate.puml +++ b/documentation/sequence_diagrams/sequenceDiagramCreate.puml @@ -1,5 +1,7 @@ @startuml Create Tournament title Create Tournament +skinparam actorStyle awesome + Actor Admin #palegreen participant Website database Server #brown diff --git a/documentation/sequence_diagrams/sequenceDiagramLogin.puml b/documentation/sequence_diagrams/sequenceDiagramLogin.puml index 892570e..eda0212 100644 --- a/documentation/sequence_diagrams/sequenceDiagramLogin.puml +++ b/documentation/sequence_diagrams/sequenceDiagramLogin.puml @@ -1,5 +1,7 @@ @startuml Asura Tournament System title Login +skinparam actorStyle awesome + Actor Admin #palegreen participant Website database Server #brown @@ -14,13 +16,13 @@ activate Server deactivate Server alt status = success Website-->Admin: "Login Successful" -opt if (isManager(user)) - Website->Admin: redirect(managerPage) +opt if (userIsAdmin) + Website->Admin: redirect(frontPage) else - Website->Admin: redirect(adminPage) + Website->Admin: redirect(noSuchUserPage) + end end -end deactivate Website deactivate Admin @enduml \ No newline at end of file diff --git a/documentation/sequence_diagrams/sequenceDiagramManage.puml b/documentation/sequence_diagrams/sequenceDiagramManage.puml index 085b59f..ea5947b 100644 --- a/documentation/sequence_diagrams/sequenceDiagramManage.puml +++ b/documentation/sequence_diagrams/sequenceDiagramManage.puml @@ -1,5 +1,7 @@ @startuml Manage Tournament title Manage Tournament +skinparam actorStyle awesome + Actor Admin #palegreen participant Website database Server #brown @@ -9,13 +11,13 @@ alt Manage Teams Admin->Website: manageTeamsButton() activate Admin activate Website - Website-->Admin: redirect(/tournament/id/teams) + Website-->Admin: redirect(/tournament/{id}/teams) opt Add - Admin->Website: addTeam(name,members) + Admin->Website: addTeam(name) opt Error Website-->Admin: displayError(error) end - Website->Server: addTeam(id,name,members) + Website->Server: addTeam(id,name) activate Server Server-->Website: postTeam(team) deactivate Server @@ -31,60 +33,43 @@ alt Manage Teams activate Server Server-->Website: postTeam(team) deactivate Server - Website-->Admin: showTeam(team,members) - opt Add Member - Admin->Website: addMember(name) - activate Server - Website->Server: updateTeam(team,member:name) - Website-->Admin: showTeam(team,member) - deactivate Server - end - opt Remove Member - Admin->Website: removeMember(id) - activate Server - Website->Server: updateTeam(team,member:id) - Website-->Admin: showTeam(team,member) - deactivate Server - deactivate Admin - deactivate Website - end - + Website-->Admin: showTeam(team) end opt Delete activate Admin activate Website Admin->Website: deleteTeam(team) - Website-->Admin: confirm ? Yes : No; - opt Error - Website-->Admin: displayError(error) - end - opt Yes - Website->Server: removeTeam(team:id) - activate Server - Server-->Website: postTeam(team) - deactivate Server - Website-->Admin: updateTeamList(team) - end - opt No - Website-->Admin: redirect(/tournament/tournament/id/teams) - end - deactivate Admin - deactivate 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 + 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 @@ -93,9 +78,10 @@ alt Delete Tournament deactivate Server end opt No - Website-->Admin: redirect(/tournaments/id/) + Website-->Admin: close(confirmationDialogue) end deactivate Admin deactivate Website end + @enduml \ No newline at end of file diff --git a/documentation/sequence_diagrams/sequenceDiagramManager.puml b/documentation/sequence_diagrams/sequenceDiagramManager.puml index c50bc46..2f686af 100644 --- a/documentation/sequence_diagrams/sequenceDiagramManager.puml +++ b/documentation/sequence_diagrams/sequenceDiagramManager.puml @@ -1,5 +1,7 @@ @startuml Manger View title Manager View +skinparam actorStyle awesome + Actor Manager #lime participant Website database Server #brown @@ -11,20 +13,24 @@ note left of Manager #white end note alt View Admins +Manager->Website: viewAdmins() activate Manager activate Website - Manager->Website: viewAdmins() activate Server Website->Server: requestList(Admins) Website<--Server: sendList(Admins) deactivate Server Manager<--Website: displayAdmins() +deactivate Manager +deactivate Website end alt Add Admins - Manager->Website: addAdmin(name,passwd) + Manager->Website: createAdmin(email) + activate Manager + activate Website activate Server - Website->Server: addUser(id,name,passwd) + Website->Server: createAdmin(email) Website<--Server: {status: success | failure} deactivate Server opt status = success @@ -38,12 +44,16 @@ deactivate Server else status = failure Manager<--Website: displayError(error) end +deactivate Manager +deactivate Website end alt Remove Admins Manager->Website: removeAdmin(name) + activate Manager + activate Website activate Server - Website->Server: removeUser(id) + Website->Server: removeAdmin(id) Website<--Server: {status: success | failure} deactivate Server opt status = success diff --git a/documentation/sequence_diagrams/sequenceDiagramUser.puml b/documentation/sequence_diagrams/sequenceDiagramUser.puml index e489e93..445b932 100644 --- a/documentation/sequence_diagrams/sequenceDiagramUser.puml +++ b/documentation/sequence_diagrams/sequenceDiagramUser.puml @@ -1,24 +1,24 @@ -@startuml User View -title User View -actor User #LightBlue +@startuml Guest View +title Guest View +skinparam actorStyle awesome +actor Guest #LightBlue participant Website database Server #Brown hide footbox -User->Website: viewTournament(Tournament) -activate User +Guest->Website: viewTournament(Tournament) +activate Guest activate Website Website->Server: fetchTournament(Tournament) activate Server Server-->Website: {status: success | failure} deactivate Server alt status = success -Website-->User: displayTournament(Tournament) +Website-->Guest: displayTournament(Tournament) else status = failure -Website-->User: displayError(error) -deactivate User +Website-->Guest: displayError(error) +deactivate Guest deactivate Website end -@enduml - +@enduml \ No newline at end of file diff --git a/documentation/useCaseDiagram.puml b/documentation/useCaseDiagram.puml index bf46bfe..02be819 100644 --- a/documentation/useCaseDiagram.puml +++ b/documentation/useCaseDiagram.puml @@ -13,7 +13,7 @@ package Administrators { MgrNote .l.|> adm } -actor User as u1 +actor Guest left to right direction rectangle System { @@ -36,9 +36,6 @@ rectangle System { together { usecase "Add team" as TeamAdd usecase "Delete team" as TeamDel - usecase "Manage team" as TeamMng - usecase "Add members" as MembAdd - usecase "Remove members" as MembDel } together { usecase "View tournaments" as TouVtou @@ -56,7 +53,7 @@ mgr --> SysLogin adm --> SysLogin adm --> HomeView -u1 --> HomeView +Guest --> HomeView SysLogin --> MngTou SysLogin --> TouCreateT @@ -70,12 +67,8 @@ MngTou --> TeamView TeamView --> TeamAdd TeamView --> TeamDel -TeamView --> TeamMng - -TeamMng --> MembAdd -TeamMng --> MembDel - HomeView --> TouVtou HomeView --> TouVmatch + @enduml \ No newline at end of file