| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| IPatchManager |
|
| 1.0;1 |
| 1 | package org.jtheque.core.managers.patch; | |
| 2 | ||
| 3 | import org.jtheque.core.managers.IManager; | |
| 4 | ||
| 5 | /* | |
| 6 | * This file is part of JTheque. | |
| 7 | * | |
| 8 | * JTheque is free software: you can redistribute it and/or modify | |
| 9 | * it under the terms of the GNU General Public License as published by | |
| 10 | * the Free Software Foundation, either version 3 of the License. | |
| 11 | * | |
| 12 | * JTheque is distributed in the hope that it will be useful, | |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 15 | * GNU General Public License for more details. | |
| 16 | * | |
| 17 | * You should have received a copy of the GNU General Public License | |
| 18 | * along with JTheque. If not, see <http://www.gnu.org/licenses/>. | |
| 19 | */ | |
| 20 | ||
| 21 | /** | |
| 22 | * A manager for the patch the modules, the core and the application can add to the application and which are launched | |
| 23 | * before the others things when the application launch. | |
| 24 | * | |
| 25 | * @author Baptiste Wicht | |
| 26 | */ | |
| 27 | public interface IPatchManager extends IManager { | |
| 28 | /** | |
| 29 | * Set updated. | |
| 30 | * | |
| 31 | * @param updated true if the application has been updated else false. | |
| 32 | */ | |
| 33 | void setUpdated(boolean updated); | |
| 34 | ||
| 35 | /** | |
| 36 | * Register an online patch. | |
| 37 | * | |
| 38 | * @param patch The online patch to register. | |
| 39 | */ | |
| 40 | void registerOnlinePatch(OnlinePatch patch); | |
| 41 | ||
| 42 | /** | |
| 43 | * Register a patch. | |
| 44 | * | |
| 45 | * @param p The patch to register. | |
| 46 | */ | |
| 47 | void registerPatch(Patch p); | |
| 48 | ||
| 49 | /** | |
| 50 | * Apply the patches if needed. | |
| 51 | * | |
| 52 | * @return The patches if needed. | |
| 53 | */ | |
| 54 | boolean applyPatchesIfNeeded(); | |
| 55 | ||
| 56 | /** | |
| 57 | * Indicate if a patch of a certain name is applied or not. | |
| 58 | * | |
| 59 | * @param name The name of the patch. | |
| 60 | * @return true if the patch has been applied else false. | |
| 61 | */ | |
| 62 | boolean isApplied(String name); | |
| 63 | } |