1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118