/** * Uninstall a module from the filesystem * * @param moduleName The name of the module * @return Promise of uninstallation */ @Override public Promise<Void> uninstallModule(String moduleName) { final Deferred<Void> d = when.defer(); manager.uninstallModule(moduleName, new Handler<AsyncResult<Void>>() { @Override public void handle(AsyncResult<Void> result) { if (result.succeeded()) { d.resolve(result.result()); } else { d.reject(result.cause()); } } }); return d.getPromise(); }
private void uninstallModule(String modName) { log.info("Attempting to uninstall module " + modName); createPM().uninstallModule(modName, createLoggingHandler("uninstalling module", unblockHandler())); block(); }