Coverage Report - org.kuali.student.core.atp.dto.DateRangeInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
DateRangeInfo
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.atp.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 a date range.
 38  
  */ 
 39  
 @XmlAccessorType(XmlAccessType.FIELD)
 40  0
 public class DateRangeInfo implements Serializable, Idable, HasTypeState, HasAttributes {
 41  
 
 42  
     private static final long serialVersionUID = 1L;
 43  
 
 44  
     @XmlElement
 45  
     private String name;
 46  
 
 47  
     @XmlElement
 48  
     private RichTextInfo desc;
 49  
 
 50  
     @XmlElement(name="atpKey")
 51  
     private String atpId;
 52  
 
 53  
     @XmlElement
 54  
     private Date startDate;
 55  
 
 56  
     @XmlElement
 57  
     private Date endDate;
 58  
 
 59  
     @XmlElement
 60  
     @XmlJavaTypeAdapter(JaxbAttributeMapListAdapter.class)
 61  
     private Map<String,String> attributes;
 62  
 
 63  
     @XmlElement
 64  
     private MetaInfo metaInfo;
 65  
 
 66  
     @XmlAttribute
 67  
     private String type;
 68  
 
 69  
     @XmlAttribute
 70  
     private String state;
 71  
 
 72  
     @XmlAttribute(name="key")
 73  
     private String id;
 74  
 
 75  
     /**
 76  
      * Friendly name of the date range.
 77  
      */
 78  
     public String getName() {
 79  0
         return name;
 80  
     }
 81  
 
 82  
     public void setName(String name) {
 83  0
         this.name = name;
 84  0
     }
 85  
 
 86  
     /**
 87  
      * Narrative description of the date range.
 88  
      */
 89  
     public RichTextInfo getDesc() {
 90  0
         return desc;
 91  
     }
 92  
 
 93  
     public void setDesc(RichTextInfo desc) {
 94  0
         this.desc = desc;
 95  0
     }
 96  
 
 97  
     /**
 98  
      * Unique identifier for an Academic Time Period (ATP).
 99  
      */
 100  
         public String getAtpId() {
 101  0
                 return atpId;
 102  
         }
 103  
 
 104  
         public void setAtpId(String atpId) {
 105  0
                 this.atpId = atpId;
 106  0
         }
 107  
 
 108  
     /**
 109  
      * Start date and time for the date range. This must be less than or equal to the end date of this range.
 110  
      */
 111  
     public Date getStartDate() {
 112  0
         return startDate;
 113  
     }
 114  
 
 115  
     public void setStartDate(Date startDate) {
 116  0
         this.startDate = startDate;
 117  0
     }
 118  
 
 119  
     /**
 120  
      * End date and time for the date range. This must be greater than or equal to the start date of this range.
 121  
      */
 122  
     public Date getEndDate() {
 123  0
         return endDate;
 124  
     }
 125  
 
 126  
     public void setEndDate(Date endDate) {
 127  0
         this.endDate = endDate;
 128  0
     }
 129  
 
 130  
     /**
 131  
      * List of key/value pairs, typically used for dynamic attributes.
 132  
      */
 133  
     public Map<String,String> getAttributes() {
 134  0
         if (attributes == null) {
 135  0
             attributes = new HashMap<String,String>();
 136  
         }
 137  0
         return attributes;
 138  
     }
 139  
 
 140  
     public void setAttributes(Map<String,String> attributes) {
 141  0
         this.attributes = attributes;
 142  0
     }
 143  
 
 144  
     /**
 145  
      * 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.
 146  
      */
 147  
     public MetaInfo getMetaInfo() {
 148  0
         return metaInfo;
 149  
     }
 150  
 
 151  
     public void setMetaInfo(MetaInfo metaInfo) {
 152  0
         this.metaInfo = metaInfo;
 153  0
     }
 154  
 
 155  
     /**
 156  
      * Unique identifier for a date range type.
 157  
      */
 158  
     public String getType() {
 159  0
         return type;
 160  
     }
 161  
 
 162  
     public void setType(String type) {
 163  0
         this.type = type;
 164  0
     }
 165  
 
 166  
     /**
 167  
      * The current status of the date range. The values for this field are constrained to those in the dateRangeState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value.
 168  
      */
 169  
     public String getState() {
 170  0
         return state;
 171  
     }
 172  
 
 173  
     public void setState(String state) {
 174  0
         this.state = state;
 175  0
     }
 176  
 
 177  
     /**
 178  
      * Unique identifier for a date range.
 179  
      */
 180  
     public String getId() {
 181  0
         return id;
 182  
     }
 183  
 
 184  
     public void setId(String id) {
 185  0
         this.id = id;
 186  0
     }
 187  
 
 188  
 }