View Javadoc

1   /*
2    * Copyright 2014 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    *
7    * http://www.osedu.org/licenses/ECL-2.0
8    *
9    * Unless required by applicable law or agreed to in writing,
10   * software distributed under the License is distributed on an "AS IS"
11   * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12   * or implied. See the License for the specific language governing
13   * permissions and limitations under the License.
14   */
15  package org.kuali.student.core.usermessaging.dto;
16  
17  
18  import org.kuali.student.core.usermessaging.infc.Template;
19  import org.kuali.student.r2.common.dto.IdNamelessEntityInfo;
20  
21  import javax.xml.bind.annotation.XmlAccessType;
22  import javax.xml.bind.annotation.XmlAccessorType;
23  import javax.xml.bind.annotation.XmlAnyElement;
24  import javax.xml.bind.annotation.XmlElement;
25  import javax.xml.bind.annotation.XmlType;
26  import java.util.List;
27  
28  @XmlAccessorType(XmlAccessType.FIELD)
29  @XmlType(name = "TemplateInfo", propOrder = {"key", "typeKey", "stateKey","name","descr","messageCategoryId",
30          "templateMessageContent","addressType","meta", "attributes", "_futureElements" })
31  public class TemplateInfo extends IdNamelessEntityInfo implements Template {
32  
33      @XmlElement
34      private String messageCategoryId;
35      @XmlElement
36      private String templateMessageContent;
37      @XmlElement
38      private String addressType;
39      @XmlAnyElement
40      private List<Object> _futureElements;
41  
42      public TemplateInfo(){
43  
44      }
45  
46      public TemplateInfo(Template template){
47          super(template);
48  
49          if (template != null){
50  
51              messageCategoryId = template.getMessageCategoryId();
52              templateMessageContent = template.getTemplateMessageContent();
53              addressType = template.getAddressType();
54          }
55  
56      }
57  
58      @Override
59      public String getMessageCategoryId() {
60          return messageCategoryId;
61      }
62  
63      public void setMessageCategoryId(String messageCategoryId) {
64          this.messageCategoryId = messageCategoryId;
65      }
66      @Override
67      public String getTemplateMessageContent() {
68          return templateMessageContent;
69      }
70  
71      public void setTemplateMessageContent(String templateMessageContent) {
72          this.templateMessageContent = templateMessageContent;
73      }
74      @Override
75      public String getAddressType() {
76          return addressType;
77      }
78  
79      public void setAddressType(String addressType) {
80          this.addressType = addressType;
81      }
82  
83      public List<Object> get_futureElements() {
84          return _futureElements;
85      }
86  
87      public void set_futureElements(List<Object> _futureElements) {
88          this._futureElements = _futureElements;
89      }
90  }