Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
QALabExporter |
|
| 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.interfaces; | |
40 | ||
41 | import net.objectlab.qalab.util.TaskLogger; | |
42 | ||
43 | import java.io.IOException; | |
44 | ||
45 | import java.util.Properties; | |
46 | ||
47 | /** | |
48 | * This is the interface for exporting the statistics from the input | |
49 | * checkstyle, pmd, findbugs or simian; feel free to create your own | |
50 | * to say a database or your specific XML. | |
51 | * @author Benoit Xhenseval | |
52 | * @version $Revision$ | |
53 | */ | |
54 | public interface QALabExporter { | |
55 | /** | |
56 | * Configure the exporter. | |
57 | * For instance for the XML Exporter. | |
58 | * <ul> | |
59 | * <li>qalab.outputfile = the output file name and path.</li> | |
60 | * <li>qalab.classname = alternatively, the XML could be a | |
61 | * resource for this class</li> | |
62 | * <li>qalab.resourcename = the resource name | |
63 | * for the qalab.classname given</li> | |
64 | * </ul> | |
65 | * @param properties the properties used to confirgure the exporter. | |
66 | */ | |
67 | void configure(final Properties properties); | |
68 | ||
69 | /** | |
70 | * Add summary details for this merger of statistics for this type. | |
71 | * @param violationCount total number of violations for this type | |
72 | * @param fileCount total number of files affected by this type. | |
73 | */ | |
74 | void addSummary(final int violationCount, final int fileCount); | |
75 | ||
76 | /** | |
77 | * Add a result entry for a given file name and type. | |
78 | * @param violationCount total number of violations for this type and file. | |
79 | * @param fileName file name | |
80 | * simian, pmd) | |
81 | */ | |
82 | void addFileResult(final int violationCount, | |
83 | final String fileName); | |
84 | ||
85 | /** | |
86 | * Save the results wherever required (depending on the Exporter). | |
87 | * @throws IOException any IO issue. | |
88 | */ | |
89 | void save() throws IOException; | |
90 | ||
91 | /** | |
92 | * set the task logger, ie mechanism to log issues & debug info. | |
93 | * @param task the logger to use | |
94 | */ | |
95 | void setTaskLogger(TaskLogger task); | |
96 | ||
97 | /** | |
98 | * if quiet is true, the merger should limit its log output. | |
99 | * @param quiet true to minimise logging. | |
100 | */ | |
101 | void setQuiet(boolean quiet); | |
102 | } | |
103 | /* | |
104 | * ObjectLab is sponsoring QALab | |
105 | * | |
106 | * Based in London, we are world leaders in the design and development | |
107 | * of bespoke applications for the securities financing markets. | |
108 | * | |
109 | * <a href="http://www.objectlab.co.uk/open">Click here to learn more about us</a> | |
110 | * ___ _ _ _ _ _ | |
111 | * / _ \| |__ (_) ___ ___| |_| | __ _| |__ | |
112 | * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \ | |
113 | * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) | | |
114 | * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/ | |
115 | * |__/ | |
116 | * | |
117 | * www.ObjectLab.co.uk | |
118 | */ |