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
31
32
33
34
35
36
37
38
39
40
41 @XmlAccessorType(XmlAccessType.FIELD)
42 @XmlType(name = "MessageInfo", propOrder = {
43 "messageKey", "locale", "groupName", "value" , "_futureElements" })
44 public class MessageInfo
45 implements Message, Serializable {
46
47 private static final long serialVersionUID = 1L;
48
49 @XmlElement
50 private String messageKey;
51
52 @XmlElement
53 private LocaleInfo locale;
54
55 @XmlElement
56 private String groupName;
57
58 @XmlElement
59 private String value;
60
61 @XmlAnyElement
62 private List<Object> _futureElements;
63
64
65
66
67
68 public MessageInfo() {
69 }
70
71
72
73
74
75
76 public MessageInfo(Message message) {
77 if(message != null) {
78 if (message.getLocale() != null) {
79 this.locale = new LocaleInfo(message.getLocale());
80 }
81 this.messageKey = message.getMessageKey();
82 this.groupName = message.getGroupName();
83 this.value = message.getValue();
84 }
85 }
86
87 @Override
88 public String getMessageKey() {
89 return this.messageKey;
90 }
91
92 public void setMessageKey(String messageKey) {
93 this.messageKey = messageKey;
94 }
95
96 @Override
97 public LocaleInfo getLocale() {
98 return this.locale;
99 }
100
101 public void setLocale(LocaleInfo locale) {
102 this.locale = locale;
103 }
104
105 @Override
106 public String getGroupName() {
107 return this.groupName;
108 }
109
110 public void setGroupName(String groupName) {
111 this.groupName = groupName;
112 }
113
114 @Override
115 public String getValue() {
116 return this.value;
117 }
118
119 public void setValue(String value) {
120 this.value = value;
121 }
122 }