1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.kuali.student.lum.common.client.lo; |
17 |
|
|
18 |
|
|
19 |
|
import org.kuali.student.common.assembly.data.Data; |
20 |
|
import org.kuali.student.common.assembly.helper.PropertyEnum; |
21 |
|
|
22 |
|
|
|
|
| 0% |
Uncovered Elements: 18 (18) |
Complexity: 8 |
Complexity Density: 0.89 |
|
23 |
|
public class RichTextInfoHelper |
24 |
|
{ |
25 |
|
private static final long serialVersionUID = 1; |
26 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
27 |
|
public enum Properties implements PropertyEnum |
28 |
|
{ |
29 |
|
PLAIN ("plain"), |
30 |
|
FORMATTED ("formatted"); |
31 |
|
|
32 |
|
private final String key; |
33 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
34 |
0
|
private Properties (final String key)... |
35 |
|
{ |
36 |
0
|
this.key = key; |
37 |
|
} |
38 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
39 |
0
|
@Override... |
40 |
|
public String getKey () |
41 |
|
{ |
42 |
0
|
return this.key; |
43 |
|
} |
44 |
|
} |
45 |
|
private Data data; |
46 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
47 |
0
|
private RichTextInfoHelper (Data data)... |
48 |
|
{ |
49 |
0
|
this.data = data; |
50 |
|
} |
51 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
52 |
0
|
public static RichTextInfoHelper wrap (Data data)... |
53 |
|
{ |
54 |
0
|
if (data == null) |
55 |
|
{ |
56 |
0
|
return null; |
57 |
|
} |
58 |
0
|
return new RichTextInfoHelper (data); |
59 |
|
} |
60 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
61 |
0
|
public Data getData ()... |
62 |
|
{ |
63 |
0
|
return data; |
64 |
|
} |
65 |
|
|
66 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
67 |
0
|
public void setPlain (String value)... |
68 |
|
{ |
69 |
0
|
data.set (Properties.PLAIN.getKey (), value); |
70 |
|
} |
71 |
|
|
72 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
73 |
0
|
public String getPlain ()... |
74 |
|
{ |
75 |
0
|
return (String) data.get (Properties.PLAIN.getKey ()); |
76 |
|
} |
77 |
|
|
78 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
79 |
0
|
public void setFormatted (String value)... |
80 |
|
{ |
81 |
0
|
data.set (Properties.FORMATTED.getKey (), value); |
82 |
|
} |
83 |
|
|
84 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
85 |
0
|
public String getFormatted ()... |
86 |
|
{ |
87 |
0
|
return (String) data.get (Properties.FORMATTED.getKey ()); |
88 |
|
} |
89 |
|
|
90 |
|
} |
91 |
|
|