Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: org/milligan/eccles/ReportType.java


1   package org.milligan.eccles;
2   
3   /**
4    * A report type, name, level, code etc.
5    * @author Ian Tomey
6    *
7    */
8   
9   public class ReportType {
10    /** Code of report type */
11    private String code;
12    /** Level of report */
13    private int level;
14    /** Description of report */
15    private String description;
16  
17    /** Level for counters - will not have messages reported but will be counted by the ResultCollator */
18    public static final int COUNTER_LEVEL=0;
19  
20    /** All levels including this one and above are 'errors' and will be reported to JUnit */
21    public static final int ERROR_LEVEL=4;
22  
23    public ReportType(String code, String description, int level) {
24      this.code = code;
25      this.description = description;
26      this.level = level;
27    }
28  
29    public ReportType()
30    {}
31  
32    /**
33     * Returns true if the level of this object is a least the error level
34     * @return
35     */
36    public boolean isAtLeastError() {
37      return level>=ERROR_LEVEL;
38    }
39  
40    public void setCode(String code) {
41      this.code = code;
42    }
43    public String getCode() {
44      return code;
45    }
46    public void setLevel(int level) {
47      this.level = level;
48    }
49    public int getLevel() {
50      return level;
51    }
52    public void setDescription(String description) {
53      this.description = description;
54    }
55    public String getDescription() {
56      return description;
57    }
58  
59  
60  }