2022-03-16 11:23:33 +01:00
|
|
|
@startuml Manage Tournament
|
|
|
|
title Manage Tournament
|
2022-04-27 11:24:19 +02:00
|
|
|
skinparam actorStyle awesome
|
|
|
|
|
2022-03-16 11:23:33 +01:00
|
|
|
Actor Admin #palegreen
|
|
|
|
participant Website
|
|
|
|
database Server #brown
|
|
|
|
hide footbox
|
|
|
|
|
|
|
|
alt Manage Teams
|
|
|
|
Admin->Website: manageTeamsButton()
|
2022-03-16 13:53:42 +01:00
|
|
|
activate Admin
|
|
|
|
activate Website
|
2022-04-27 11:24:19 +02:00
|
|
|
Website-->Admin: redirect(/tournament/{id}/teams)
|
2022-03-16 13:53:42 +01:00
|
|
|
opt Add
|
2022-04-27 11:24:19 +02:00
|
|
|
Admin->Website: addTeam(name)
|
2022-03-16 13:53:42 +01:00
|
|
|
opt Error
|
|
|
|
Website-->Admin: displayError(error)
|
|
|
|
end
|
2022-04-27 11:24:19 +02:00
|
|
|
Website->Server: addTeam(id,name)
|
2022-03-16 13:53:42 +01:00
|
|
|
activate Server
|
|
|
|
Server-->Website: postTeam(team)
|
|
|
|
deactivate Server
|
|
|
|
Website-->Admin: updateTeamList(team)
|
|
|
|
deactivate Admin
|
|
|
|
deactivate Website
|
|
|
|
end
|
2022-03-16 12:17:23 +01:00
|
|
|
opt Edit
|
2022-03-16 13:53:42 +01:00
|
|
|
Admin->Website: selectTeam(team)
|
|
|
|
activate Admin
|
|
|
|
activate Website
|
|
|
|
Website->Server: getTeam(team)
|
|
|
|
activate Server
|
|
|
|
Server-->Website: postTeam(team)
|
|
|
|
deactivate Server
|
2022-04-27 11:24:19 +02:00
|
|
|
Website-->Admin: showTeam(team)
|
2022-03-16 11:23:33 +01:00
|
|
|
end
|
2022-03-16 13:53:42 +01:00
|
|
|
|
2022-03-16 11:23:33 +01:00
|
|
|
opt Delete
|
2022-03-16 13:53:42 +01:00
|
|
|
activate Admin
|
|
|
|
activate Website
|
|
|
|
Admin->Website: deleteTeam(team)
|
2022-04-27 11:24:19 +02:00
|
|
|
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
|
2022-03-16 11:23:33 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
alt Select Match Winner
|
|
|
|
Admin->Website: chooseWinner(match,team)
|
2022-04-27 11:24:19 +02:00
|
|
|
activate Admin
|
|
|
|
activate Website
|
2022-03-16 11:23:33 +01:00
|
|
|
Website->Server: updateMatch(id:matchID,winner:teamID)
|
2022-04-27 11:24:19 +02:00
|
|
|
activate Server
|
|
|
|
Server-->Website: updateParentOf(child:matchID)
|
|
|
|
deactivate Server
|
2022-03-16 12:17:23 +01:00
|
|
|
Website-->Admin: displayTournament(Tournament)
|
2022-04-27 11:24:19 +02:00
|
|
|
deactivate Admin
|
|
|
|
deactivate Website
|
2022-03-16 11:23:33 +01:00
|
|
|
end
|
|
|
|
|
2022-03-16 12:17:23 +01:00
|
|
|
alt Delete Tournament
|
2022-03-16 13:53:42 +01:00
|
|
|
Admin->Website: removeTournament(tournament)
|
2022-04-27 11:24:19 +02:00
|
|
|
activate Admin
|
|
|
|
activate Website
|
2022-03-16 13:53:42 +01:00
|
|
|
Website-->Admin: confirm ? Yes : No;
|
|
|
|
opt Yes
|
|
|
|
activate Server
|
|
|
|
Website->Server: removeTournament(tournament:id)
|
|
|
|
Website-->Admin: redirect(/homePage)
|
|
|
|
deactivate Server
|
|
|
|
end
|
|
|
|
opt No
|
2022-04-27 11:24:19 +02:00
|
|
|
Website-->Admin: close(confirmationDialogue)
|
2022-03-16 13:53:42 +01:00
|
|
|
end
|
|
|
|
deactivate Admin
|
|
|
|
deactivate Website
|
2022-03-16 12:17:23 +01:00
|
|
|
end
|
2022-04-27 11:24:19 +02:00
|
|
|
|
2022-03-16 11:23:33 +01:00
|
|
|
@enduml
|