80 lines
2.0 KiB
Plaintext
80 lines
2.0 KiB
Plaintext
|
@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
|