net.codescore.controllers
Class TeamController

java.lang.Object
  extended by net.codescore.controllers.UIController
      extended by net.codescore.controllers.CompController
          extended by net.codescore.controllers.TeamController
All Implemented Interfaces:
Runnable, Controller, ProblemUpdateListener, SubUpdateListener

public class TeamController
extends CompController
implements ProblemUpdateListener, SubUpdateListener

Controller for the team home.

Author:
Adam Cornett

Field Summary
private  Team team
           
private  TeamHome tHome
           
 
Fields inherited from class net.codescore.controllers.UIController
log, SLEEP_TIME
 
Constructor Summary
TeamController(TeamHome th, Team t, CompetitionManager cm)
           
 
Method Summary
 void addClarification(String question)
           
 void addPracticeSubmission(ObjectContext oc, String source, Language l, Problem p)
           
 void addSubmission(ObjectContext oc, String source, Language l, Problem p)
           
 Team getTeam()
           
 void onProblemAdd(Problem p)
          Callback used when a problem has been added.
 void onProblemUpdate(Problem p)
          Callback used when a problem has been updated.
 void onSubAdd(TeamSubmission s)
          Callback for a new submission
 void onSubUpdate(TeamSubmission s)
          Callback for an updated submission
 void processUpdates()
          Called by the UI controller thread when there are updates pending
 boolean subAllowed()
           
 String toString()
           
 
Methods inherited from class net.codescore.controllers.CompController
getCompetition, getCompManager
 
Methods inherited from class net.codescore.controllers.UIController
run, setPendingUpdates, stopRunning, updateDesktop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

team

private Team team

tHome

private TeamHome tHome
Constructor Detail

TeamController

public TeamController(TeamHome th,
                      Team t,
                      CompetitionManager cm)
Method Detail

addClarification

public void addClarification(String question)

addPracticeSubmission

public void addPracticeSubmission(ObjectContext oc,
                                  String source,
                                  Language l,
                                  Problem p)

addSubmission

public void addSubmission(ObjectContext oc,
                          String source,
                          Language l,
                          Problem p)

getTeam

public Team getTeam()

onProblemAdd

public void onProblemAdd(Problem p)
Description copied from interface: ProblemUpdateListener
Callback used when a problem has been added.

Specified by:
onProblemAdd in interface ProblemUpdateListener
Parameters:
p - The problem that has been added.

onProblemUpdate

public void onProblemUpdate(Problem p)
Description copied from interface: ProblemUpdateListener
Callback used when a problem has been updated.

Specified by:
onProblemUpdate in interface ProblemUpdateListener
Parameters:
p - The problem that was updated.

onSubAdd

public void onSubAdd(TeamSubmission s)
Description copied from interface: SubUpdateListener
Callback for a new submission

Specified by:
onSubAdd in interface SubUpdateListener
Parameters:
s - The new submission

onSubUpdate

public void onSubUpdate(TeamSubmission s)
Description copied from interface: SubUpdateListener
Callback for an updated submission

Specified by:
onSubUpdate in interface SubUpdateListener
Parameters:
s - The updated submission

processUpdates

public void processUpdates()
Description copied from interface: Controller
Called by the UI controller thread when there are updates pending

Specified by:
processUpdates in interface Controller
Specified by:
processUpdates in class UIController

subAllowed

public boolean subAllowed()

toString

public String toString()
Overrides:
toString in class UIController


Copyright 2008 © Adam Cornett, Andrew Conner All Rights Reserved.