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.lu.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.core.dto.HasAttributes;
30  import org.kuali.student.core.dto.HasTypeState;
31  import org.kuali.student.core.dto.Idable;
32  import org.kuali.student.core.dto.MetaInfo;
33  import org.kuali.student.core.dto.RichTextInfo;
34  import org.kuali.student.core.ws.binding.JaxbAttributeMapListAdapter;
35  
36  /**
37   *Information about the LU to document relation.
38   */ 
39  @XmlAccessorType(XmlAccessType.FIELD)
40  public class LuDocRelationInfo implements Serializable, Idable, HasTypeState, HasAttributes {
41  
42      private static final long serialVersionUID = 1L;
43  
44      @XmlElement
45      private String cluId;
46  
47      @XmlElement
48      private String documentId;
49  
50      @XmlElement
51      private String title;
52  
53      @XmlElement
54      private RichTextInfo desc;
55  
56      @XmlElement
57      private Date effectiveDate;
58  
59      @XmlElement
60      private Date expirationDate;
61  
62      @XmlElement
63      @XmlJavaTypeAdapter(JaxbAttributeMapListAdapter.class)
64      private Map<String, String> attributes;
65  
66      @XmlElement
67      private MetaInfo metaInfo;
68  
69      @XmlAttribute
70      private String type;
71  
72      @XmlAttribute
73      private String state;
74  
75      @XmlAttribute
76      private String id;
77  
78      /**
79       * Unique identifier for a Canonical Learning Unit (CLU).
80       */
81      public String getCluId() {
82          return cluId;
83      }
84  
85      public void setCluId(String cluId) {
86          this.cluId = cluId;
87      }
88  
89      /**
90       * Unique identifier for a document.
91       */
92      public String getDocumentId() {
93          return documentId;
94      }
95  
96      public void setDocumentId(String documentId) {
97          this.documentId = documentId;
98      }
99  
100     /**
101      * The title of the document usage in the context of the CLU.
102      */
103     public String getTitle() {
104         return title;
105     }
106 
107     public void setTitle(String title) {
108         this.title = title;
109     }
110 
111     /**
112      * The description of the document usage in the context of the CLU.
113      */
114     public RichTextInfo getDesc() {
115         return desc;
116     }
117 
118     public void setDesc(RichTextInfo desc) {
119         this.desc = desc;
120     }
121 
122     /**
123      * Date and time that this LU Doc Relation 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.
124      */
125     public Date getEffectiveDate() {
126         return effectiveDate;
127     }
128 
129     public void setEffectiveDate(Date effectiveDate) {
130         this.effectiveDate = effectiveDate;
131     }
132 
133     /**
134      * Date and time that this LU Doc Relation 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.
135      */
136     public Date getExpirationDate() {
137         return expirationDate;
138     }
139 
140     public void setExpirationDate(Date expirationDate) {
141         this.expirationDate = expirationDate;
142     }
143 
144     /**
145      * List of key/value pairs, typically used for dynamic attributes.
146      */
147     public Map<String, String> getAttributes() {
148         if (attributes == null) {
149             attributes = new HashMap<String, String>();
150         }
151         return attributes;
152     }
153 
154     public void setAttributes(Map<String, String> attributes) {
155         this.attributes = attributes;
156     }
157 
158     /**
159      * 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.
160      */
161     public MetaInfo getMetaInfo() {
162         return metaInfo;
163     }
164 
165     public void setMetaInfo(MetaInfo metaInfo) {
166         this.metaInfo = metaInfo;
167     }
168 
169     /**
170      * Unique identifier for an LU document relationship type. Describes the type of usage of the document.
171      */
172     public String getType() {
173         return type;
174     }
175 
176     public void setType(String type) {
177         this.type = type;
178     }
179 
180     /**
181      * The current status of the LU to document relationship. The values for this field are constrained to those in the luDocRelationState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value.
182      */
183     public String getState() {
184         return state;
185     }
186 
187     public void setState(String state) {
188         this.state = state;
189     }
190 
191     /**
192      * Unique identifier for a LU to document relation. This is optional, due to the identifier being set at the time of creation. Once the connection has been created, this should be seen as required.
193      */
194     public String getId() {
195         return id;
196     }
197 
198     public void setId(String id) {
199         this.id = id;
200     }
201 }