View Javadoc

1   /**
2    * Copyright 2010 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  
16  package org.kuali.student.r2.lum.clu.dto;
17  
18  import org.kuali.student.r2.lum.clu.infc.Field;
19  
20  import javax.xml.bind.Element;
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.XmlAttribute;
25  import javax.xml.bind.annotation.XmlElement;
26  import javax.xml.bind.annotation.XmlType;
27  import java.io.Serializable;
28  import java.util.List;
29  
30  @XmlAccessorType(XmlAccessType.FIELD)
31  @XmlType(name = "FieldInfo", propOrder = {"id", "value" })//, "_futureElements" }) TODO KSCM-372: Non-GWT translatable code})
32  public class FieldInfo implements Serializable, Field {
33  
34      private static final long serialVersionUID = 1L;
35  
36      @XmlAttribute
37      private String id;
38  
39      @XmlElement
40      private String value;
41  
42  //    TODO KSCM-372: Non-GWT translatable code
43  //    @XmlAnyElement
44  //    private List<Element> _futureElements;
45  
46      public FieldInfo() {
47  
48      }
49  
50      public FieldInfo(Field field) {
51          if (null != field) {
52              this.id = field.getId();
53              this.value = field.getValue();
54          }
55      }
56  
57      @Override
58      public String getId() {
59          return id;
60      }
61  
62      public void setId(String id) {
63          this.id = id;
64      }
65  
66      @Override
67      public String getValue() {
68          return value;
69      }
70  
71      public void setValue(String value) {
72          this.value = value;
73      }
74  }