asura-tmdb/documentation/sequence_diagrams/sequenceDiagramManage.puml

89 lines
2.3 KiB
Plaintext

@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