model
Class TournamentInitializer

java.lang.Object
  extended by model.tournament.TournamentDataModel
      extended by model.tournament.TournamentDataModelEditor
          extended by model.TournamentInitializer

public class TournamentInitializer
extends TournamentDataModelEditor

TournamentInitializer is used to create a new Tournament object. When the run-method is called the a new Tournament object is created with the data in the initializer and added to the TournamentManager. A subclass of TournamentDataModelEditor.


Constructor Summary
TournamentInitializer(ID tournament_id)
          Creates a new initializer with the given ID object.
 
Method Summary
protected  void addDiscount(Discount discount)
          An implementation of the abstract method in superclass TournamentDataModel.
 void addDiscount(java.lang.String name, java.lang.String amount, boolean dominant)
          An implementation of the abstract method in superclass TournamentDataModel.
 void run()
          An implementation of the abstract method in superclass TournamentDataModel.
 
Methods inherited from class model.tournament.TournamentDataModelEditor
setBaseFee, setBaseFee, setDate, setDate, setDefaultCountry, setDefaultCountry, setHtml, setName, setPreregistrationOpen, setTournamentOpen
 
Methods inherited from class model.tournament.TournamentDataModel
getBaseFee, getDate, getDefaultCountry, getDiscounts, getHtml, getId, getName, hasDiscountId, isPreRegistrationOpen, isTournamentOpen, removeDiscount, setDiscounts
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TournamentInitializer

public TournamentInitializer(ID tournament_id)
                      throws GoException
Creates a new initializer with the given ID object.

Throws:
GoException
Method Detail

addDiscount

protected void addDiscount(Discount discount)
An implementation of the abstract method in superclass TournamentDataModel. Implemented here so that the package 'model' can see the method. Adds a Discount object to the data structure.

Overrides:
addDiscount in class TournamentDataModel

addDiscount

public void addDiscount(java.lang.String name,
                        java.lang.String amount,
                        boolean dominant)
An implementation of the abstract method in superclass TournamentDataModel. Implemented here so that the method has public visibility. Creates a new Discount object from the parameters and adds it to the data structure.

Specified by:
addDiscount in class TournamentDataModelEditor

run

public void run()
         throws GoException
An implementation of the abstract method in superclass TournamentDataModel. Implemented here so that the method has public visibility. When the method is called the a new Tournament object is created with the data in this TournamentInitializer instance and added to the TournamentManager.

Specified by:
run in class TournamentDataModelEditor
Throws:
GoException