View Javadoc

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.common.versionmanagement.dto;
17  
18  import java.io.Serializable;
19  import java.util.Date;
20  
21  import javax.xml.bind.annotation.XmlAccessType;
22  import javax.xml.bind.annotation.XmlAccessorType;
23  import javax.xml.bind.annotation.XmlElement;
24  
25  /**
26   * Detailed information about a proposal.
27   *
28   * @Author KSContractMojo
29   * @Author Kamal
30   * @Since Thu May 28 10:25:28 EDT 2009
31   * @See <a href="https://wiki.kuali.org/display/KULSTU/versionDisplayInfo+Structure">VersionInfo</>
32   *
33   */
34  @XmlAccessorType(XmlAccessType.FIELD)
35  public class VersionDisplayInfo implements Serializable  {
36  
37  	public VersionDisplayInfo(String id, String versionIndId,
38  			Long sequenceNumber,
39  			Date currentVersionStart, Date currentVersionEnd,
40  			String versionComment, String versionedFromId) {
41  		super();
42  		this.id = id;
43  		this.versionIndId = versionIndId;
44  		this.sequenceNumber = sequenceNumber;
45  		this.currentVersionStart = currentVersionStart;
46  		this.currentVersionEnd = currentVersionEnd;
47  		this.versionComment = versionComment;
48  		this.versionedFromId = versionedFromId;
49  	}
50  
51  	public VersionDisplayInfo() {
52  	}
53  
54  	private static final long serialVersionUID = 1L;
55  
56      @XmlElement 
57      private String id;
58      
59      @XmlElement
60      private String versionIndId;
61  
62      @XmlElement
63      private String objectTypeURI;
64      
65      @XmlElement
66      private Long sequenceNumber;
67      
68      @XmlElement
69      private Date currentVersionStart;
70  
71  	@XmlElement
72      private Date currentVersionEnd;
73  
74      @XmlElement
75      private String versionComment;
76  
77      @XmlElement
78      private String versionedFromId;
79  
80  
81      public String getVersionedFromId() {
82  		return versionedFromId;
83  	}
84  
85  	public void setVersionedFromId(String versionedFromId) {
86  		this.versionedFromId = versionedFromId;
87  	}
88  
89  	/**
90       * Version specific id of the entity
91       */
92      public String getId() {
93          return id;
94      }
95  
96      public void setId(String id) {
97          this.id = id;
98      }
99  
100     public String getObjectTypeURI() {
101         return objectTypeURI;
102     }
103 
104     public void setObjectTypeURI(String objectTypeURI) {
105         this.objectTypeURI = objectTypeURI;
106     }
107 
108     /*
109      * Version independent Id that remains the same across all versions
110      */
111     public String getVersionIndId() {
112         return versionIndId;
113     }
114 
115     public void setVersionIndId(String versionIndId) {
116         this.versionIndId = versionIndId;
117     }
118 
119     /**
120      * The sequence number of the version
121      */
122     public Long getSequenceNumber() {
123         return sequenceNumber;
124     }
125 
126     public void setSequenceNumber(Long sequenceNumber) {
127         this.sequenceNumber = sequenceNumber;
128     }
129     
130     /**
131      * 	The date and time this version became current.
132      */
133     public Date getCurrentVersionStart() {
134 		return currentVersionStart;
135 	}
136 
137 	public void setCurrentVersionStart(Date currentVersionStart) {
138 		this.currentVersionStart = currentVersionStart;
139 	}
140 	
141     /**
142      * 	The date and time when this version stopped being current.
143      */
144 	public Date getCurrentVersionEnd() {
145 		return currentVersionEnd;
146 	}
147 
148 	public void setCurrentVersionEnd(Date currentVersionEnd) {
149 		this.currentVersionEnd = currentVersionEnd;
150 	}
151 	
152     /**
153      * Comments associated with the verison
154      */
155     public String getVersionComment() {
156         return versionComment;
157     }
158 
159     public void setVersionComment(String versionComment) {
160         this.versionComment = versionComment;
161     }
162 }