cdx.scorebot.net
Class TeamConfiguration

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

public class TeamConfiguration
extends ConfigurationTemplate
implements java.io.Serializable

This contains only 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.

Author:
David Underhill
See Also:
Serialized Form

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
  TeamConfiguration(java.lang.String fn)
          create a Skeleton NetworkTestPackage from the NetworkTestPackage in the specified file
protected TeamConfiguration(java.lang.String fn, java.lang.String ownerName, java.util.Vector<TestSuiteSkeleton> suiteInfo, NetworkTestPackage ntp)
          create a Skeleton NetworkTestPackage from the NetworkTestPackage in the specified file
 
Method Summary
 boolean equals(java.lang.Object o)
           
 NetworkTestPackage getConfiguredNTP()
          Configures the NetworkTestPackage this holds and returns it.
 NetworkTestPackage getFullyConfiguredNTP()
          Configures the NetworkTestPackage this holds and returns it.
 java.lang.String getOwnerName()
          gets the name of the team this is for
 void setOwnerName(java.lang.String ownerName)
          sets the name of the team this is for
 
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

TeamConfiguration

public TeamConfiguration(java.lang.String fn)
                  throws com.thoughtworks.xstream.core.BaseException,
                         java.io.FileNotFoundException
create a Skeleton 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

TeamConfiguration

protected TeamConfiguration(java.lang.String fn,
                            java.lang.String ownerName,
                            java.util.Vector<TestSuiteSkeleton> suiteInfo,
                            NetworkTestPackage ntp)
create a Skeleton NetworkTestPackage from the NetworkTestPackage in the specified file

Parameters:
fn - where to load the NetworkTestPackage from (best if this is a relative path)
suiteInfo - the skeleton suite info
ntp - the configuration to run with
ownerName - the name of the team
Throws:
com.thoughtworks.xstream.core.BaseException - if the object cannot be deserialized
java.io.FileNotFoundException - occurs if the file is not found
Method Detail

equals

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

getConfiguredNTP

public NetworkTestPackage getConfiguredNTP()
Configures the NetworkTestPackage this holds and returns it. Any TestSuites in the NetworkTestPackage template which are not configured by this skeleton are removed.

Returns:
NetworkTestPackage with only the suites configured by this skeleton.

getFullyConfiguredNTP

public NetworkTestPackage getFullyConfiguredNTP()
Configures the NetworkTestPackage this holds and returns it. If any of the TestSuites from the template aren't assigned, null is returned.

Returns:
a configured NetworkTestPackage or null if not all of the suites in the NetworkTestPackage are configured.

getOwnerName

public java.lang.String getOwnerName()
gets the name of the team this is for


setOwnerName

public void setOwnerName(java.lang.String ownerName)
                  throws IllegalArgValException
sets the name of the team this is for

Throws:
IllegalArgValException