View Javadoc
1   /*
2    * dpkg - Debian Package library and the Debian Package Maven plugin
3    * (c) Copyright 2015 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.control;
20  
21  import java.util.List;
22  
23  /**
24   * <p>
25   * The control of a binary package.
26   * </p>
27   *
28   * @author Gerrit Hohl (gerrit-hohl@users.sourceforge.net)
29   * @version <b>1.0</b>, 31.12.2015 by Gerrit Hohl
30   */
31  public interface BinaryControl extends Control {
32  	
33  	
34  	/**
35  	 * <p>
36  	 * Returns the name of the binary package.
37  	 * </p>
38  	 *
39  	 * @return The name.
40  	 */
41  	PackageName getPackage();
42  
43  
44  	/**
45  	 * <p>
46  	 * Returns the section.
47  	 * </p>
48  	 * <p>
49  	 * See <a href=
50  	 * "https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Section">
51  	 * 5.6.5 Section</a> for further information.
52  	 * </p>
53  	 *
54  	 * @return The section.
55  	 */
56  	Section getSection();
57  
58  
59  	/**
60  	 * <p>
61  	 * Returns the priority.
62  	 * </p>
63  	 *
64  	 * @return The priority.
65  	 */
66  	PackagePriority getPriority();
67  
68  
69  	/**
70  	 * <p>
71  	 * The flag if the package is essential for the system and can't be removed.
72  	 * </p>
73  	 * <p>
74  	 * See <a href=
75  	 * "https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Essential">
76  	 * 5.6.9 Essential</a> for further information.
77  	 * </p>
78  	 *
79  	 * @return The flag.
80  	 */
81  	Boolean getEssential();
82  
83  
84  	/**
85  	 * <p>
86  	 * Returns the packages on which this package depends on.
87  	 * </p>
88  	 * <p>
89  	 * See <a href=
90  	 * "https://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps">
91  	 * 7.2 Binary Dependencies - Depends, Recommends, Suggests, Enhances,
92  	 * Pre-Depends</a> for further information.
93  	 * </p>
94  	 *
95  	 * @return The dependencies or an empty list, if the package doesn't have
96  	 *         any dependencies.
97  	 */
98  	List<PackageDependency> getDepends();
99  	
100 	
101 	/**
102 	 * <p>
103 	 * Returns the packages which this package has a strong, but not absolute,
104 	 * dependency.
105 	 * </p>
106 	 * <p>
107 	 * See <a href=
108 	 * "https://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps">
109 	 * 7.2 Binary Dependencies - Depends, Recommends, Suggests, Enhances,
110 	 * Pre-Depends</a> for further information.
111 	 * </p>
112 	 *
113 	 * @return The dependencies or an empty list, if the package doesn't have
114 	 *         any dependencies.
115 	 */
116 	List<PackageDependency> getRecommends();
117 	
118 	
119 	/**
120 	 * <p>
121 	 * Returns the packages which this package suggests to install for enhancing
122 	 * its functionality.
123 	 * </p>
124 	 * <p>
125 	 * The opposite of the list returned by the {@link #getEnhances()} method.
126 	 * </p>
127 	 * <p>
128 	 * See <a href=
129 	 * "https://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps">
130 	 * 7.2 Binary Dependencies - Depends, Recommends, Suggests, Enhances,
131 	 * Pre-Depends</a> for further information.
132 	 * </p>
133 	 *
134 	 * @return The dependencies or an empty list, if the package doesn't have
135 	 *         any dependencies.
136 	 */
137 	List<PackageDependency> getSuggests();
138 	
139 	
140 	/**
141 	 * <p>
142 	 * Returns the packages which are enhanced in their functionality by this
143 	 * package.
144 	 * </p>
145 	 * <p>
146 	 * The opposite of the list returned by the {@link #getSuggests()} method.
147 	 * </p>
148 	 * <p>
149 	 * See <a href=
150 	 * "https://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps">
151 	 * 7.2 Binary Dependencies - Depends, Recommends, Suggests, Enhances,
152 	 * Pre-Depends</a> for further information.
153 	 * </p>
154 	 *
155 	 * @return The dependencies or an empty list, if the package doesn't have
156 	 *         any dependencies.
157 	 */
158 	List<PackageDependency> getEnhances();
159 	
160 	
161 	/**
162 	 * <p>
163 	 * Returns the packages which must be installed before this package is
164 	 * installed.
165 	 * </p>
166 	 * <p>
167 	 * In comparison to the list returned by the {@link #getDepends()} method
168 	 * this packages must be completely installed by the time this package is
169 	 * installed and not allowed to be installed in the same process.
170 	 * </p>
171 	 * <p>
172 	 * See <a href=
173 	 * "https://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps">
174 	 * 7.2 Binary Dependencies - Depends, Recommends, Suggests, Enhances,
175 	 * Pre-Depends</a> for further information.
176 	 * </p>
177 	 *
178 	 * @return The dependencies or an empty list, if the package doesn't have
179 	 *         any dependencies.
180 	 */
181 	List<PackageDependency> getPreDepends();
182 	
183 	
184 	/**
185 	 * <p>
186 	 * Returns the packages which will &quot;broken&quot; by this package.
187 	 * </p>
188 	 * <p>
189 	 * This package can't be installed until the other packages are
190 	 * deconfigured. The broken packages can't be reconfigured afterwards.
191 	 * <p>
192 	 * See <a href=
193 	 * "https://www.debian.org/doc/debian-policy/ch-relationships.html#s-breaks">
194 	 * 7.3 Packages which break other packages - Breaks</a> for further
195 	 * information.
196 	 * </p>
197 	 *
198 	 * @return The dependencies or an empty list, if the package doesn't have
199 	 *         any dependencies.
200 	 */
201 	List<PackageDependency> getBreaks();
202 	
203 	
204 	/**
205 	 * <p>
206 	 * Returns the packages which will be in conflict with this package.
207 	 * </p>
208 	 * <p>
209 	 * The conflict packages and this package can't be installed on the same
210 	 * system at the same time.
211 	 * </p>
212 	 * <p>
213 	 * See <a href=
214 	 * "https://www.debian.org/doc/debian-policy/ch-relationships.html#s-conflicts">
215 	 * 7.4 Conflicting binary packages - Conflicts</a> for further information.
216 	 * </p>
217 	 *
218 	 * @return The dependencies or an empty list, if the package doesn't have
219 	 *         any dependencies.
220 	 */
221 	List<PackageDependency> getConflicts();
222 	
223 	
224 	/**
225 	 * <p>
226 	 * Returns the virtual packages which are provided by this package.
227 	 * </p>
228 	 * <p>
229 	 * See <a href=
230 	 * "https://www.debian.org/doc/debian-policy/ch-relationships.html#s-virtual">
231 	 * 7.5 Virtual packages - Provides</a> for further information.
232 	 * </p>
233 	 *
234 	 * @return The dependencies or an empty list, if the package doesn't have
235 	 *         any dependencies.
236 	 */
237 	List<PackageDependency> getProvides();
238 
239 
240 	/**
241 	 * <p>
242 	 * Returns the packages which are replaced by this package.
243 	 * </p>
244 	 * <p>
245 	 * See <a href=
246 	 * "https://www.debian.org/doc/debian-policy/ch-relationships.html#s-replaces">
247 	 * 7.6 Overwriting files and replacing packages - Replaces</a> for further
248 	 * information.
249 	 * </p>
250 	 *
251 	 * @return The dependencies or an empty list, if the package doesn't have
252 	 *         any dependencies.
253 	 */
254 	List<PackageDependency> getReplaces();
255 
256 
257 	/**
258 	 * <p>
259 	 * Returns the packages which were used to built this package.
260 	 * </p>
261 	 * <p>
262 	 * See <a href=
263 	 * "https://www.debian.org/doc/debian-policy/ch-relationships.html#s-built-using">
264 	 * 7.8 Additional source packages used to build the binary - Built-Using
265 	 * </p>
266 	 *
267 	 * @return The dependencies or an empty list, if the package doesn't have
268 	 *         any dependencies.
269 	 */
270 	List<PackageDependency> getBuiltUsing();
271 
272 
273 	/**
274 	 * <p>
275 	 * Returns an estimate of the total amount of disk space required to install
276 	 * this package.
277 	 * </p>
278 	 * <p>
279 	 * See <a href=
280 	 * "https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Installed-Size">
281 	 * </a> for further information.
282 	 * </p>
283 	 *
284 	 * @return The installed size.
285 	 */
286 	Size getInstalledSize();
287 	
288 	
289 	/**
290 	 * <p>
291 	 * Returns the description.
292 	 * </p>
293 	 *
294 	 * @return The description.
295 	 */
296 	Description getDescription();
297 
298 
299 	/**
300 	 * <p>
301 	 * Returns the module aliases.
302 	 * </p>
303 	 *
304 	 * @return The module aliases.
305 	 */
306 	String getModuleAliases();
307 	// TODO Create an own class / interface for the module alias.
308 	
309 	
310 }