View Javadoc
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.io.File;
22  import java.util.ArrayList;
23  import java.util.List;
24  
25  import org.apache.maven.plugins.annotations.Parameter;
26  
27  /**
28   * <p>
29   * The change log configuration.
30   * </p>
31   *
32   * @author Gerrit Hohl (gerrit-hohl@users.sourceforge.net)
33   * @version <b>1.0</b>, 09.05.2016 by Gerrit Hohl
34   */
35  public class ChangeLogConfiguration {
36  	
37  	
38  	/** The file. */
39  	@Parameter(name = "file")
40  	private File										file;
41  	/** The entries. */
42  	@Parameter(name = "entries")
43  	private List<ChangeLogVersionEntryConfiguration>	entries;
44  	
45  	
46  	/**
47  	 * <p>
48  	 * Creates the configuration.
49  	 * </p>
50  	 */
51  	public ChangeLogConfiguration() {
52  		super();
53  
54  		this.file = null;
55  		this.entries = new ArrayList<>();
56  	}
57  
58  
59  	/**
60  	 * <p>
61  	 * Returns the file.
62  	 * </p>
63  	 *
64  	 * @return The file or <code>null</code>, if no file is set.
65  	 */
66  	public File getFile() {
67  		return this.file;
68  	}
69  	
70  	
71  	/**
72  	 * <p>
73  	 * Sets the file.
74  	 * </p>
75  	 *
76  	 * @param file
77  	 *            The file.
78  	 */
79  	public void setFile(File file) {
80  		this.file = file;
81  	}
82  	
83  	
84  	/**
85  	 * <p>
86  	 * Returns the entries.
87  	 * </p>
88  	 * 
89  	 * @return The entries.
90  	 */
91  	public List<ChangeLogVersionEntryConfiguration> getEntries() {
92  		return (new ArrayList<>(this.entries));
93  	}
94  	
95  	
96  	/**
97  	 * <p>
98  	 * Sets the entries.
99  	 * </p>
100 	 * 
101 	 * @param entries
102 	 *            The entries.
103 	 */
104 	public void setEntries(List<ChangeLogVersionEntryConfiguration> entries) {
105 		if (entries == null) {
106 			this.entries = new ArrayList<>();
107 		} else {
108 			this.entries = new ArrayList<>(entries);
109 		}
110 	}
111 	
112 	
113 }