Coverage Report - org.kuali.student.lum.lu.dto.CluPublicationInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
CluPublicationInfo
0%
0/39
0%
0/4
1.087
 
 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.ArrayList;
 20  
 import java.util.Date;
 21  
 import java.util.HashMap;
 22  
 import java.util.List;
 23  
 import java.util.Map;
 24  
 
 25  
 import javax.xml.bind.annotation.XmlAccessType;
 26  
 import javax.xml.bind.annotation.XmlAccessorType;
 27  
 import javax.xml.bind.annotation.XmlAttribute;
 28  
 import javax.xml.bind.annotation.XmlElement;
 29  
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 30  
 
 31  
 import org.kuali.student.common.dto.HasAttributes;
 32  
 import org.kuali.student.common.dto.HasTypeState;
 33  
 import org.kuali.student.common.dto.Idable;
 34  
 import org.kuali.student.common.dto.MetaInfo;
 35  
 import org.kuali.student.core.ws.binding.JaxbAttributeMapListAdapter;
 36  
 
 37  
 /**
 38  
  * Detailed information about publishing a clu.
 39  
  *
 40  
  * @Author KSContractMojo
 41  
  * @Author Kamal
 42  
  * @Since Mon Jan 11 15:21:19 PST 2010
 43  
  * @See <a href="https://test.kuali.org/confluence/display/KULSTU/cluPublicationInfo+Structure+v1.0-rc3">CluPublicationInfo v1.0-rc3</>
 44  
  *
 45  
  */
 46  
 @XmlAccessorType(XmlAccessType.FIELD)
 47  0
 public class CluPublicationInfo implements Serializable, Idable, HasTypeState, HasAttributes {
 48  
 
 49  
     private static final long serialVersionUID = 1L;
 50  
 
 51  
     @XmlElement
 52  
     private String cluId;
 53  
 
 54  
     @XmlElement
 55  
     private List<FieldInfo> variants;
 56  
 
 57  
     @XmlElement
 58  
     private String startCycle;
 59  
 
 60  
     @XmlElement
 61  
     private String endCycle;
 62  
 
 63  
     @XmlElement
 64  
     private Date effectiveDate;
 65  
 
 66  
     @XmlElement
 67  
     private Date expirationDate;
 68  
 
 69  
     @XmlElement
 70  
     @XmlJavaTypeAdapter(JaxbAttributeMapListAdapter.class)
 71  
     private Map<String, String> attributes;
 72  
 
 73  
     @XmlElement
 74  
     private MetaInfo metaInfo;
 75  
 
 76  
     @XmlAttribute
 77  
     private String type;
 78  
 
 79  
     @XmlAttribute
 80  
     private String state;
 81  
 
 82  
     @XmlAttribute
 83  
     private String id;
 84  
 
 85  
     /**
 86  
      * The identifier for the canonical learning unit which is described by this publication information.
 87  
      */
 88  
     public String getCluId() {
 89  0
         return cluId;
 90  
     }
 91  
 
 92  
     public void setCluId(String cluId) {
 93  0
         this.cluId = cluId;
 94  0
     }
 95  
 
 96  
     /**
 97  
      * Fields in cluInfo whose values are overridden as part of this publication.
 98  
      */
 99  
     public List<FieldInfo> getVariants() {
 100  0
         if (variants == null) {
 101  0
             variants = new ArrayList<FieldInfo>(0);
 102  
         }
 103  0
         return variants;
 104  
     }
 105  
 
 106  
     public void setVariants(List<FieldInfo> variants) {
 107  0
         this.variants = variants;
 108  0
     }
 109  
 
 110  
     /**
 111  
      * The start academic time period for when the CLU should be published in this type of usage. Should be less than or equal to endCycle.
 112  
      */
 113  
     public String getStartCycle() {
 114  0
         return startCycle;
 115  
     }
 116  
 
 117  
     public void setStartCycle(String startCycle) {
 118  0
         this.startCycle = startCycle;
 119  0
     }
 120  
 
 121  
     /**
 122  
      * The end academic time period for when the CLU should be published in this type of usage. If specified, should be greater than or equal to startCycle.
 123  
      */
 124  
     public String getEndCycle() {
 125  0
         return endCycle;
 126  
     }
 127  
 
 128  
     public void setEndCycle(String endCycle) {
 129  0
         this.endCycle = endCycle;
 130  0
     }
 131  
 
 132  
     /**
 133  
      * Date and time that this LU publication type 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.
 134  
      */
 135  
     public Date getEffectiveDate() {
 136  0
         return effectiveDate;
 137  
     }
 138  
 
 139  
     public void setEffectiveDate(Date effectiveDate) {
 140  0
         this.effectiveDate = effectiveDate;
 141  0
     }
 142  
 
 143  
     /**
 144  
      * Date and time that this LU publication type 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.
 145  
      */
 146  
     public Date getExpirationDate() {
 147  0
         return expirationDate;
 148  
     }
 149  
 
 150  
     public void setExpirationDate(Date expirationDate) {
 151  0
         this.expirationDate = expirationDate;
 152  0
     }
 153  
 
 154  
     /**
 155  
      * List of key/value pairs, typically used for dynamic attributes.
 156  
      */
 157  
     public Map<String, String> getAttributes() {
 158  0
         if (attributes == null) {
 159  0
             attributes = new HashMap<String, String>();
 160  
         }
 161  0
         return attributes;
 162  
     }
 163  
 
 164  
     public void setAttributes(Map<String, String> attributes) {
 165  0
         this.attributes = attributes;
 166  0
     }
 167  
 
 168  
     /**
 169  
      * 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.
 170  
      */
 171  
     public MetaInfo getMetaInfo() {
 172  0
         return metaInfo;
 173  
     }
 174  
 
 175  
     public void setMetaInfo(MetaInfo metaInfo) {
 176  0
         this.metaInfo = metaInfo;
 177  0
     }
 178  
 
 179  
     /**
 180  
      * Type of publication for which this information should be used.
 181  
      */
 182  
     public String getType() {
 183  0
         return type;
 184  
     }
 185  
 
 186  
     public void setType(String type) {
 187  0
         this.type = type;
 188  0
     }
 189  
 
 190  
     /**
 191  
      * Current state of the information for this publication type. This value should be constrained to those within the cluPublishingState enumeration. In general, an "active" record for a type indicates that the clu should be published within that media, though that may be further constrained by the cycle information included.
 192  
      */
 193  
     public String getState() {
 194  0
         return state;
 195  
     }
 196  
 
 197  
     public void setState(String state) {
 198  0
         this.state = state;
 199  0
     }
 200  
 
 201  
     /**
 202  
      * Identifier for the publishing information. This is set by the service to be able to determine changes and alterations to the structure as well as provides a handle for searches. This structure is not currently accessible through unique operations, and it is strongly recommended that no external references to this particular identifier be maintained.
 203  
      */
 204  
     public String getId() {
 205  0
         return id;
 206  
     }
 207  
 
 208  
     public void setId(String id) {
 209  0
         this.id = id;
 210  0
     }
 211  
 
 212  
     @Override
 213  
     public String toString() {
 214  0
             return "CluPublicationInfo[id=" + id + ", cluId=" + cluId + ", type=" + type + "]";
 215  
     }
 216  
 }