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.ap.academicplan.dto;
16  
17  import org.kuali.student.ap.academicplan.infc.LearningPlan;
18  import org.kuali.student.r2.common.dto.IdEntityInfo;
19  import org.kuali.student.r2.common.dto.RichTextInfo;
20  import org.w3c.dom.Element;
21  
22  import javax.xml.bind.annotation.*;
23  import java.util.List;
24  
25  /**
26   * LearningPlan message structure
27   *
28   * @author Kuali Student Team
29   * @version 1.0 (Dev)
30   *
31   */
32  @XmlAccessorType(XmlAccessType.FIELD)
33  @XmlType(name = "LearningPlanInfo", propOrder = {"studentId", "id", "typeKey", "stateKey", "shared", "name", "descr", "meta", "attributes", "_futureElements"})
34  public class LearningPlanInfo extends IdEntityInfo implements LearningPlan {
35  
36      @XmlElement
37      private String studentId;
38  
39      @XmlElement
40      private Boolean shared;
41  
42      @XmlAnyElement
43      private List<Element> _futureElements;
44  
45  
46      public LearningPlanInfo() {
47      }
48  
49      public LearningPlanInfo(LearningPlan plan) {
50          super(plan);
51  
52          if(null != plan) {
53              this.setId(plan.getId());
54              this.studentId = plan.getStudentId();
55              this.setDescr((null != plan.getDescr()) ? new RichTextInfo(plan.getDescr()) : null);
56              this.setShared(plan.getShared());
57          }
58      }
59  
60      @Override
61      public String getStudentId() {
62          return studentId;
63      }
64  
65      public void setStudentId(String studentId) {
66          this.studentId = studentId;
67      }
68  
69      @Override
70      public Boolean getShared() {
71          return shared;
72      }
73  
74      public void setShared(Boolean shared) {
75          this.shared = shared;
76      }
77  }