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.lum.lo.dto;
17  
18  import java.io.Serializable;
19  import java.util.Date;
20  import java.util.HashMap;
21  import java.util.Map;
22  
23  import javax.xml.bind.annotation.XmlAccessType;
24  import javax.xml.bind.annotation.XmlAccessorType;
25  import javax.xml.bind.annotation.XmlAttribute;
26  import javax.xml.bind.annotation.XmlElement;
27  import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
28  
29  import org.kuali.student.common.dto.HasAttributes;
30  import org.kuali.student.common.dto.Idable;
31  import org.kuali.student.common.dto.MetaInfo;
32  import org.kuali.student.common.dto.RichTextInfo;
33  import org.kuali.student.core.ws.binding.JaxbAttributeMapListAdapter;
34  
35  /**
36   * Detailed information about a learning objective repository, including the root node.
37   *
38   * @Author KSContractMojo
39   * @Author jimt
40   * @Since Tue Dec 08 10:01:01 PST 2009
41   * @See <a href="https://test.kuali.org/confluence/display/KULSTU/loRepositoryInfo+Structure+v1.0-rc2">LoRepositoryInfo</>
42   *
43   */
44  @XmlAccessorType(XmlAccessType.FIELD)
45  public class LoRepositoryInfo implements Serializable, Idable, HasAttributes {
46  
47      private static final long serialVersionUID = 1L;
48  
49      @XmlElement
50      private String name;
51  
52      @XmlElement
53      private RichTextInfo desc;
54  
55      @XmlElement
56      private String rootLoId;
57  
58      @XmlElement
59      private Date effectiveDate;
60  
61      @XmlElement
62      private Date expirationDate;
63  
64      @XmlElement
65      @XmlJavaTypeAdapter(JaxbAttributeMapListAdapter.class)
66      private Map<String, String> attributes;
67  
68      @XmlElement
69      private MetaInfo metaInfo;
70  
71      @XmlAttribute(name="key")
72      private String id;
73  
74      /**
75       * Friendly name of the repository
76       */
77      public String getName() {
78          return name;
79      }
80  
81      public void setName(String name) {
82          this.name = name;
83      }
84  
85      /**
86       * Narrative description of the learning objective repository
87       */
88      public RichTextInfo getDesc() {
89          return desc;
90      }
91  
92      public void setDesc(RichTextInfo desc) {
93          this.desc = desc;
94      }
95  
96      /**
97       * Identifier for the root node of the learning objective repository. This is primarily present for repositories which are trees descendent from a singular node instead of looser collections.
98       */
99      public String getRootLoId() {
100         return rootLoId;
101     }
102 
103     public void setRootLoId(String rootLoId) {
104         this.rootLoId = rootLoId;
105     }
106 
107     /**
108      * Date and time that this learning objective repository became effective. This is a similar concept to the effective date on enumerated values. When an expiration date has been specified, this field must be less than or equal to the expiration date.
109      */
110     public Date getEffectiveDate() {
111         return effectiveDate;
112     }
113 
114     public void setEffectiveDate(Date effectiveDate) {
115         this.effectiveDate = effectiveDate;
116     }
117 
118     /**
119      * Date and time that this learning objective repository expires. This is a similar concept to the expiration date on enumerated values. If specified, this should be greater than or equal to the effective date. If this field is not specified, then no expiration date has been currently defined and should automatically be considered greater than the effective date.
120      */
121     public Date getExpirationDate() {
122         return expirationDate;
123     }
124 
125     public void setExpirationDate(Date expirationDate) {
126         this.expirationDate = expirationDate;
127     }
128 
129     /**
130      * List of key/value pairs, typically used for dynamic attributes.
131      */
132     public Map<String, String> getAttributes() {
133         if (attributes == null) {
134             attributes = new HashMap<String, String>();
135         }
136         return attributes;
137     }
138 
139     public void setAttributes(Map<String, String> attributes) {
140         this.attributes = attributes;
141     }
142 
143     /**
144      * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations.
145      */
146     public MetaInfo getMetaInfo() {
147         return metaInfo;
148     }
149 
150     public void setMetaInfo(MetaInfo metaInfo) {
151         this.metaInfo = metaInfo;
152     }
153 
154     /**
155      * Unique identifier for a learning objective repository.
156      */
157     public String getId() {
158         return id;
159     }
160 
161     public void setId(String id) {
162         this.id = id;
163     }
164 }