View Javadoc
1   /*
2    * Licensed under the GPL License. You may not use this file except in compliance with the License.
3    * You may obtain a copy of the License at
4    *
5    *   https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
6    *
7    * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
8    * WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
9    * PURPOSE.
10   */
11  package psiprobe.model;
12  
13  /**
14   * POJO representing "quick check" report.
15   */
16  public class TomcatTestReport {
17  
18    /** The Constant TEST_UNKNOWN. */
19    public static final int TEST_UNKNOWN = 0;
20  
21    /** The Constant TEST_PASSED. */
22    public static final int TEST_PASSED = 1;
23  
24    /** The Constant TEST_FAILED. */
25    public static final int TEST_FAILED = 2;
26  
27    /**
28     * The default memory size.
29     *
30     * {@value #DEFAULT_MEMORY_SIZE}
31     */
32    public static final int DEFAULT_MEMORY_SIZE = 1024 * 1024;
33  
34    /** The default file count. */
35    private static final int DEFAULT_FILE_COUNT = 10;
36  
37    /** The context name. */
38    private String contextName;
39  
40    /** The data source name. */
41    private String dataSourceName;
42  
43    /** The datasource usage score. */
44    private int datasourceUsageScore;
45  
46    /** The max service time. */
47    private long maxServiceTime;
48  
49    /** The datasource test. */
50    private int datasourceTest = TEST_UNKNOWN;
51  
52    /** The file test. */
53    private int fileTest = TEST_UNKNOWN;
54  
55    /** The memory test. */
56    private int memoryTest = TEST_UNKNOWN;
57  
58    /** The webapp availability test. */
59    private int webappAvailabilityTest = TEST_UNKNOWN;
60  
61    /** The test duration. */
62    private long testDuration;
63  
64    /**
65     * Gets the context name.
66     *
67     * @return the context name
68     */
69    public String getContextName() {
70      return contextName;
71    }
72  
73    /**
74     * Sets the context name.
75     *
76     * @param contextName the new context name
77     */
78    public void setContextName(String contextName) {
79      this.contextName = contextName;
80    }
81  
82    /**
83     * Gets the datasource usage score.
84     *
85     * @return the datasource usage score
86     */
87    public int getDatasourceUsageScore() {
88      return datasourceUsageScore;
89    }
90  
91    /**
92     * Sets the datasource usage score.
93     *
94     * @param datasourceUsageScore the new datasource usage score
95     */
96    public void setDatasourceUsageScore(int datasourceUsageScore) {
97      this.datasourceUsageScore = datasourceUsageScore;
98    }
99  
100   /**
101    * Gets the data source name.
102    *
103    * @return the data source name
104    */
105   public String getDataSourceName() {
106     return dataSourceName;
107   }
108 
109   /**
110    * Sets the data source name.
111    *
112    * @param dataSourceName the new data source name
113    */
114   public void setDataSourceName(String dataSourceName) {
115     this.dataSourceName = dataSourceName;
116   }
117 
118   /**
119    * Gets the datasource test.
120    *
121    * @return the datasource test
122    */
123   public int getDatasourceTest() {
124     return datasourceTest;
125   }
126 
127   /**
128    * Sets the datasource test.
129    *
130    * @param datasourceTest the new datasource test
131    */
132   public void setDatasourceTest(int datasourceTest) {
133     this.datasourceTest = datasourceTest;
134   }
135 
136   /**
137    * Gets the file test.
138    *
139    * @return the file test
140    */
141   public int getFileTest() {
142     return fileTest;
143   }
144 
145   /**
146    * Sets the file test.
147    *
148    * @param fileTest the new file test
149    */
150   public void setFileTest(int fileTest) {
151     this.fileTest = fileTest;
152   }
153 
154   /**
155    * Gets the memory test.
156    *
157    * @return the memory test
158    */
159   public int getMemoryTest() {
160     return memoryTest;
161   }
162 
163   /**
164    * Sets the memory test.
165    *
166    * @param memoryTest the new memory test
167    */
168   public void setMemoryTest(int memoryTest) {
169     this.memoryTest = memoryTest;
170   }
171 
172   /**
173    * Gets the default file count.
174    *
175    * @return the default file count
176    */
177   public int getDefaultFileCount() {
178     return DEFAULT_FILE_COUNT;
179   }
180 
181   /**
182    * Gets the test duration.
183    *
184    * @return the test duration
185    */
186   public long getTestDuration() {
187     return testDuration;
188   }
189 
190   /**
191    * Sets the test duration.
192    *
193    * @param testDuration the new test duration
194    */
195   public void setTestDuration(long testDuration) {
196     this.testDuration = testDuration;
197   }
198 
199   /**
200    * Gets the max processing time.
201    *
202    * @return the max processing time
203    */
204   public long getMaxProcessingTime() {
205     return maxServiceTime;
206   }
207 
208   /**
209    * Sets the max service time.
210    *
211    * @param maxProcessingTime the new max service time
212    */
213   public void setMaxServiceTime(long maxProcessingTime) {
214     this.maxServiceTime = maxProcessingTime;
215   }
216 
217   /**
218    * Gets the webapp availability test.
219    *
220    * @return the webapp availability test
221    */
222   public int getWebappAvailabilityTest() {
223     return webappAvailabilityTest;
224   }
225 
226   /**
227    * Sets the webapp availability test.
228    *
229    * @param webappAvailabilityTest the new webapp availability test
230    */
231   public void setWebappAvailabilityTest(int webappAvailabilityTest) {
232     this.webappAvailabilityTest = webappAvailabilityTest;
233   }
234 
235 }