Coverage details for com.topcoder.testframework.DataServer

LineHitsSource
1 /*
2  * Copyright (C) 2006 TopCoder Inc., All Rights Reserved.
3  */
4 package com.topcoder.testframework;
5  
6 import java.io.File;
7  
8  
9 /**
10  * This class is derived from Server class and is the base class for all classes representing data server to be used
11  * while running tests. Those classes will have corresponding elements in the Ant build file. This class is a base for
12  * another component which will provide testing ability for database servers. TestCase classes should also be provided
13  * by that component.
14  * <p/>
15  * <b>Supported attributes:</b> <ul><li><tt>jarfile</tt> - the implementation defines if is required</li></ul>
16  * <p/>
17  * This class is mutable, i.e. not thread-safe.
18  *
19  * @author real_vg, TCSDEVELOPER
20  * @version 1.0
21  */
22 public abstract class DataServer extends Server {
23  
24     /**
25      * This field represents the <tt>jarFile</tt> attribute, which specifies the JAR archive which contains data needed
26      * for data server initialization. Derived classes should determine if this attribute is required. The field is
27      * initialized to <tt>null</tt> and set via the {@link #setJarFile(java.io.File)} method.
28      */
2916    private File jarFile = null;
30  
31     /**
32      * Creates a DataServer instance. The type of server represented by the class is specified. Type is a string like
33      * "mysql4x", which actually specifies the name and version of the server.
34      *
35      * @param type the type of the server
36      *
37      * @throws org.apache.tools.ant.BuildException
38      * if the type of the server is unrecognized, or any other error happens
39      * @throws IllegalArgumentException if type is <tt>null</tt>
40      */
41     protected DataServer(final String type) {
42         //arg checking done in super constructor
4317        super(type);
4416    }
45  
46     /**
47      * This method sets the value of the <tt>jarfile</tt> attribute, which specifies the JAR archive which contains data
48      * needed for data server initialization.
49      *
50      * @param jarFile the value of the <tt>jarfile</tt> attribute to be set
51      */
52     public void setJarFile(final File jarFile) {
531        this.jarFile = jarFile;
541    }
55  
56     /**
57      * This method returns the value of the <tt>jarfile</tt> attribute, which specifies the JAR archive which contains
58      * data needed for data server initialization.
59      *
60      * @return the value of the <tt>jarfile</tt> attribute
61      */
62     public File getJarFile() {
632        return jarFile;
64     }
65 }

this report was generated by version 1.0.5 of jcoverage.
visit www.jcoverage.com for updates.

copyright © 2003, jcoverage ltd. all rights reserved.
Java is a trademark of Sun Microsystems, Inc. in the United States and other countries.