Coverage Report - org.kuali.student.r2.common.dto.StateProcessInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
StateProcessInfo
0%
0/34
0%
0/4
1.143
 
 1  
 /*
 2  
  * Copyright 2010 The Kuali Foundation Licensed under the Educational Community
 3  
  * License, Version 2.0 (the "License"); you may not use this file except in
 4  
  * compliance with the License. You may obtain a copy of the License at
 5  
  * http://www.osedu.org/licenses/ECL-2.0 Unless required by applicable law or
 6  
  * agreed to in writing, software distributed under the License is distributed
 7  
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
 8  
  * express or implied. See the License for the specific language governing
 9  
  * permissions and limitations under the License.
 10  
  */
 11  
 
 12  
 package org.kuali.student.r2.common.dto;
 13  
 
 14  
 import java.io.Serializable;
 15  
 import java.util.Date;
 16  
 import java.util.List;
 17  
 
 18  
 import javax.xml.bind.annotation.XmlAccessType;
 19  
 import javax.xml.bind.annotation.XmlAccessorType;
 20  
 import javax.xml.bind.annotation.XmlAnyElement;
 21  
 import javax.xml.bind.annotation.XmlAttribute;
 22  
 import javax.xml.bind.annotation.XmlElement;
 23  
 import javax.xml.bind.annotation.XmlType;
 24  
 
 25  
 import org.kuali.student.r2.common.infc.StateProcess;
 26  
 import org.kuali.student.r2.core.type.infc.Type;
 27  
 import org.w3c.dom.Element;
 28  
 
 29  0
 @SuppressWarnings("serial")
 30  
 @XmlAccessorType(XmlAccessType.FIELD)
 31  
 @XmlType(name = "StateProcessInfo", propOrder = {"key", "name", "descr", "effectiveDate", "expirationDate", "attributes", "_futureElements"})
 32  
 public class StateProcessInfo extends HasAttributesInfo implements StateProcess, Serializable {
 33  
 
 34  
     @XmlAttribute
 35  
     private String key;
 36  
 
 37  
     @XmlElement
 38  
     private String name;
 39  
 
 40  
     @XmlElement
 41  
     private RichTextInfo descr;
 42  
 
 43  
     @XmlElement
 44  
     private Date effectiveDate;
 45  
 
 46  
     @XmlElement
 47  
     private Date expirationDate;
 48  
 
 49  
     @XmlAnyElement
 50  
     private List<Element> _futureElements;
 51  
 
 52  
     public static StateProcessInfo getInstance(StateProcess process) {
 53  0
         return new StateProcessInfo((Type) process);
 54  
     }
 55  
 
 56  
     public static StateProcessInfo newInstance() {
 57  0
         return new StateProcessInfo();
 58  
     }
 59  
 
 60  0
     public StateProcessInfo() {
 61  0
         key = null;
 62  0
         name = null;
 63  0
         descr = null;
 64  0
         effectiveDate = null;
 65  0
         expirationDate = null;
 66  0
         _futureElements = null;
 67  0
     }
 68  
 
 69  
     public StateProcessInfo(Type type) {
 70  0
         super(type);
 71  0
         this.key = type.getKey();
 72  0
         this.name = type.getName();
 73  0
         this.descr = new RichTextInfo(type.getDescr());
 74  0
         this.effectiveDate = null != type.getEffectiveDate() ? new Date(type.getEffectiveDate().getTime()) : null;
 75  0
         this.expirationDate = null != type.getExpirationDate() ? new Date(type.getExpirationDate().getTime()) : null;
 76  0
         this._futureElements = null;
 77  0
     }
 78  
 
 79  
     @Override
 80  
     public String getKey() {
 81  0
         return key;
 82  
     }
 83  
 
 84  
     public void setKey(String key) {
 85  0
         this.key = key;
 86  0
     }
 87  
 
 88  
     @Override
 89  
     public String getName() {
 90  0
         return name;
 91  
     }
 92  
 
 93  
     public void setName(String name) {
 94  0
         this.name = name;
 95  0
     }
 96  
 
 97  
     @Override
 98  
     public RichTextInfo getDescr() {
 99  0
         return descr;
 100  
     }
 101  
 
 102  
     public void setDescr(RichTextInfo descr) {
 103  0
         this.descr = descr;
 104  0
     }
 105  
 
 106  
     @Override
 107  
     public Date getEffectiveDate() {
 108  0
         return effectiveDate;
 109  
     }
 110  
 
 111  
     public void setEffectiveDate(Date effectiveDate) {
 112  0
         this.effectiveDate = effectiveDate;
 113  0
     }
 114  
 
 115  
     @Override
 116  
     public Date getExpirationDate() {
 117  0
         return expirationDate;
 118  
     }
 119  
 
 120  
     public void setExpirationDate(Date expirationDate) {
 121  0
         this.expirationDate = expirationDate;
 122  0
     }
 123  
 }