Coverage Report - org.kuali.student.r2.common.versionmanagement.dto.VersionDisplayInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
VersionDisplayInfo
0%
0/30
N/A
1
 
 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.versionmanagement.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.XmlElement;
 22  
 import javax.xml.bind.annotation.XmlType;
 23  
 
 24  
 import org.kuali.student.r2.common.versionmanagement.infc.VersionDisplay;
 25  
 import org.w3c.dom.Element;
 26  
 
 27  
 @XmlType(name = "VersionDisplayInfo", propOrder = {"versionIndId", "objectTypeURI", "sequenceNumber", "currentVersionEnd", "currentVersionStart", "versionComment", "versionedFromId",
 28  
         "_futureElements"})
 29  
 @XmlAccessorType(XmlAccessType.FIELD)
 30  
 public class VersionDisplayInfo implements VersionDisplay, Serializable {
 31  
 
 32  
     private static final long serialVersionUID = 1L;
 33  
 
 34  0
     public VersionDisplayInfo() {}
 35  
 
 36  
     @XmlElement
 37  
     private String versionIndId;
 38  
 
 39  
     @XmlElement
 40  
     private String objectTypeURI;
 41  
 
 42  
     @XmlElement
 43  
     private Long sequenceNumber;
 44  
 
 45  
     @XmlElement
 46  
     private Date currentVersionStart;
 47  
 
 48  
     @XmlElement
 49  
     private Date currentVersionEnd;
 50  
 
 51  
     @XmlElement
 52  
     private String versionComment;
 53  
 
 54  
     @XmlElement
 55  
     private String versionedFromId;
 56  
 
 57  
     @XmlAnyElement
 58  
     private List<Element> _futureElements;
 59  
 
 60  
     public VersionDisplayInfo(VersionDisplay versionDisplay) {
 61  0
         super();
 62  
 
 63  0
         this.versionIndId = versionDisplay.getVersionIndId();
 64  0
         this.sequenceNumber = versionDisplay.getSequenceNumber();
 65  0
         this.currentVersionStart = versionDisplay.getCurrentVersionStart();
 66  0
         this.currentVersionEnd = versionDisplay.getCurrentVersionEnd();
 67  0
         this.versionComment = versionDisplay.getVersionComment();
 68  0
         this.versionedFromId = versionDisplay.getVersionedFromId();
 69  0
     }
 70  
 
 71  
     @Override
 72  
     public String getVersionedFromId() {
 73  0
         return versionedFromId;
 74  
     }
 75  
 
 76  
     public void setVersionedFromId(String versionedFromId) {
 77  0
         this.versionedFromId = versionedFromId;
 78  0
     }
 79  
 
 80  
     @Override
 81  
     public String getObjectTypeURI() {
 82  0
         return objectTypeURI;
 83  
     }
 84  
 
 85  
     public void setObjectTypeURI(String objectTypeURI) {
 86  0
         this.objectTypeURI = objectTypeURI;
 87  0
     }
 88  
 
 89  
     /*
 90  
      * Version independent Id that remains the same across all versions
 91  
      */
 92  
     @Override
 93  
     public String getVersionIndId() {
 94  0
         return versionIndId;
 95  
     }
 96  
 
 97  
     public void setVersionIndId(String versionIndId) {
 98  0
         this.versionIndId = versionIndId;
 99  0
     }
 100  
 
 101  
     /**
 102  
      * The sequence number of the version
 103  
      */
 104  
     @Override
 105  
     public Long getSequenceNumber() {
 106  0
         return sequenceNumber;
 107  
     }
 108  
 
 109  
     public void setSequenceNumber(Long sequenceNumber) {
 110  0
         this.sequenceNumber = sequenceNumber;
 111  0
     }
 112  
 
 113  
     /**
 114  
      * The date and time this version became current.
 115  
      */
 116  
     @Override
 117  
     public Date getCurrentVersionStart() {
 118  0
         return currentVersionStart;
 119  
     }
 120  
 
 121  
     public void setCurrentVersionStart(Date currentVersionStart) {
 122  0
         this.currentVersionStart = currentVersionStart;
 123  0
     }
 124  
 
 125  
     /**
 126  
      * The date and time when this version stopped being current.
 127  
      */
 128  
     @Override
 129  
     public Date getCurrentVersionEnd() {
 130  0
         return currentVersionEnd;
 131  
     }
 132  
 
 133  
     public void setCurrentVersionEnd(Date currentVersionEnd) {
 134  0
         this.currentVersionEnd = currentVersionEnd;
 135  0
     }
 136  
 
 137  
     /**
 138  
      * Comments associated with the verison
 139  
      */
 140  
     @Override
 141  
     public String getVersionComment() {
 142  0
         return versionComment;
 143  
     }
 144  
 
 145  
     public void setVersionComment(String versionComment) {
 146  0
         this.versionComment = versionComment;
 147  0
     }
 148  
 }