@startuml
class EditorController {
    +__construct (model : TacticModel)
    + openEditorFor(tactic:TacticInfo): ViewHttpResponse
    + createNew(): ViewHttpResponse
    + openTestEditor(courtType:CourtType): ViewHttpResponse
    + createNewOfKind(type:CourtType, session:SessionHandle): ViewHttpResponse
    + openEditor(id:int, session:SessionHandle): ViewHttpResponse
}
EditorController *-- "- model" TacticModel

class TacticModel {
    + TACTIC_DEFAULT_NAME:int {static}{frozen}
    + __construct(tactics : TacticInfoGateway)
    + makeNew(name:string, ownerId:int, type:CourtType): TacticInfo
    + makeNewDefault(ownerId:int, type:CourtType): ?TacticInfo
    + get(id:int): ?TacticInfo
    + getLast(nb:int, ownerId:int): array
    + getAll(ownerId:int): ?array
    + updateName(id:int, name:string, authId:int): array
    + updateContent(id:int, json:string): ?ValidationFail
}

TacticModel *-- "- tactics" TacticInfoGateway

class TacticInfoGateway{
    + __construct(con : Connexion)
    + get(id:int): ?TacticInfo
    + getLast(nb:int, ownerId:int): ?array
    + getAll(ownerId:int): ?array
    + insert(name:string, owner:int, type:CourtType): int
    + updateName(id:int, name:string): bool
    + updateContent(id:int, json:string): bool
}

TacticInfoGateway *--"- con" Connexion

class TacticValidator{
    + validateAccess(tacticId:int, tactic:?TacticInfo, ownerId:int): ?ValidationFail {static}
}

EditorController ..> TacticValidator

@enduml