Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
IVersionsLoader |
|
| 1.0;1 |
1 | package org.jtheque.core.managers.update.versions; | |
2 | ||
3 | /* | |
4 | * This file is part of JTheque. | |
5 | * | |
6 | * JTheque is free software: you can redistribute it and/or modify | |
7 | * it under the terms of the GNU General Public License as published by | |
8 | * the Free Software Foundation, either version 3 of the License. | |
9 | * | |
10 | * JTheque 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 JTheque. If not, see <http://www.gnu.org/licenses/>. | |
17 | */ | |
18 | ||
19 | import org.jtheque.utils.bean.Version; | |
20 | ||
21 | import java.util.Collection; | |
22 | ||
23 | /** | |
24 | * A version loader specification. | |
25 | * | |
26 | * @author Baptiste Wicht | |
27 | */ | |
28 | public interface IVersionsLoader { | |
29 | /** | |
30 | * Return the version of the object. | |
31 | * | |
32 | * @param object The object to get the version from. | |
33 | * @return The version of the object. | |
34 | */ | |
35 | Version getVersion(Object object); | |
36 | ||
37 | /** | |
38 | * Return all the versions of the object. | |
39 | * | |
40 | * @param object The object to get the versions from. | |
41 | * @return A List containing all the versions from. | |
42 | */ | |
43 | Collection<Version> getVersions(Object object); | |
44 | ||
45 | /** | |
46 | * Return the online versions of the object. | |
47 | * | |
48 | * @param object The object to get the version from. | |
49 | * @return A List containing all the online versions of the object. | |
50 | */ | |
51 | Collection<OnlineVersion> getOnlineVersions(Object object); | |
52 | ||
53 | /** | |
54 | * Return the online version corresponding to the specified version. | |
55 | * | |
56 | * @param version The version to search for. | |
57 | * @param object The object to search in. | |
58 | * @return The corresponding online version. | |
59 | */ | |
60 | OnlineVersion getOnlineVersion(Version version, Object object); | |
61 | ||
62 | /** | |
63 | * Return the install version of the version file. | |
64 | * | |
65 | * @param versionFileURL The VersionFile URL. | |
66 | * @return The install version of the versions file. | |
67 | */ | |
68 | InstallVersion getInstallVersion(String versionFileURL); | |
69 | ||
70 | /** | |
71 | * Return the most recent version of the object. | |
72 | * | |
73 | * @param object The object. It can be the Core, a module or an updatable. | |
74 | * @return The most recent version of the object. | |
75 | */ | |
76 | Version getMostRecentVersion(Object object); | |
77 | } |