Mercurial > lada > lada-server
annotate src/main/java/de/intevation/lada/data/importer/ReportData.java @ 366:567ce7697fc7 0.5
Code documentation.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Tue, 10 Sep 2013 15:55:54 +0200 |
parents | b6f770956cae |
children | 183f8116d9a6 |
rev | line source |
---|---|
338
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.lada.data.importer; |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
2 |
366
567ce7697fc7
Code documentation.
Raimund Renkert <rrenkert@intevation.de>
parents:
338
diff
changeset
|
3 /** |
567ce7697fc7
Code documentation.
Raimund Renkert <rrenkert@intevation.de>
parents:
338
diff
changeset
|
4 * Container for error or warning messages send to the client. |
567ce7697fc7
Code documentation.
Raimund Renkert <rrenkert@intevation.de>
parents:
338
diff
changeset
|
5 * |
567ce7697fc7
Code documentation.
Raimund Renkert <rrenkert@intevation.de>
parents:
338
diff
changeset
|
6 * Errors and warnings are specified by the key-value pair that caused the problem and a code. |
567ce7697fc7
Code documentation.
Raimund Renkert <rrenkert@intevation.de>
parents:
338
diff
changeset
|
7 * The code can be |
567ce7697fc7
Code documentation.
Raimund Renkert <rrenkert@intevation.de>
parents:
338
diff
changeset
|
8 * 670: Parser error |
567ce7697fc7
Code documentation.
Raimund Renkert <rrenkert@intevation.de>
parents:
338
diff
changeset
|
9 * 671: existing |
567ce7697fc7
Code documentation.
Raimund Renkert <rrenkert@intevation.de>
parents:
338
diff
changeset
|
10 * 672: duplicated entry |
567ce7697fc7
Code documentation.
Raimund Renkert <rrenkert@intevation.de>
parents:
338
diff
changeset
|
11 * 673: missing |
567ce7697fc7
Code documentation.
Raimund Renkert <rrenkert@intevation.de>
parents:
338
diff
changeset
|
12 * 674: date error |
567ce7697fc7
Code documentation.
Raimund Renkert <rrenkert@intevation.de>
parents:
338
diff
changeset
|
13 * or any validation code. |
567ce7697fc7
Code documentation.
Raimund Renkert <rrenkert@intevation.de>
parents:
338
diff
changeset
|
14 * |
567ce7697fc7
Code documentation.
Raimund Renkert <rrenkert@intevation.de>
parents:
338
diff
changeset
|
15 * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a> |
567ce7697fc7
Code documentation.
Raimund Renkert <rrenkert@intevation.de>
parents:
338
diff
changeset
|
16 */ |
338
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
17 public class ReportData |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
18 { |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
19 private String key; |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
20 private String value; |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
21 private Integer code; |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
22 |
366
567ce7697fc7
Code documentation.
Raimund Renkert <rrenkert@intevation.de>
parents:
338
diff
changeset
|
23 /** |
567ce7697fc7
Code documentation.
Raimund Renkert <rrenkert@intevation.de>
parents:
338
diff
changeset
|
24 * Default constructor. |
567ce7697fc7
Code documentation.
Raimund Renkert <rrenkert@intevation.de>
parents:
338
diff
changeset
|
25 */ |
338
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
26 public ReportData() { |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
27 } |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
28 |
366
567ce7697fc7
Code documentation.
Raimund Renkert <rrenkert@intevation.de>
parents:
338
diff
changeset
|
29 /** |
567ce7697fc7
Code documentation.
Raimund Renkert <rrenkert@intevation.de>
parents:
338
diff
changeset
|
30 * Constructor to create a {@link ReportData} object with data. |
567ce7697fc7
Code documentation.
Raimund Renkert <rrenkert@intevation.de>
parents:
338
diff
changeset
|
31 * @param key The key caused the error/warning. |
567ce7697fc7
Code documentation.
Raimund Renkert <rrenkert@intevation.de>
parents:
338
diff
changeset
|
32 * @param value The value caused the error/warning. |
567ce7697fc7
Code documentation.
Raimund Renkert <rrenkert@intevation.de>
parents:
338
diff
changeset
|
33 * @param code The code specifying the error/warning. |
567ce7697fc7
Code documentation.
Raimund Renkert <rrenkert@intevation.de>
parents:
338
diff
changeset
|
34 */ |
338
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
35 public ReportData(String key, String value, Integer code) { |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
36 this.key = key; |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
37 this.value = value; |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
38 this.code = code; |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
39 } |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
40 |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
41 /** |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
42 * @return the key |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
43 */ |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
44 public String getKey() { |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
45 return key; |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
46 } |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
47 |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
48 /** |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
49 * @param key the key to set |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
50 */ |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
51 public void setKey(String key) { |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
52 this.key = key; |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
53 } |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
54 |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
55 /** |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
56 * @return the value |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
57 */ |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
58 public String getValue() { |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
59 return value; |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
60 } |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
61 |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
62 /** |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
63 * @param value the value to set |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
64 */ |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
65 public void setValue(String value) { |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
66 this.value = value; |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
67 } |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
68 |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
69 /** |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
70 * @return the code |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
71 */ |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
72 public Integer getCode() { |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
73 return code; |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
74 } |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
75 |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
76 /** |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
77 * @param code the code to set |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
78 */ |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
79 public void setCode(Integer code) { |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
80 this.code = code; |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
81 } |
b6f770956cae
Added new writer module and report object for importer.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
82 } |