Coverage details for com.topcoder.testframework.ApplicationServer

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 {@link Server} class and is the base class for all classes representing an application
11  * server to be used while running tests. Those classes will have corresponding elements in the Ant build file.
12  * <p/>
13  * <b>Supported attributes:</b> <ul><li><tt>warfile</tt> - implementation defines if is required, defines a war file to
14  * be deployed during server startup</li> <li><tt>earfile</tt> - implementation defines if is required, defines an ear
15  * file deployed during server startup</li> </ul>
16  * <p/>
17  * <b>Note:</b> <tt>warfile</tt> and <tt>earfile</tt> can not be specified together
18  * <p/>
19  * This class is mutable, i.e. not thread-safe.
20  *
21  * @author real_vg, TCSDEVELOPER
22  * @version 1.0
23  */
24 public abstract class ApplicationServer extends Server {
25  
26     /**
27      * This field represents the <tt>warfile</tt> attribute,which specifies the web application archive that should be
28      * tested. The archive must already contain everything needed for running tests. Derived classes specify if this
29      * attribute is required. Can't be set together with the <tt>earfile</tt> attribute. The field is initialized to
30      * <tt>null</tt> and set via the {@link #setWarFile(java.io.File)} method.
31      */
3299    private File warFile = null;
33  
34     /**
35      * This field represents the <tt>earfile</tt> attribute, which specifies the enterprise application archive that
36      * should be tested. The archive must contain a web module that already contains everything needed for running tests
37      * Derived classes specify if this attribute is required. Can't be set together with <tt>warfile</tt> attribute. The
38      * field is initialized to <tt>null</tt> and set via the {@link #setEarFile(java.io.File)} method.
39      */
4099    private File earFile = null;
41  
42     /**
43      * Creates an ApplicationServer instance. The type of server represented by the class is specified. Type is a string
44      * like <tt>"tomcat5x"</tt>, which actually specifies the name and version of the server.
45      *
46      * @param type the type of the server
47      *
48      * @throws org.apache.tools.ant.BuildException
49      * if the type of the server is unrecognized, or any other error happens
50      * @throws IllegalArgumentException if type is <tt>null</tt>
51      */
52     protected ApplicationServer(final String type) {
53         //arg checking done in super method
54101        super(type);
5599    }
56  
57     /**
58      * This method sets the value of the <tt>warfile</tt> attribute, which specifies the web application archive that
59      * should be tested. The archive must already contain everything needed for running tests.
60      *
61      * @param warFile the value of the <tt>warfile</tt> attribute to be set
62      */
63     public void setWarFile(final File warFile) {
645        this.warFile = warFile;
655    }
66  
67     /**
68      * This method returns the value of the <tt>warfile</tt> attribute, which specifies the web application archive that
69      * should be tested. The archive must already contain everything needed for running tests.
70      *
71      * @return the value of the <tt>warfile</tt> attribute
72      */
73     public File getWarFile() {
749        return warFile;
75     }
76  
77     /**
78      * This method sets the value of the <tt>earfile</tt> attribute, which specifies the enterprise application archive
79      * that should be tested. The archive must contain a web module that already contains everything needed for running
80      * tests.
81      *
82      * @param earFile the value of the <tt>earfile</tt> attribute to be set
83      */
84     public void setEarFile(final File earFile) {
853        this.earFile = earFile;
863    }
87  
88     /**
89      * This method returns the value of the <tt>earfile</tt> attribute, which specifies the enterprise application
90      * archive that should be tested. The archive must contain a web module that already contains everything needed for
91      * running tests.
92      *
93      * @return the value of the <tt>earfile</tt> attribute
94      */
95     public File getEarFile() {
969        return earFile;
97     }
98 }

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.