1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package net.sourceforge.javadpkg.impl;
20
21 import java.util.ArrayList;
22 import java.util.Date;
23 import java.util.List;
24
25 import net.sourceforge.javadpkg.ChangeLogUrgency;
26 import net.sourceforge.javadpkg.ChangeLogVersionEntry;
27 import net.sourceforge.javadpkg.ChangeLogVersionEntryDetail;
28 import net.sourceforge.javadpkg.control.PackageMaintainer;
29 import net.sourceforge.javadpkg.control.PackageName;
30 import net.sourceforge.javadpkg.control.PackageVersion;
31
32
33
34
35
36
37
38
39
40
41 public class ChangeLogVersionEntryImpl implements ChangeLogVersionEntry {
42
43
44
45 private PackageName packageName;
46
47 private PackageVersion version;
48
49 private List<String> distributions;
50
51 private ChangeLogUrgency urgency;
52
53 private List<ChangeLogVersionEntryDetail> details;
54
55 private PackageMaintainer maintainer;
56
57 private Date date;
58
59
60
61
62
63
64
65 public ChangeLogVersionEntryImpl() {
66 super();
67
68 this.packageName = null;
69 this.version = null;
70 this.distributions = new ArrayList<>();
71 this.urgency = null;
72 this.details = new ArrayList<>();
73 this.maintainer = null;
74 this.date = null;
75 }
76
77
78 @Override
79 public PackageName getPackage() {
80 return this.packageName;
81 }
82
83
84
85
86
87
88
89
90
91
92 public void setPackageName(PackageName packageName) {
93 this.packageName = packageName;
94 }
95
96
97 @Override
98 public PackageVersion getVersion() {
99 return this.version;
100 }
101
102
103
104
105
106
107
108
109
110 public void setVersion(PackageVersion version) {
111 this.version = version;
112 }
113
114
115 @Override
116 public List<String> getDistributions() {
117 return (new ArrayList<>(this.distributions));
118 }
119
120
121
122
123
124
125
126
127
128
129 public void setDistributions(List<String> distributions) {
130 if (distributions == null) {
131 this.distributions = new ArrayList<>();
132 } else {
133 this.distributions = new ArrayList<>(distributions);
134 }
135 }
136
137
138 @Override
139 public ChangeLogUrgency getUrgency() {
140 return this.urgency;
141 }
142
143
144
145
146
147
148
149
150
151
152 public void setUrgency(ChangeLogUrgency urgency) {
153 this.urgency = urgency;
154 }
155
156
157 @Override
158 public List<ChangeLogVersionEntryDetail> getDetails() {
159 return (new ArrayList<>(this.details));
160 }
161
162
163
164
165
166
167
168
169
170
171 public void setDetails(List<ChangeLogVersionEntryDetail> details) {
172 if (details == null) {
173 this.details = new ArrayList<>();
174 } else {
175 this.details = new ArrayList<>(details);
176 }
177 }
178
179
180
181
182
183
184
185
186
187
188
189
190 public void addDetail(ChangeLogVersionEntryDetail detail) {
191 if (detail == null)
192 throw new IllegalArgumentException("Argument detail is null.");
193
194 this.details.add(detail);
195 }
196
197
198 @Override
199 public PackageMaintainer getMaintainer() {
200 return this.maintainer;
201 }
202
203
204
205
206
207
208
209
210
211
212 public void setMaintainer(PackageMaintainer maintainer) {
213 this.maintainer = maintainer;
214 }
215
216
217 @Override
218 public Date getDate() {
219 return this.date;
220 }
221
222
223
224
225
226
227
228
229
230
231 public void setDate(Date date) {
232 this.date = date;
233 }
234
235
236 }