|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmodel.TournamentManager
public class TournamentManager
Class is used to manage the tournaments in the program and to provide an interface for the user interface. This is a static class.
Nested Class Summary | |
---|---|
private static class |
TournamentManager.DataFileFilter
|
Field Summary | |
---|---|
private static java.util.HashMap<ID,Tournament> |
closed_tournaments
|
private static java.util.HashMap<ID,Tournament> |
open_tournaments
|
Constructor Summary | |
---|---|
TournamentManager()
|
Method Summary | |
---|---|
static Tournament |
addTournament(Tournament new_tournament)
Creates a new tournament data file and adds tournament header information to the tournament list file (tournaments.xml) (tournament id number and filename are generated automatically) |
static void |
closeTournament(ID tournament_id)
|
static void |
deleteEntry(ID tournament_id,
ID entry_id)
|
static void |
deleteTournament(ID tournament_id)
|
static Tournament |
getClosedTournament(ID tournament_id)
Returns a closed tournament with the given tournament id number. |
static Tournament[] |
getClosedTournaments()
|
static EntryInitializer |
getEntryInitializer(ID tournament_id)
|
static EntryUpdater |
getEntryUpdater(ID tournament_id,
ID entry_id)
|
static Tournament |
getOpenTournament(ID tournament_id)
Returns an open tournament with the given tournament id number. |
static Tournament[] |
getOpenTournaments()
|
static EntryInitializer |
getPreEntryInitializer(ID tournament_id)
|
static EntryUpdater |
getPreEntryUpdater(ID tournament_id,
ID entry_id)
|
static Tournament |
getTournament(ID tournament_id)
|
static TournamentInitializer |
getTournamentInitializer()
Returns a TournamentInitializer object that can be used to create a new tournament. |
static TournamentUpdater |
getTournamentUpdater(ID tournament_id)
|
static void |
readTournamentDataFromDisk()
Reads the tournament data files from the data folder. |
static void |
reopenTournament(ID tournament_id)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static java.util.HashMap<ID,Tournament> open_tournaments
private static java.util.HashMap<ID,Tournament> closed_tournaments
Constructor Detail |
---|
public TournamentManager()
Method Detail |
---|
public static void readTournamentDataFromDisk() throws GoException
GoException
- thrown if the there are problems reading the data filespublic static TournamentInitializer getTournamentInitializer() throws GoException
GoException
public static TournamentUpdater getTournamentUpdater(ID tournament_id) throws GoException
GoException
public static EntryInitializer getEntryInitializer(ID tournament_id) throws GoException
GoException
public static EntryInitializer getPreEntryInitializer(ID tournament_id) throws GoException
GoException
public static EntryUpdater getEntryUpdater(ID tournament_id, ID entry_id) throws GoException
GoException
public static EntryUpdater getPreEntryUpdater(ID tournament_id, ID entry_id) throws GoException
GoException
public static void deleteEntry(ID tournament_id, ID entry_id) throws TournamentNotFoundException, EntryNotFoundException, GoIOException
TournamentNotFoundException
EntryNotFoundException
GoIOException
public static void closeTournament(ID tournament_id) throws TournamentNotFoundException, GoIOException
TournamentNotFoundException
GoIOException
public static void reopenTournament(ID tournament_id) throws TournamentNotFoundException, GoIOException
TournamentNotFoundException
GoIOException
public static void deleteTournament(ID tournament_id) throws GoException
GoException
public static Tournament addTournament(Tournament new_tournament) throws GoException
GoException
public static Tournament getTournament(ID tournament_id) throws TournamentNotFoundException
TournamentNotFoundException
public static Tournament getOpenTournament(ID tournament_id) throws TournamentNotFoundException
TournamentNotFoundException
public static Tournament getClosedTournament(ID tournament_id) throws TournamentNotFoundException
TournamentNotFoundException
public static Tournament[] getOpenTournaments()
public static Tournament[] getClosedTournaments()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |