cdx.scorebot.net
Class CompetitionConfiguration

java.lang.Object
  extended by cdx.scorebot.net.ConfigurationTemplate
      extended by cdx.scorebot.net.CompetitionConfiguration
All Implemented Interfaces:
java.io.Serializable

public class CompetitionConfiguration
extends ConfigurationTemplate
implements java.io.Serializable

This contains only the IP addresses of teams and the IP addresses and ports of the services which are to be tested from a template NetworkTestPackage. It allows for the easy re-use and mass-modification of NetworkTestPackages across many teams.

Author:
David Underhill
See Also:
Serialized Form

Nested Class Summary
 class CompetitionConfiguration.TeamInfo
          Contains the skeleton information for a team
 
Field Summary
static java.lang.String EXT
          extension to use for files holding this type
 
Fields inherited from class cdx.scorebot.net.ConfigurationTemplate
ntp, pathToNTP, suiteInfo
 
Constructor Summary
CompetitionConfiguration(java.lang.String fn)
          create a CompetitionConfiguration NetworkTestPackage from the NetworkTestPackage in the specified file
 
Method Summary
 void addTeam(java.lang.String name)
          adds a team
 boolean equals(java.lang.Object o)
           
 java.util.Vector<java.lang.String> getFilenames()
          gets the filenames each team's template will be saved to by makeConfigs
 java.lang.String getName()
          gets the name of the competition this applies to
 java.util.Vector<CompetitionConfiguration.TeamInfo> getTeamInfo()
          gets the names and ip/hostname prefixes of the teams participating in this competition
 void makeConfigs()
          make configuration files for each team
 
Methods inherited from class cdx.scorebot.net.ConfigurationTemplate
addMissingSuites, equals, gentleLoadNTP, getPathToNTP, getSuiteInfo, getUnconfiguredNTP, indexOfSkel, loadNTP, refreshSuites, setPathToNTP
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXT

public static final java.lang.String EXT
extension to use for files holding this type

See Also:
Constant Field Values
Constructor Detail

CompetitionConfiguration

public CompetitionConfiguration(java.lang.String fn)
                         throws com.thoughtworks.xstream.core.BaseException,
                                java.io.FileNotFoundException
create a CompetitionConfiguration NetworkTestPackage from the NetworkTestPackage in the specified file

Parameters:
fn - where to load the NetworkTestPackage from (best if this is a relative path)
Throws:
com.thoughtworks.xstream.core.BaseException - if the object cannot be deserialized
java.io.FileNotFoundException - occurs if the file is not found
Method Detail

getName

public java.lang.String getName()
gets the name of the competition this applies to


addTeam

public void addTeam(java.lang.String name)
adds a team


getTeamInfo

public java.util.Vector<CompetitionConfiguration.TeamInfo> getTeamInfo()
gets the names and ip/hostname prefixes of the teams participating in this competition


getFilenames

public java.util.Vector<java.lang.String> getFilenames()
gets the filenames each team's template will be saved to by makeConfigs


makeConfigs

public void makeConfigs()
                 throws com.thoughtworks.xstream.core.BaseException,
                        java.io.FileNotFoundException
make configuration files for each team

Throws:
com.thoughtworks.xstream.core.BaseException
java.io.FileNotFoundException

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object