1 | |
package org.kuali.student.lum.common.client.lo; |
2 | |
|
3 | |
import org.kuali.student.core.assembly.data.Data; |
4 | |
import org.kuali.student.core.assembly.helper.PropertyEnum; |
5 | |
|
6 | |
public class RichTextHelper { |
7 | |
private Data data; |
8 | |
|
9 | 0 | public enum Properties implements PropertyEnum { |
10 | 0 | PLAIN("plain"), |
11 | 0 | FORMATTED("formatted"); |
12 | |
private final String key; |
13 | |
|
14 | 0 | private Properties(final String key) { |
15 | 0 | this.key = key; |
16 | 0 | } |
17 | |
|
18 | |
@Override |
19 | |
public String getKey() { |
20 | 0 | return this.key; |
21 | |
} |
22 | |
} |
23 | |
|
24 | 0 | public RichTextHelper() { |
25 | 0 | data = new Data(); |
26 | 0 | } |
27 | |
|
28 | 0 | public RichTextHelper(Data data) { |
29 | 0 | this.data = data; |
30 | 0 | } |
31 | |
|
32 | |
public Data getData() { |
33 | 0 | return data; |
34 | |
} |
35 | |
|
36 | |
public void setData(Data data) { |
37 | 0 | this.data = data; |
38 | 0 | } |
39 | |
|
40 | |
public void setPlain(String plain) { |
41 | 0 | data.set(Properties.PLAIN.getKey(), plain); |
42 | 0 | } |
43 | |
|
44 | |
public String getPlain() { |
45 | 0 | return (String) data.get(Properties.PLAIN.getKey()); |
46 | |
} |
47 | |
|
48 | |
public void setFormatted(String formatted) { |
49 | 0 | data.set(Properties.FORMATTED.getKey(), formatted); |
50 | 0 | } |
51 | |
|
52 | |
public String getFormatted() { |
53 | 0 | return (String) data.get(Properties.FORMATTED.getKey()); |
54 | |
} |
55 | |
} |