|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| QedeqBo | Line # 31 | 0 | 0 | - |
-1.0
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| No Tests | |||
| 1 | /* This file is part of the project "Hilbert II" - http://www.qedeq.org | |
| 2 | * | |
| 3 | * Copyright 2000-2010, Michael Meyling <mime@qedeq.org>. | |
| 4 | * | |
| 5 | * "Hilbert II" is free software; you can redistribute | |
| 6 | * it and/or modify it under the terms of the GNU General Public | |
| 7 | * License as published by the Free Software Foundation; either | |
| 8 | * version 2 of the License, or (at your option) any later version. | |
| 9 | * | |
| 10 | * This program 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 | ||
| 16 | package org.qedeq.kernel.bo; | |
| 17 | ||
| 18 | import org.qedeq.kernel.base.module.Qedeq; | |
| 19 | import org.qedeq.kernel.common.DependencyState; | |
| 20 | import org.qedeq.kernel.common.LoadingState; | |
| 21 | import org.qedeq.kernel.common.LogicalState; | |
| 22 | import org.qedeq.kernel.common.ModuleAddress; | |
| 23 | import org.qedeq.kernel.common.SourceFileExceptionList; | |
| 24 | ||
| 25 | ||
| 26 | /** | |
| 27 | * Represents a module and its states. | |
| 28 | * | |
| 29 | * @author Michael Meyling | |
| 30 | */ | |
| 31 | public interface QedeqBo { | |
| 32 | ||
| 33 | /** | |
| 34 | * Has the module any basic failures? This includes errors during loading the module, during load | |
| 35 | * of imported modules and logical checking. This includes no plugin errors. | |
| 36 | * | |
| 37 | * @return wWre there any basic errors? | |
| 38 | */ | |
| 39 | public boolean hasBasicFailures(); | |
| 40 | ||
| 41 | /** | |
| 42 | * Is this a error state the module is in? | |
| 43 | * | |
| 44 | * @return Were there any errors? | |
| 45 | */ | |
| 46 | public boolean hasErrors(); | |
| 47 | ||
| 48 | /** | |
| 49 | * Is this a warning state the module is in? | |
| 50 | * | |
| 51 | * @return Were there any warnings? | |
| 52 | */ | |
| 53 | public boolean hasWarnings(); | |
| 54 | ||
| 55 | /** | |
| 56 | * Get {@link ModuleAddress} of module. | |
| 57 | * | |
| 58 | * @return Address of module. | |
| 59 | */ | |
| 60 | public ModuleAddress getModuleAddress(); | |
| 61 | ||
| 62 | /** | |
| 63 | * Get module loading state. | |
| 64 | * | |
| 65 | * @return Module state. | |
| 66 | */ | |
| 67 | public LoadingState getLoadingState(); | |
| 68 | ||
| 69 | /** | |
| 70 | * Set completeness percentage. | |
| 71 | * | |
| 72 | * @return completeness Completeness of loading into memory in percent. | |
| 73 | */ | |
| 74 | public int getLoadingCompleteness(); | |
| 75 | ||
| 76 | /** | |
| 77 | * Get module dependency state. | |
| 78 | * | |
| 79 | * @return module state. | |
| 80 | */ | |
| 81 | public DependencyState getDependencyState(); | |
| 82 | ||
| 83 | /** | |
| 84 | * Get module logical state. | |
| 85 | * | |
| 86 | * @return module state. | |
| 87 | */ | |
| 88 | public LogicalState getLogicalState(); | |
| 89 | ||
| 90 | /** | |
| 91 | * Get error list. | |
| 92 | * | |
| 93 | * @return Error list. | |
| 94 | */ | |
| 95 | public SourceFileExceptionList getErrors(); | |
| 96 | ||
| 97 | /** | |
| 98 | * Get warning list. | |
| 99 | * | |
| 100 | * @return Warning list. | |
| 101 | */ | |
| 102 | public SourceFileExceptionList getWarnings(); | |
| 103 | ||
| 104 | /** | |
| 105 | * Get module state description. | |
| 106 | * | |
| 107 | * @return module state description. | |
| 108 | */ | |
| 109 | public String getStateDescription(); | |
| 110 | ||
| 111 | /** | |
| 112 | * Get name of module. | |
| 113 | * | |
| 114 | * @return module name. | |
| 115 | */ | |
| 116 | public String getName(); | |
| 117 | ||
| 118 | /** | |
| 119 | * Get rule version information. | |
| 120 | * | |
| 121 | * @return rule version. | |
| 122 | */ | |
| 123 | public String getRuleVersion(); | |
| 124 | ||
| 125 | /** | |
| 126 | * Get original URL of module. | |
| 127 | * | |
| 128 | * @return URL of module. | |
| 129 | */ | |
| 130 | public String getUrl(); | |
| 131 | ||
| 132 | /** | |
| 133 | * Is this module already loaded? | |
| 134 | * | |
| 135 | * @return Is this module already loaded? | |
| 136 | */ | |
| 137 | public boolean isLoaded(); | |
| 138 | ||
| 139 | /** | |
| 140 | * Get module. Works only if module is already completely loaded. | |
| 141 | * | |
| 142 | * @return QEDEQ module if it is already loaded. | |
| 143 | */ | |
| 144 | public Qedeq getQedeq(); | |
| 145 | ||
| 146 | ||
| 147 | /** | |
| 148 | * Are all required modules loaded? | |
| 149 | * | |
| 150 | * @return Are all required modules loaded? | |
| 151 | */ | |
| 152 | public boolean hasLoadedRequiredModules(); | |
| 153 | ||
| 154 | /** | |
| 155 | * Get labels and URLs of all referenced modules. Only available if module has loaded | |
| 156 | * all required modules. Otherwise a runtime exception is thrown. | |
| 157 | * | |
| 158 | * @return URLs of all referenced modules. | |
| 159 | * @throws IllegalStateException Module not yet loaded. | |
| 160 | */ | |
| 161 | public ModuleReferenceList getRequiredModules(); | |
| 162 | ||
| 163 | /** | |
| 164 | * Was the module checked? | |
| 165 | * | |
| 166 | * @return Module is checked? | |
| 167 | */ | |
| 168 | public boolean isChecked(); | |
| 169 | ||
| 170 | } | |
|
||||||||||