1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.r2.common.messages.dto; |
17 | |
|
18 | |
import java.io.Serializable; |
19 | |
import java.util.Date; |
20 | |
import java.util.List; |
21 | |
|
22 | |
import javax.xml.bind.annotation.XmlAccessType; |
23 | |
import javax.xml.bind.annotation.XmlAccessorType; |
24 | |
import javax.xml.bind.annotation.XmlAnyElement; |
25 | |
import javax.xml.bind.annotation.XmlElement; |
26 | |
import javax.xml.bind.annotation.XmlType; |
27 | |
|
28 | |
import org.kuali.student.r2.common.dto.LocaleInfo; |
29 | |
import org.kuali.student.r2.common.messages.infc.Message; |
30 | |
import org.w3c.dom.Element; |
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | |
|
36 | |
|
37 | |
|
38 | |
|
39 | |
|
40 | |
|
41 | 0 | @XmlAccessorType(XmlAccessType.FIELD) |
42 | |
@XmlType(name = "MessageInfo", propOrder = { |
43 | |
"key", "locale", "groupName", "value", |
44 | |
"_futureElements" }) |
45 | |
|
46 | |
public class MessageInfo |
47 | |
implements Message, Serializable { |
48 | |
|
49 | |
private static final long serialVersionUID = 1L; |
50 | |
|
51 | |
@XmlElement |
52 | |
private String key; |
53 | |
|
54 | |
@XmlElement |
55 | |
private LocaleInfo locale; |
56 | |
|
57 | |
@XmlElement |
58 | |
private String groupName; |
59 | |
|
60 | |
@XmlElement |
61 | |
private String value; |
62 | |
|
63 | |
@XmlAnyElement |
64 | |
private List<Element> _futureElements; |
65 | |
|
66 | |
|
67 | |
|
68 | |
|
69 | |
|
70 | 0 | public MessageInfo() { |
71 | 0 | } |
72 | |
|
73 | |
|
74 | |
|
75 | |
|
76 | |
|
77 | |
|
78 | 0 | public MessageInfo(Message message) { |
79 | 0 | if(message != null) { |
80 | 0 | if (message.getLocale() != null) { |
81 | 0 | this.locale = new LocaleInfo(message.getLocale()); |
82 | |
} |
83 | |
|
84 | 0 | this.groupName = message.getGroupName(); |
85 | 0 | this.value = message.getValue(); |
86 | |
} |
87 | 0 | } |
88 | |
|
89 | |
@Override |
90 | |
public String getKey() { |
91 | 0 | return this.key; |
92 | |
} |
93 | |
|
94 | |
public void setKey(String key) { |
95 | 0 | this.key = key; |
96 | 0 | } |
97 | |
|
98 | |
@Override |
99 | |
public LocaleInfo getLocale() { |
100 | 0 | return this.locale; |
101 | |
} |
102 | |
|
103 | |
public void setLocale(LocaleInfo locale) { |
104 | 0 | this.locale = locale; |
105 | 0 | } |
106 | |
|
107 | |
@Override |
108 | |
public String getGroupName() { |
109 | 0 | return this.groupName; |
110 | |
} |
111 | |
|
112 | |
public void setGroupName(String groupName) { |
113 | 0 | this.groupName = groupName; |
114 | 0 | } |
115 | |
|
116 | |
@Override |
117 | |
public String getValue() { |
118 | 0 | return this.value; |
119 | |
} |
120 | |
|
121 | |
public void setValue(String value) { |
122 | 0 | this.value = value; |
123 | 0 | } |
124 | |
} |