Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
ModuleDescription |
|
| 1.0;1 |
1 | package org.jtheque.core.managers.update.repository; | |
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.InternationalString; | |
20 | import org.jtheque.utils.bean.Version; | |
21 | ||
22 | /** | |
23 | * An online description of a module. | |
24 | * | |
25 | * @author Baptiste Wicht | |
26 | */ | |
27 | 0 | public final class ModuleDescription { |
28 | private String id; | |
29 | private String name; | |
30 | private InternationalString description; | |
31 | private String versionsFileURL; | |
32 | private Version coreVersion; | |
33 | ||
34 | /** | |
35 | * Return the name of the module. | |
36 | * | |
37 | * @return The name of the module. | |
38 | */ | |
39 | public String getName() { | |
40 | 0 | return name; |
41 | } | |
42 | ||
43 | /** | |
44 | * Set the name of the module. | |
45 | * | |
46 | * @param name The name of the module. | |
47 | */ | |
48 | public void setName(String name) { | |
49 | 0 | this.name = name; |
50 | 0 | } |
51 | ||
52 | /** | |
53 | * Return the description of the module. | |
54 | * | |
55 | * @return The description of the module. | |
56 | */ | |
57 | public InternationalString getDescription() { | |
58 | 0 | return description; |
59 | } | |
60 | ||
61 | /** | |
62 | * Set the description of the module. | |
63 | * | |
64 | * @param description The description of the module. | |
65 | */ | |
66 | public void setDescription(InternationalString description) { | |
67 | 0 | this.description = description; |
68 | 0 | } |
69 | ||
70 | /** | |
71 | * Return the versions file URL. | |
72 | * | |
73 | * @return The URL of the versions file. | |
74 | */ | |
75 | public String getVersionsFileURL() { | |
76 | 0 | return versionsFileURL; |
77 | } | |
78 | ||
79 | /** | |
80 | * Set the versions file URL. | |
81 | * | |
82 | * @param versionsFileURL The URL of the versions file. | |
83 | */ | |
84 | public void setVersionsFileURL(String versionsFileURL) { | |
85 | 0 | this.versionsFileURL = versionsFileURL; |
86 | 0 | } |
87 | ||
88 | /** | |
89 | * Return the core version. | |
90 | * | |
91 | * @return The version of the core. | |
92 | */ | |
93 | public Version getCoreVersion() { | |
94 | 0 | return coreVersion; |
95 | } | |
96 | ||
97 | /** | |
98 | * Set the version of the core. | |
99 | * | |
100 | * @param coreVersion The version of the core. | |
101 | */ | |
102 | public void setCoreVersion(Version coreVersion) { | |
103 | 0 | this.coreVersion = coreVersion; |
104 | 0 | } |
105 | ||
106 | /** | |
107 | * Return the id of the module. | |
108 | * | |
109 | * @return The id of the module. | |
110 | */ | |
111 | public String getId() { | |
112 | 0 | return id; |
113 | } | |
114 | ||
115 | /** | |
116 | * Set the id of the module. | |
117 | * | |
118 | * @param id The id of the module. | |
119 | */ | |
120 | public void setId(String id) { | |
121 | 0 | this.id = id; |
122 | 0 | } |
123 | ||
124 | @Override | |
125 | public String toString() { | |
126 | 0 | return "ModuleDescription{" + |
127 | "name='" + name + '\'' + | |
128 | ", description=" + description + | |
129 | ", versionsFileURL='" + versionsFileURL + '\'' + | |
130 | ", core=" + coreVersion + | |
131 | '}'; | |
132 | } | |
133 | } |