Clover Coverage Report
Coverage timestamp: Fri May 24 2013 13:47:27 UTC
../../../../../img/srcFileCovDistChart9.png 45% of files have more coverage
10   103   8   1.25
0   32   0.8   8
8     1  
1    
 
  PluginResults       Line # 25 10 8 83.3% 0.8333333
 
  (27)
 
1    /* This file is part of the project "Hilbert II" - http://www.qedeq.org
2    *
3    * Copyright 2000-2013, Michael Meyling <mime@qedeq.org>.
4    *
5    * "Hilbert II" is free software; you can redistribute
6    * it and/or modify it under the terms of the GNU General Public
7    * License as published by the Free Software Foundation; either
8    * version 2 of the License, or (at your option) any later version.
9    *
10    * This program is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13    * GNU General Public License for more details.
14    */
15   
16    package org.qedeq.kernel.bo.module;
17   
18    import org.qedeq.kernel.se.common.SourceFileExceptionList;
19   
20    /**
21    * Holds the results from a plugin execution.
22    *
23    * @author Michael Meyling
24    */
 
25    public class PluginResults {
26   
27    /** Errors that occurred. */
28    private SourceFileExceptionList errors;
29   
30    /** Warnings that occurred. */
31    private SourceFileExceptionList warnings;
32   
33    /**
34    * Creates a new result container.
35    */
 
36  69 toggle public PluginResults() {
37  69 errors = new SourceFileExceptionList();
38  69 warnings = new SourceFileExceptionList();
39    }
40   
41    /**
42    * Clear all warnings and errors.
43    */
 
44  0 toggle public void clear() {
45  0 errors.clear();
46  0 warnings.clear();
47    }
48   
49    /**
50    * Get list of all errors.
51    *
52    * @return Error list. Is never <code>null</code>.
53    */
 
54  184 toggle public SourceFileExceptionList getErrors() {
55  184 return errors;
56    }
57   
58    /**
59    * Add errors.
60    *
61    * @param errors Add these errors.
62    */
 
63  71 toggle public void addErrors(final SourceFileExceptionList errors) {
64  71 this.errors.add(errors);
65    }
66   
67    /**
68    * Get list of all warnings.
69    *
70    * @return Warnings list. Is never <code>null</code>.
71    */
 
72  181 toggle public SourceFileExceptionList getWarnings() {
73  181 return warnings;
74    }
75   
76    /**
77    * Add warnings.
78    *
79    * @param warnings Add these warnings.
80    */
 
81  71 toggle public void addWarnings(final SourceFileExceptionList warnings) {
82  71 this.warnings.add(warnings);
83    }
84   
85    /**
86    * Are there any errors?
87    *
88    * @return Errors exist.
89    */
 
90  6 toggle public boolean hasErrors() {
91  6 return errors.size() > 0;
92    }
93   
94    /**
95    * Are there any warnings.
96    *
97    * @return Warnings exist.
98    */
 
99  3 toggle public boolean hasWarnings() {
100  3 return warnings.size() > 0;
101    }
102   
103    }