@Override public boolean deletePluginPath(Path pluginPath) { for (PluginRepository repository : repositories) { if (repository.deletePluginPath(pluginPath)) { return true; } } return false; }
@Override public boolean deletePlugin(String pluginId) { checkPluginId(pluginId); PluginWrapper pluginWrapper = getPlugin(pluginId); PluginState pluginState = stopPlugin(pluginId); if (PluginState.STARTED == pluginState) { log.error("Failed to stop plugin '{}' on delete", pluginId); return false; } if (!unloadPlugin(pluginId)) { log.error("Failed to unload plugin '{}' on delete", pluginId); return false; } try { pluginWrapper.getPlugin().delete(); } catch (PluginException e) { log.error(e.getMessage(), e); return false; } Path pluginPath = pluginWrapper.getPluginPath(); return pluginRepository.deletePluginPath(pluginPath); }
@Override public boolean deletePluginPath(Path pluginPath) { for (PluginRepository repository : repositories) { if (repository.deletePluginPath(pluginPath)) { return true; } } return false; }
@Override public boolean deletePlugin(String pluginId) { checkPluginId(pluginId); PluginWrapper pluginWrapper = getPlugin(pluginId); PluginState pluginState = stopPlugin(pluginId); if (PluginState.STARTED == pluginState) { log.error("Failed to stop plugin '{}' on delete", pluginId); return false; } if (!unloadPlugin(pluginId)) { log.error("Failed to unload plugin '{}' on delete", pluginId); return false; } try { pluginWrapper.getPlugin().delete(); } catch (PluginException e) { log.error(e.getMessage(), e); return false; } Path pluginPath = pluginWrapper.getPluginPath(); return pluginRepository.deletePluginPath(pluginPath); }