Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
StatMerger |
|
| 1.0;1 |
1 | //////////////////////////////////////////////////////////////////////////////// | |
2 | // | |
3 | // ObjectLab is sponsoring QALab | |
4 | // | |
5 | // Based in London, we are world leaders in the design and development | |
6 | // of bespoke applications for the Securities Financing markets. | |
7 | // | |
8 | // <a href="http://www.objectlab.co.uk/open">Click here to learn more</a> | |
9 | // ___ _ _ _ _ _ | |
10 | // / _ \| |__ (_) ___ ___| |_| | __ _| |__ | |
11 | // | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \ | |
12 | // | |_| | |_) | | __/ (__| |_| |__| (_| | |_) | | |
13 | // \___/|_.__// |\___|\___|\__|_____\__,_|_.__/ | |
14 | // |__/ | |
15 | // | |
16 | // http://www.ObjectLab.co.uk | |
17 | // --------------------------------------------------------------------------- | |
18 | // | |
19 | //QALab is released under the GNU General Public License. | |
20 | // | |
21 | //QALab: Collects QA Statistics from your build over time. | |
22 | //2005+, ObjectLab Ltd | |
23 | // | |
24 | //This library is free software; you can redistribute it and/or | |
25 | //modify it under the terms of the GNU General Public | |
26 | //License as published by the Free Software Foundation; either | |
27 | //version 2.1 of the License, or (at your option) any later version. | |
28 | // | |
29 | //This library is distributed in the hope that it will be useful, | |
30 | //but WITHOUT ANY WARRANTY; without even the implied warranty of | |
31 | //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
32 | //General Public License for more details. | |
33 | // | |
34 | //You should have received a copy of the GNU General Public | |
35 | //License along with this library; if not, write to the Free Software | |
36 | //Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
37 | // | |
38 | //////////////////////////////////////////////////////////////////////////////// | |
39 | package net.objectlab.qalab.parser; | |
40 | ||
41 | import org.xml.sax.InputSource; | |
42 | ||
43 | import net.objectlab.qalab.interfaces.QALabExporter; | |
44 | import net.objectlab.qalab.util.TaskLogger; | |
45 | ||
46 | /** | |
47 | * Interface defining the statistics mergers. There will be implementations | |
48 | * for Checkstyle, PMD, FindBugs and Simian. | |
49 | * | |
50 | * Created by IntelliJ IDEA. User: xhensevalb Date: 17-Feb-2004 Time: 10:27:11 | |
51 | * @author Benoit Xhenseval | |
52 | * @version $Revision: 187 $ | |
53 | */ | |
54 | public interface StatMerger { | |
55 | // ~ Methods | |
56 | // ------------------------------------------------------------------------ | |
57 | ||
58 | /** | |
59 | * if quiet is true, the merger should limit its log output. | |
60 | * @param quiet true to minimise logging. | |
61 | */ | |
62 | void setQuiet(boolean quiet); | |
63 | ||
64 | /** | |
65 | * set the task logger, ie mechanism to log issues & debug info. | |
66 | * @param task the logger to use | |
67 | */ | |
68 | void setTaskLogger(TaskLogger task); | |
69 | ||
70 | /** | |
71 | * Stipulates the source directory for the code. | |
72 | * @param srcDir the source directory. | |
73 | */ | |
74 | void setSrcDir(String srcDir); | |
75 | ||
76 | /** | |
77 | * @return the total number of 'violations' detected. | |
78 | */ | |
79 | int getTotalStatistics(); | |
80 | ||
81 | /** | |
82 | * @return the number of files found. | |
83 | */ | |
84 | int getFileCount(); | |
85 | ||
86 | /** | |
87 | * merge the stats from node to the combined stats document. | |
88 | * @param source the XML containing the new statistics. | |
89 | * @param exporter the exporter to use for the compiled stats. | |
90 | */ | |
91 | void mergeStats(InputSource source, QALabExporter exporter); | |
92 | ||
93 | /** | |
94 | * @return the statistics type handled by this merger. | |
95 | */ | |
96 | String getType(); | |
97 | ||
98 | /** | |
99 | * set the timestamp (optional) for the merged stats. | |
100 | * @param timestamp the time stamp in format YYYY-MM-dd HH:mm:ss | |
101 | * @param timeStampAsDate The timeStampAsDateOnly to set. | |
102 | */ | |
103 | void setMergerTimeStamp(final String timestamp, | |
104 | final boolean timeStampAsDate); | |
105 | ||
106 | /** | |
107 | * This may have been changed to "now". | |
108 | * @return timestamp the time stamp in format YYYY-MM-dd HH:mm:ss | |
109 | */ | |
110 | String getMergerTimeStamp(); | |
111 | } | |
112 | /* | |
113 | * ObjectLab is sponsoring QALab | |
114 | * | |
115 | * Based in London, we are world leaders in the design and development | |
116 | * of bespoke applications for the securities financing markets. | |
117 | * | |
118 | * <a href="http://www.objectlab.co.uk/open">Click here to learn more about us</a> | |
119 | * ___ _ _ _ _ _ | |
120 | * / _ \| |__ (_) ___ ___| |_| | __ _| |__ | |
121 | * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \ | |
122 | * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) | | |
123 | * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/ | |
124 | * |__/ | |
125 | * | |
126 | * www.ObjectLab.co.uk | |
127 | */ |