1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
package org.kuali.student.r2.core.versionmanagement.dto; |
12 | |
|
13 | |
import org.kuali.student.r2.core.versionmanagement.infc.VersionDisplay; |
14 | |
import org.w3c.dom.Element; |
15 | |
|
16 | |
import javax.xml.bind.annotation.XmlAccessType; |
17 | |
import javax.xml.bind.annotation.XmlAccessorType; |
18 | |
import javax.xml.bind.annotation.XmlAnyElement; |
19 | |
import javax.xml.bind.annotation.XmlElement; |
20 | |
import javax.xml.bind.annotation.XmlType; |
21 | |
import java.io.Serializable; |
22 | |
import java.util.Date; |
23 | |
import java.util.List; |
24 | |
import javax.xml.bind.annotation.XmlAttribute; |
25 | |
|
26 | |
@XmlAccessorType(XmlAccessType.FIELD) |
27 | |
@XmlType(name = "VersionDisplayInfo", propOrder = {"id", |
28 | |
"versionIndId", |
29 | |
"refObjectUri", |
30 | |
"sequenceNumber", |
31 | |
"currentVersionEnd", |
32 | |
"currentVersionStart", |
33 | |
"versionComment", |
34 | |
"versionedFromId", |
35 | |
"_futureElements"}) |
36 | |
public class VersionDisplayInfo implements VersionDisplay, Serializable { |
37 | |
|
38 | |
private static final long serialVersionUID = 1L; |
39 | |
@XmlAttribute |
40 | |
private String id; |
41 | |
@XmlElement |
42 | |
private String versionIndId; |
43 | |
@XmlElement |
44 | |
private String refObjectUri; |
45 | |
@XmlElement |
46 | |
private Long sequenceNumber; |
47 | |
@XmlElement |
48 | |
private Date currentVersionStart; |
49 | |
@XmlElement |
50 | |
private Date currentVersionEnd; |
51 | |
@XmlElement |
52 | |
private String versionComment; |
53 | |
@XmlElement |
54 | |
private String versionedFromId; |
55 | |
@XmlAnyElement |
56 | |
private List<Element> _futureElements; |
57 | |
|
58 | 0 | public VersionDisplayInfo() { |
59 | 0 | } |
60 | |
|
61 | |
public VersionDisplayInfo(VersionDisplay versionDisplay) { |
62 | 0 | super(); |
63 | |
|
64 | 0 | if (null != versionDisplay) { |
65 | 0 | this.id = versionDisplay.getId(); |
66 | 0 | this.versionIndId = versionDisplay.getVersionIndId(); |
67 | 0 | this.sequenceNumber = versionDisplay.getSequenceNumber(); |
68 | 0 | this.currentVersionStart = (null != versionDisplay.getCurrentVersionStart()) ? new Date(versionDisplay.getCurrentVersionStart().getTime()) : null; |
69 | 0 | this.currentVersionEnd = (null != versionDisplay.getCurrentVersionEnd()) ? new Date(versionDisplay.getCurrentVersionEnd().getTime()) : null; |
70 | 0 | this.versionComment = versionDisplay.getVersionComment(); |
71 | 0 | this.versionedFromId = versionDisplay.getVersionedFromId(); |
72 | |
} |
73 | 0 | } |
74 | |
|
75 | |
@Override |
76 | |
public String getId() { |
77 | 0 | return id; |
78 | |
} |
79 | |
|
80 | |
public void setId(String id) { |
81 | 0 | this.id = id; |
82 | 0 | } |
83 | |
|
84 | |
@Override |
85 | |
public String getVersionedFromId() { |
86 | 0 | return versionedFromId; |
87 | |
} |
88 | |
|
89 | |
public void setVersionedFromId(String versionedFromId) { |
90 | 0 | this.versionedFromId = versionedFromId; |
91 | 0 | } |
92 | |
|
93 | |
@Override |
94 | |
public String getRefObjectUri() { |
95 | 0 | return refObjectUri; |
96 | |
} |
97 | |
|
98 | |
public void setRefObjectUri(String refObjectUri) { |
99 | 0 | this.refObjectUri = refObjectUri; |
100 | 0 | } |
101 | |
|
102 | |
@Override |
103 | |
public String getVersionIndId() { |
104 | 0 | return versionIndId; |
105 | |
} |
106 | |
|
107 | |
public void setVersionIndId(String versionIndId) { |
108 | 0 | this.versionIndId = versionIndId; |
109 | 0 | } |
110 | |
|
111 | |
@Override |
112 | |
public Long getSequenceNumber() { |
113 | 0 | return sequenceNumber; |
114 | |
} |
115 | |
|
116 | |
public void setSequenceNumber(Long sequenceNumber) { |
117 | 0 | this.sequenceNumber = sequenceNumber; |
118 | 0 | } |
119 | |
|
120 | |
@Override |
121 | |
public Date getCurrentVersionStart() { |
122 | 0 | return currentVersionStart; |
123 | |
} |
124 | |
|
125 | |
public void setCurrentVersionStart(Date currentVersionStart) { |
126 | 0 | this.currentVersionStart = currentVersionStart; |
127 | 0 | } |
128 | |
|
129 | |
@Override |
130 | |
public Date getCurrentVersionEnd() { |
131 | 0 | return currentVersionEnd; |
132 | |
} |
133 | |
|
134 | |
public void setCurrentVersionEnd(Date currentVersionEnd) { |
135 | 0 | this.currentVersionEnd = currentVersionEnd; |
136 | 0 | } |
137 | |
|
138 | |
@Override |
139 | |
public String getVersionComment() { |
140 | 0 | return versionComment; |
141 | |
} |
142 | |
|
143 | |
public void setVersionComment(String versionComment) { |
144 | 0 | this.versionComment = versionComment; |
145 | 0 | } |
146 | |
} |