View Javadoc

1   /*
2    * Copyright 2009 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 1.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl1.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.student.lum.course.dto;
17  
18  import java.io.Serializable;
19  import java.util.ArrayList;
20  import java.util.HashMap;
21  import java.util.List;
22  import java.util.Map;
23  
24  import javax.xml.bind.annotation.XmlAccessType;
25  import javax.xml.bind.annotation.XmlAccessorType;
26  import javax.xml.bind.annotation.XmlAttribute;
27  import javax.xml.bind.annotation.XmlElement;
28  import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
29  
30  import org.kuali.student.core.dto.HasAttributes;
31  import org.kuali.student.core.dto.HasTypeState;
32  import org.kuali.student.core.dto.Idable;
33  import org.kuali.student.core.dto.MetaInfo;
34  import org.kuali.student.core.ws.binding.JaxbAttributeMapListAdapter;
35  
36  /**
37   * Detailed information about a single course.
38   *
39   * @Author KSContractMojo
40   * @Author Kamal
41   * @Since Tue May 18 11:30:55 PDT 2010
42   * @See <a href="https://test.kuali.org/confluence/display/KULSTU/formatInfo+Structure">FormatInfo</>
43   *
44   */
45  @XmlAccessorType(XmlAccessType.FIELD)
46  public class FormatInfo implements Serializable, Idable, HasTypeState, HasAttributes {
47  
48      private static final long serialVersionUID = 1L;
49  
50      @XmlElement
51      private List<ActivityInfo> activities;
52  
53      @XmlElement
54      @XmlJavaTypeAdapter(JaxbAttributeMapListAdapter.class)
55      private Map<String, String> attributes;
56  
57      @XmlElement
58      private MetaInfo metaInfo;
59  
60      @XmlAttribute
61      private String type;
62  
63      @XmlAttribute
64      private String state;
65  
66      @XmlAttribute
67      private String id;
68  
69      /**
70       * 
71       */
72      public List<ActivityInfo> getActivities() {
73          if (activities == null) {
74              activities = new ArrayList<ActivityInfo>(0);
75          }
76          return activities;
77      }
78  
79      public void setActivities(List<ActivityInfo> activities) {
80          this.activities = activities;
81      }
82  
83      /**
84       * List of key/value pairs, typically used for dynamic attributes.
85       */
86      public Map<String, String> getAttributes() {
87          if (attributes == null) {
88              attributes = new HashMap<String, String>();
89          }
90          return attributes;
91      }
92  
93      public void setAttributes(Map<String, String> attributes) {
94          this.attributes = attributes;
95      }
96  
97      /**
98       * 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.
99       */
100     public MetaInfo getMetaInfo() {
101         return metaInfo;
102     }
103 
104     public void setMetaInfo(MetaInfo metaInfo) {
105         this.metaInfo = metaInfo;
106     }
107 
108     /**
109      * Unique identifier for a learning unit type. Once set at create time, this field may not be updated.
110      */
111     public String getType() {
112         return type;
113     }
114 
115     public void setType(String type) {
116         this.type = type;
117     }
118 
119     /**
120      * The current status of the course. The values for this field are constrained to those in the luState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value. This field may not be updated through updating this structure and must instead be updated through a dedicated operation.
121      */
122     public String getState() {
123         return state;
124     }
125 
126     public void setState(String state) {
127         this.state = state;
128     }
129 
130     /**
131      * Unique identifier for a Canonical Learning Unit (CLU). This is optional, due to the identifier being set at the time of creation. Once the Format has been created, this should be seen as required.
132      */
133     public String getId() {
134         return id;
135     }
136 
137     public void setId(String id) {
138         this.id = id;
139     }
140 }