Coverage Report - org.kuali.student.core.comment.dto.CommentInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
CommentInfo
0%
0/33
0%
0/2
1.05
 
 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.core.comment.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  
  * Detailed information about a comment.
 38  
  *
 39  
  * @Author KSContractMojo
 40  
  * @Author Neerav Agrawal
 41  
  * @Since Fri Jun 05 14:27:31 EDT 2009
 42  
  * @See <a href="https://test.kuali.org/confluence/display/KULSTR/commentInfo+Structure+v1.0-rc1">CommentInfo</>
 43  
  *
 44  
  */
 45  
 @XmlAccessorType(XmlAccessType.FIELD)
 46  0
 public class CommentInfo implements Serializable, Idable, HasTypeState, HasAttributes {
 47  
 
 48  
     private static final long serialVersionUID = 1L;
 49  
 
 50  
     @XmlElement
 51  
     private RichTextInfo commentText;
 52  
 
 53  
     @XmlElement
 54  
     private String referenceTypeKey;
 55  
 
 56  
     @XmlElement
 57  
     private String referenceId;
 58  
 
 59  
     @XmlElement
 60  
     private Date effectiveDate;
 61  
 
 62  
     @XmlElement
 63  
     private Date expirationDate;
 64  
 
 65  
     @XmlElement
 66  
     @XmlJavaTypeAdapter(JaxbAttributeMapListAdapter.class)
 67  
     private Map<String, String> attributes;
 68  
 
 69  
     @XmlElement
 70  
     private MetaInfo metaInfo;
 71  
 
 72  
     @XmlAttribute
 73  
     private String type;
 74  
 
 75  
     @XmlAttribute
 76  
     private String state;
 77  
 
 78  
     @XmlAttribute
 79  
     private String id;
 80  
 
 81  
     /**
 82  
      * Narrative text of the comment
 83  
      */
 84  
     public RichTextInfo getCommentText() {
 85  0
         return commentText;
 86  
     }
 87  
 
 88  
     public void setCommentText(RichTextInfo commentText) {
 89  0
         this.commentText = commentText;
 90  0
     }
 91  
 
 92  
     /**
 93  
      * Unique identifier for a reference type.
 94  
      */
 95  
     public String getReferenceTypeKey() {
 96  0
         return referenceTypeKey;
 97  
     }
 98  
 
 99  
     public void setReferenceTypeKey(String referenceTypeKey) {
 100  0
         this.referenceTypeKey = referenceTypeKey;
 101  0
     }
 102  
 
 103  
     /**
 104  
      * Identifier component for a reference. This is an external identifier and such may not uniquely identify a particular reference unless combined with the type. A referenceId could be a cluId, a luiId, an orgId, a documentId, etc.
 105  
      */
 106  
     public String getReferenceId() {
 107  0
         return referenceId;
 108  
     }
 109  
 
 110  
     public void setReferenceId(String referenceId) {
 111  0
         this.referenceId = referenceId;
 112  0
     }
 113  
 
 114  
     /**
 115  
      * Date and time that this comment 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.
 116  
      */
 117  
     public Date getEffectiveDate() {
 118  0
         return effectiveDate;
 119  
     }
 120  
 
 121  
     public void setEffectiveDate(Date effectiveDate) {
 122  0
         this.effectiveDate = effectiveDate;
 123  0
     }
 124  
 
 125  
     /**
 126  
      * Date and time that this comment 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.
 127  
      */
 128  
     public Date getExpirationDate() {
 129  0
         return expirationDate;
 130  
     }
 131  
 
 132  
     public void setExpirationDate(Date expirationDate) {
 133  0
         this.expirationDate = expirationDate;
 134  0
     }
 135  
 
 136  
     /**
 137  
      * List of key/value pairs, typically used for dynamic attributes.
 138  
      */
 139  
     public Map<String, String> getAttributes() {
 140  0
         if (attributes == null) {
 141  0
             attributes = new HashMap<String, String>();
 142  
         }
 143  0
         return attributes;
 144  
     }
 145  
 
 146  
     public void setAttributes(Map<String, String> attributes) {
 147  0
         this.attributes = attributes;
 148  0
     }
 149  
 
 150  
     /**
 151  
      * 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.
 152  
      */
 153  
     public MetaInfo getMetaInfo() {
 154  0
         return metaInfo;
 155  
     }
 156  
 
 157  
     public void setMetaInfo(MetaInfo metaInfo) {
 158  0
         this.metaInfo = metaInfo;
 159  0
     }
 160  
 
 161  
     /**
 162  
      * Unique identifier for a comment type.
 163  
      */
 164  
     public String getType() {
 165  0
         return type;
 166  
     }
 167  
 
 168  
     public void setType(String type) {
 169  0
         this.type = type;
 170  0
     }
 171  
 
 172  
     /**
 173  
      * The current status of the comment. The values for this field are constrained to those in the commentState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value.
 174  
      */
 175  
     public String getState() {
 176  0
         return state;
 177  
     }
 178  
 
 179  
     public void setState(String state) {
 180  0
         this.state = state;
 181  0
     }
 182  
 
 183  
     /**
 184  
      * Unique identifier for a comment. This is optional, due to the identifier being set at the time of creation. Once the comment has been created, this should be seen as required.
 185  
      */
 186  
     public String getId() {
 187  0
         return id;
 188  
     }
 189  
 
 190  
     public void setId(String id) {
 191  0
         this.id = id;
 192  0
     }
 193  
 }