for (int i = 0; i < activeModules.size(); i++) { final Module mod = (Module) activeModules.get(i); p.print(new PadMessage(mod.getModuleClass(), 70)); p.print(" ["); p.print(mod.getSubSystem()); p.println("]"); p.print(" Version: "); p.print(mod.getMajorVersion()); p.print("-"); p.print(mod.getMinorVersion()); p.print("-"); p.print(mod.getPatchLevel()); p.print(" Producer: "); p.println(mod.getProducer()); p.print(" Description: "); p.println(mod.getDescription());
/** * Checks, whether a module is a base module of an given module. * * @param mod the module which to check * @param mi the module info of the suspected base module. * @return true, if the given module info describes a base module of the * given module, false otherwise. */ private static boolean isBaseModule(final Module mod, final ModuleInfo mi) { ModuleInfo[] info = mod.getRequiredModules(); for (int i = 0; i < info.length; i++) { if (info[i].getModuleClass().equals(mi.getModuleClass())) { return true; } } info = mod.getOptionalModules(); for (int i = 0; i < info.length; i++) { if (info[i].getModuleClass().equals(mi.getModuleClass())) { return true; } } return false; }
/** * Returns a basic string representation of this SortModule. This * should be used for debugging purposes only. * @see java.lang.Object#toString() * * @return a string representation of this module. */ public String toString () { final StringBuffer buffer = new StringBuffer(); buffer.append("SortModule: "); buffer.append(this.position); buffer.append(" "); buffer.append(this.state.getModule().getName()); buffer.append(" "); buffer.append(this.state.getModule().getModuleClass()); return buffer.toString(); }
ModuleInfo[] info = childMod.getRequiredModules(); for (int i = 0; i < info.length; i++) collector.add (dependentModule.getState().getModule().getSubSystem()); info = childMod.getOptionalModules(); for (int i = 0; i < info.length; i++) continue; collector.add (dependentModule.getSubSystem());
return true; if (module.getMajorVersion() == null) { Log.warn("Module " + module.getName() + " does not define a major version."); module.getMajorVersion()); if (compare > 0) { return false; return true; if (module.getMinorVersion() == null) { Log.warn("Module " + module.getName() + " does not define a minor version."); module.getMinorVersion()); if (compare > 0) { return false; return true; if (module.getPatchLevel() == null) { Log.debug("Module " + module.getName() + " does not define a patch level."); module.getPatchLevel()) > 0) { Log.debug("Did not accept patchlevel: " + moduleRequirement.getPatchLevel() + " - " + module.getPatchLevel()); return false;
Log.warn("Module " + module.getName() + ": required version: " + moduleInfo + ", but found Version: \n" + module); final PackageState state = new PackageState(module, PackageState.STATE_ERROR); if (moduleContained == RETURN_MODULE_ERROR) { Log.debug("Indicated failure for module: " + module.getModuleClass()); final PackageState state = new PackageState(module, PackageState.STATE_ERROR); dropFailedModule(state); final ModuleInfo[] required = module.getRequiredModules(); for (int i = 0; i < required.length; i++) { if (loadModule(required[i], incompleteModules, modules, true) == false) { Log.debug("Indicated failure for module: " + module.getModuleClass()); final PackageState state = new PackageState(module, PackageState.STATE_ERROR); dropFailedModule(state); final ModuleInfo[] optional = module.getOptionalModules(); for (int i = 0; i < optional.length; i++) { if (loadModule(optional[i], incompleteModules, modules, true) == false) {
/** * Compares this object with the given other object for equality. * @see java.lang.Object#equals(java.lang.Object) * * @param o the other object to be compared * @return true, if the other object is also a PackageState containing * the same module, false otherwise. */ public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof PackageState)) { return false; } final PackageState packageState = (PackageState) o; if (!this.module.getModuleClass().equals(packageState.module.getModuleClass())) { return false; } return true; }
/** * Initializes all previously uninitialized modules. Once a module is initialized, * it is not re-initialized a second time. */ public synchronized void initializeModules() { // sort by subsystems and dependency PackageSorter.sort(this.modules); for (int i = 0; i < this.modules.size(); i++) { final PackageState mod = (PackageState) this.modules.get(i); if (mod.configure(this.booter)) { Log.debug(new Log.SimpleMessage("Conf: ", new PadMessage(mod.getModule().getModuleClass(), 70), " [", mod.getModule().getSubSystem(), "]")); } } for (int i = 0; i < this.modules.size(); i++) { final PackageState mod = (PackageState) this.modules.get(i); if (mod.initialize(this.booter)) { Log.debug(new Log.SimpleMessage("Init: ", new PadMessage(mod.getModule().getModuleClass(), 70), " [", mod.getModule().getSubSystem(), "]")); } } }
this.module.initialize(subSystem); this.state = STATE_INITIALIZED; return true; this.module.getName(), ":", noClassDef.getMessage())); this.state = STATE_ERROR; Log.warn("Unable to initialize the module " + this.module.getName(), me); Log.warn("Unable to initialize the module " + this.module.getName()); Log.warn("Unable to initialize the module " + this.module.getName(), e); Log.warn("Unable to initialize the module " + this.module.getName());
ModuleInfo[] info = childMod.getRequiredModules(); for (int i = 0; i < info.length; i++) collector.add (dependentModule.getState().getModule().getSubSystem()); info = childMod.getOptionalModules(); for (int i = 0; i < info.length; i++) continue; collector.add (dependentModule.getSubSystem());
return true; if (module.getMajorVersion() == null) { Log.warn("Module " + module.getName() + " does not define a major version."); module.getMajorVersion()); if (compare > 0) { return false; return true; if (module.getMinorVersion() == null) { Log.warn("Module " + module.getName() + " does not define a minor version."); module.getMinorVersion()); if (compare > 0) { return false; return true; if (module.getPatchLevel() == null) { Log.debug("Module " + module.getName() + " does not define a patch level."); module.getPatchLevel()) > 0) { Log.debug("Did not accept patchlevel: " + moduleRequirement.getPatchLevel() + " - " + module.getPatchLevel()); return false;
Log.warn("Module " + module.getName() + ": required version: " + moduleInfo + ", but found Version: \n" + module); final PackageState state = new PackageState(module, PackageState.STATE_ERROR); if (moduleContained == RETURN_MODULE_ERROR) { Log.debug("Indicated failure for module: " + module.getModuleClass()); final PackageState state = new PackageState(module, PackageState.STATE_ERROR); dropFailedModule(state); final ModuleInfo[] required = module.getRequiredModules(); for (int i = 0; i < required.length; i++) { if (loadModule(required[i], incompleteModules, modules, true) == false) { Log.debug("Indicated failure for module: " + module.getModuleClass()); final PackageState state = new PackageState(module, PackageState.STATE_ERROR); dropFailedModule(state); final ModuleInfo[] optional = module.getOptionalModules(); for (int i = 0; i < optional.length; i++) { if (loadModule(optional[i], incompleteModules, modules, true) == false) {
/** * Compares this object with the given other object for equality. * @see java.lang.Object#equals(java.lang.Object) * * @param o the other object to be compared * @return true, if the other object is also a PackageState containing * the same module, false otherwise. */ public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof PackageState)) { return false; } final PackageState packageState = (PackageState) o; if (!this.module.getModuleClass().equals(packageState.module.getModuleClass())) { return false; } return true; }
/** * Returns a basic string representation of this SortModule. This * should be used for debugging purposes only. * @see java.lang.Object#toString() * * @return a string representation of this module. */ public String toString () { final StringBuffer buffer = new StringBuffer(); buffer.append("SortModule: "); buffer.append(this.position); buffer.append(" "); buffer.append(this.state.getModule().getName()); buffer.append(" "); buffer.append(this.state.getModule().getModuleClass()); return buffer.toString(); }
/** * Initializes all previously uninitialized modules. Once a module is initialized, * it is not re-initialized a second time. */ public synchronized void initializeModules() { // sort by subsystems and dependency PackageSorter.sort(this.modules); for (int i = 0; i < this.modules.size(); i++) { final PackageState mod = (PackageState) this.modules.get(i); if (mod.configure(this.booter)) { Log.debug(new Log.SimpleMessage("Conf: ", new PadMessage(mod.getModule().getModuleClass(), 70), " [", mod.getModule().getSubSystem(), "]")); } } for (int i = 0; i < this.modules.size(); i++) { final PackageState mod = (PackageState) this.modules.get(i); if (mod.initialize(this.booter)) { Log.debug(new Log.SimpleMessage("Init: ", new PadMessage(mod.getModule().getModuleClass(), 70), " [", mod.getModule().getSubSystem(), "]")); } } }
this.module.initialize(subSystem); this.state = STATE_INITIALIZED; return true; this.module.getName(), ":", noClassDef.getMessage())); this.state = STATE_ERROR; Log.warn("Unable to initialize the module " + this.module.getName(), me); Log.warn("Unable to initialize the module " + this.module.getName()); Log.warn("Unable to initialize the module " + this.module.getName(), e); Log.warn("Unable to initialize the module " + this.module.getName());
for (int i = 0; i < activeModules.size(); i++) { final Module mod = (Module) activeModules.get(i); p.print(new PadMessage(mod.getModuleClass(), 70)); p.print(" ["); p.print(mod.getSubSystem()); p.println("]"); p.print(" Version: "); p.print(mod.getMajorVersion()); p.print("-"); p.print(mod.getMinorVersion()); p.print("-"); p.print(mod.getPatchLevel()); p.print(" Producer: "); p.println(mod.getProducer()); p.print(" Description: "); p.println(mod.getDescription());
ModuleInfo[] info = childMod.getRequiredModules(); for (int i = 0; i < info.length; i++) collector.add (dependentModule.getState().getModule().getSubSystem()); info = childMod.getOptionalModules(); for (int i = 0; i < info.length; i++) continue; collector.add (dependentModule.getSubSystem());
return true; if (module.getMajorVersion() == null) { Log.warn("Module " + module.getName() + " does not define a major version."); module.getMajorVersion()); if (compare > 0) { return false; return true; if (module.getMinorVersion() == null) { Log.warn("Module " + module.getName() + " does not define a minor version."); module.getMinorVersion()); if (compare > 0) { return false; return true; if (module.getPatchLevel() == null) { Log.debug("Module " + module.getName() + " does not define a patch level."); module.getPatchLevel()) > 0) { Log.debug("Did not accept patchlevel: " + moduleRequirement.getPatchLevel() + " - " + module.getPatchLevel()); return false;