View Javadoc

1   /**
2    * Copyright 2010 The Kuali Foundation Licensed under the Educational Community
3    * License, Version 2.0 (the "License"); you may not use this file except in
4    * compliance with the License. You may obtain a copy of the License at
5    * http://www.osedu.org/licenses/ECL-2.0 Unless required by applicable law or
6    * agreed to in writing, software distributed under the License is distributed
7    * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
8    * express or implied. See the License for the specific language governing
9    * permissions and limitations under the License.
10   */
11  
12  package org.kuali.student.r2.lum.lo.dto;
13  
14  import org.kuali.student.r2.common.dto.IdEntityInfo;
15  import org.kuali.student.r2.lum.lo.infc.Lo;
16  //import org.w3c.dom.Element;
17  
18  import javax.xml.bind.annotation.XmlAccessType;
19  import javax.xml.bind.annotation.XmlAccessorType;
20  import javax.xml.bind.annotation.XmlAnyElement;
21  import javax.xml.bind.annotation.XmlElement;
22  import javax.xml.bind.annotation.XmlType;
23  
24  import java.io.Serializable;
25  import java.util.Date;
26  import java.util.List;
27  
28  /**
29   * Detailed information about a learning objective
30   * 
31   * @author Kuali Student Team (sambitpa@kuali.org)
32   */
33  
34  @XmlType(name = "LoInfo", propOrder = {"id", "typeKey", "stateKey", "name", "descr", "loRepositoryKey", "effectiveDate", "expirationDate", "meta", "attributes" })//, "_futureElements" }) TODO KSCM-372: Non-GWT translatable code})
35  @XmlAccessorType(XmlAccessType.FIELD)
36  public class LoInfo extends IdEntityInfo implements Lo, Serializable {
37  
38      private static final long serialVersionUID = 1L;
39  
40      @XmlElement
41      private String loRepositoryKey;
42  
43      @XmlElement
44      private Date effectiveDate;
45  
46      @XmlElement
47      private Date expirationDate;
48  
49  //    TODO KSCM-372: Non-GWT translatable code
50  //    @XmlAnyElement
51  //    private List<Element> _futureElements;
52  
53      
54      public LoInfo(){
55          
56      }
57      
58      public LoInfo(Lo lo){
59          super(lo);
60          if(lo!=null){
61              this.loRepositoryKey= lo.getLoRepositoryKey();
62              this.effectiveDate= new Date(lo.getEffectiveDate().getTime());
63              this.expirationDate =  new Date(lo.getExpirationDate().getTime());
64          }
65      }
66  
67      @Override
68      public String getLoRepositoryKey() {
69          return loRepositoryKey;
70      }
71  
72      public void setLoRepositoryKey(String loRepositoryKey) {
73          this.loRepositoryKey = loRepositoryKey;
74      }
75  
76      @Override
77      public Date getEffectiveDate() {
78          return effectiveDate;
79      }
80  
81      public void setEffectiveDate(Date effectiveDate) {
82          this.effectiveDate = effectiveDate;
83      }
84  
85      @Override
86      public Date getExpirationDate() {
87          return expirationDate;
88      }
89  
90      public void setExpirationDate(Date expirationDate) {
91          this.expirationDate = expirationDate;
92      }
93  
94  }