cdx.scorebot.app.util
Class ServiceInfo

java.lang.Object
  extended by cdx.scorebot.app.util.ServiceInfo
All Implemented Interfaces:
java.io.Serializable

public class ServiceInfo
extends java.lang.Object
implements java.io.Serializable

Stores information about a particular service

Author:
David Underhill
See Also:
Serialized Form

Constructor Summary
ServiceInfo()
          Instantiates a ServiceInfo
 
Method Summary
 void addTest(TestInfo ti)
          Adds a test to be tested.
 java.lang.String getDescription()
          gets the description of this service
 java.lang.String getName()
          gets the name of this service
 Service getService()
          gets the service
 ServiceType getServiceType()
          gets the service type
 TestInfo getTest(int index)
          Gets the specified test
 java.util.Vector<TestInfo> getTests()
          gets the tests in this test
 ServiceType getType()
          gets the kind of service this is
 void removeTest(int index)
          Removes the test from this test
 boolean removeTest(TestInfo ti)
          Removes the test from this service
 void setDescription(java.lang.String desc)
          sets the description of this service
 void setName(java.lang.String name)
          sets the name of this service
 void setService(Service service)
          sets the service
 void setType(ServiceType type)
          sets the kind of service this is
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceInfo

public ServiceInfo()
Instantiates a ServiceInfo

Method Detail

getServiceType

public ServiceType getServiceType()
gets the service type


getService

public Service getService()
gets the service


setService

public void setService(Service service)
sets the service


getName

public java.lang.String getName()
gets the name of this service


setName

public void setName(java.lang.String name)
sets the name of this service


getDescription

public java.lang.String getDescription()
gets the description of this service


setDescription

public void setDescription(java.lang.String desc)
sets the description of this service


addTest

public void addTest(TestInfo ti)
Adds a test to be tested.

Parameters:
ti - the test to add to this service

removeTest

public void removeTest(int index)
                throws java.lang.ArrayIndexOutOfBoundsException
Removes the test from this test

Parameters:
index - remove the test at the specified index.
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the index was invalid.

removeTest

public boolean removeTest(TestInfo ti)
Removes the test from this service

Parameters:
ti - the TestInfo to remove
Returns:
false if the specified item wasn't in the list and true otherwise

getTest

public TestInfo getTest(int index)
                 throws java.lang.ArrayIndexOutOfBoundsException
Gets the specified test

Returns:
the TestItem at the specified index in the TestItem vector
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the index was invalid.

getTests

public java.util.Vector<TestInfo> getTests()
gets the tests in this test


getType

public ServiceType getType()
gets the kind of service this is


setType

public void setType(ServiceType type)
sets the kind of service this is