| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| ModuleInfo |
|
| 1.0;1 |
| 1 | package org.jtheque.core.managers.module; | |
| 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.core.managers.module.beans.ModuleState; | |
| 20 | ||
| 21 | /** | |
| 22 | * A module information. | |
| 23 | * | |
| 24 | * @author Baptiste Wicht | |
| 25 | */ | |
| 26 | final class ModuleInfo { | |
| 27 | private String moduleId; | |
| 28 | private ModuleState state; | |
| 29 | ||
| 30 | /** | |
| 31 | * Construct a new ModuleInfo with a specified id. | |
| 32 | * | |
| 33 | * @param id The id of the module. | |
| 34 | */ | |
| 35 | public ModuleInfo(String id) { | |
| 36 | 0 | super(); |
| 37 | ||
| 38 | 0 | moduleId = id; |
| 39 | 0 | } |
| 40 | ||
| 41 | /** | |
| 42 | * Set the state of the module. | |
| 43 | * | |
| 44 | * @param state The new state of the module. | |
| 45 | */ | |
| 46 | public void setState(ModuleState state) { | |
| 47 | 0 | this.state = state; |
| 48 | 0 | } |
| 49 | ||
| 50 | /** | |
| 51 | * Return the state of the module. | |
| 52 | * | |
| 53 | * @return The state of the module. | |
| 54 | */ | |
| 55 | public ModuleState getState() { | |
| 56 | 0 | return state; |
| 57 | } | |
| 58 | ||
| 59 | /** | |
| 60 | * Set the module name. | |
| 61 | * | |
| 62 | * @param moduleId The name of the module. | |
| 63 | */ | |
| 64 | public void setModuleId(String moduleId) { | |
| 65 | 0 | this.moduleId = moduleId; |
| 66 | 0 | } |
| 67 | ||
| 68 | /** | |
| 69 | * Return the module name. | |
| 70 | * | |
| 71 | * @return The name of the module. | |
| 72 | */ | |
| 73 | public String getModuleId() { | |
| 74 | 0 | return moduleId; |
| 75 | } | |
| 76 | } |