1 /*
2 * dpkg - Debian Package library and the Debian Package Maven plugin
3 * (c) Copyright 2016 Gerrit Hohl
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19 package net.sourceforge.javadpkg.plugin.cfg;
20
21 import java.util.ArrayList;
22 import java.util.List;
23
24 import org.apache.maven.plugins.annotations.Parameter;
25
26 /**
27 * <p>
28 * The configuration of an entry for a version.
29 * </p>
30 *
31 * @author Gerrit Hohl (gerrit-hohl@users.sourceforge.net)
32 * @version <b>1.0</b>, 09.05.2016 by Gerrit Hohl
33 */
34 public class ChangeLogVersionEntryConfiguration {
35
36
37 /** The name of the package. */
38 @Parameter(name = "name", required = true)
39 private String name;
40 /** The version. */
41 @Parameter(name = "version", required = true)
42 private String version;
43 /** The distributions. */
44 @Parameter(name = "distributions", required = true)
45 private List<String> distributions;
46 /** The urgency of the version. */
47 @Parameter(name = "urgency", required = true)
48 private String urgency;
49 /** The details. */
50 @Parameter(name = "details", required = true)
51 private List<String> details;
52 /** The maintainer. */
53 @Parameter(name = "maintainer", required = true)
54 private String maintainer;
55 /** The date. */
56 @Parameter(name = "date", required = true)
57 private String date;
58
59
60 /**
61 * <p>
62 * Creates a configuration.
63 * </p>
64 */
65 public ChangeLogVersionEntryConfiguration() {
66 super();
67
68 this.name = 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 /**
79 * <p>
80 * Returns the name of the package.
81 * </p>
82 *
83 * @return The name or <code>null</code>, if no name is set.
84 */
85 public String getName() {
86 return this.name;
87 }
88
89
90 /**
91 * <p>
92 * Sets the name of the package.
93 * </p>
94 *
95 * @param name
96 * The name.
97 */
98 public void setName(String name) {
99 this.name = name;
100 }
101
102
103 /**
104 * <p>
105 * Returns the version.
106 * </p>
107 *
108 * @return The version or <code>null</code>, if no version is set.
109 */
110 public String getVersion() {
111 return this.version;
112 }
113
114
115 /**
116 * <p>
117 * Sets the version.
118 * </p>
119 *
120 * @param version
121 * The version.
122 */
123 public void setVersion(String version) {
124 this.version = version;
125 }
126
127
128 /**
129 * <p>
130 * Returns the distributions.
131 * </p>
132 *
133 * @return The distributions.
134 */
135 public List<String> getDistributions() {
136 return (new ArrayList<>(this.distributions));
137 }
138
139
140 /**
141 * <p>
142 * Sets the distributions.
143 * </p>
144 *
145 * @param distributions
146 * The distributions.
147 */
148 public void setDistributions(List<String> distributions) {
149 if (distributions == null) {
150 this.distributions = new ArrayList<>();
151 } else {
152 this.distributions = new ArrayList<>(distributions);
153 }
154 }
155
156
157 /**
158 * <p>
159 * Returns the urgency of the version.
160 * </p>
161 *
162 * @return The urgency or <code>null</code>, if no urgency is set.
163 */
164 public String getUrgency() {
165 return this.urgency;
166 }
167
168
169 /**
170 * <p>
171 * Sets the urgency of the version.
172 * </p>
173 *
174 * @param urgency
175 * The urgency.
176 */
177 public void setUrgency(String urgency) {
178 this.urgency = urgency;
179 }
180
181
182 /**
183 * <p>
184 * Returns the details.
185 * </p>
186 *
187 * @return The details.
188 */
189 public List<String> getDetails() {
190 return (new ArrayList<>(this.details));
191 }
192
193
194 /**
195 * <p>
196 * Sets the details.
197 * </p>
198 *
199 * @param details
200 * The details.
201 */
202 public void setDetails(List<String> details) {
203 if (details == null) {
204 this.details = new ArrayList<>();
205 } else {
206 this.details = new ArrayList<>(details);
207 }
208 }
209
210
211 /**
212 * <p>
213 * Returns the maintainer.
214 * </p>
215 *
216 * @return The maintainer or <code>null</code>, if no maintainer is set.
217 */
218 public String getMaintainer() {
219 return this.maintainer;
220 }
221
222
223 /**
224 * <p>
225 * Sets the maintainer.
226 * </p>
227 *
228 * @param maintainer
229 * The maintainer.
230 */
231 public void setMaintainer(String maintainer) {
232 this.maintainer = maintainer;
233 }
234
235
236 /**
237 * <p>
238 * Returns the date.
239 * </p>
240 *
241 * @return The date or <code>null</code>, if no date is set.
242 */
243 public String getDate() {
244 return this.date;
245 }
246
247
248 /**
249 * <p>
250 * Sets the date.
251 * </p>
252 *
253 * @param date
254 * The date.
255 */
256 public void setDate(String date) {
257 this.date = date;
258 }
259
260
261 }