| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| Repository |
|
| 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 | ||
| 21 | import java.util.ArrayList; | |
| 22 | import java.util.Collection; | |
| 23 | ||
| 24 | /** | |
| 25 | * A module repository. | |
| 26 | * | |
| 27 | * @author Baptiste Wicht | |
| 28 | */ | |
| 29 | 0 | public final class Repository { |
| 30 | private InternationalString title; | |
| 31 | private String application; | |
| 32 | 0 | private final Collection<ModuleDescription> modules = new ArrayList<ModuleDescription>(10); |
| 33 | ||
| 34 | /** | |
| 35 | * Return the title of the repository. | |
| 36 | * | |
| 37 | * @return The title of the repository. | |
| 38 | */ | |
| 39 | public InternationalString getTitle() { | |
| 40 | 0 | return title; |
| 41 | } | |
| 42 | ||
| 43 | /** | |
| 44 | * Set the title of the repository. | |
| 45 | * | |
| 46 | * @param title The title of the repository. | |
| 47 | */ | |
| 48 | public void setTitle(InternationalString title) { | |
| 49 | 0 | this.title = title; |
| 50 | 0 | } |
| 51 | ||
| 52 | /** | |
| 53 | * Return the application name. | |
| 54 | * | |
| 55 | * @return The application name. | |
| 56 | */ | |
| 57 | public String getApplication() { | |
| 58 | 0 | return application; |
| 59 | } | |
| 60 | ||
| 61 | /** | |
| 62 | * Set the application name. | |
| 63 | * | |
| 64 | * @param application The application name. | |
| 65 | */ | |
| 66 | public void setApplication(String application) { | |
| 67 | 0 | this.application = application; |
| 68 | 0 | } |
| 69 | ||
| 70 | /** | |
| 71 | * Return all the modules of the repository. | |
| 72 | * | |
| 73 | * @return A List containing the description of the modules. | |
| 74 | */ | |
| 75 | public Collection<ModuleDescription> getModules() { | |
| 76 | 0 | return modules; |
| 77 | } | |
| 78 | ||
| 79 | @Override | |
| 80 | public String toString() { | |
| 81 | 0 | return "Repository{" + |
| 82 | "title=" + title + | |
| 83 | ", application='" + application + '\'' + | |
| 84 | ", modules=" + modules + | |
| 85 | '}'; | |
| 86 | } | |
| 87 | } |