|
|
@ -113,9 +113,6 @@ public class DefaultPluginManager implements PluginManager { |
|
|
|
System.setProperty("pf4j.pluginsDir", pluginsDirectory.getAbsolutePath()); |
|
|
|
System.setProperty("pf4j.pluginsDir", pluginsDirectory.getAbsolutePath()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Retrieves all active plugins. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public List<PluginWrapper> getPlugins() { |
|
|
|
public List<PluginWrapper> getPlugins() { |
|
|
|
return new ArrayList<PluginWrapper>(plugins.values()); |
|
|
|
return new ArrayList<PluginWrapper>(plugins.values()); |
|
|
|
} |
|
|
|
} |
|
|
@ -144,7 +141,6 @@ public class DefaultPluginManager implements PluginManager { |
|
|
|
* Start all active plugins. |
|
|
|
* Start all active plugins. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void startPlugins() { |
|
|
|
public void startPlugins() { |
|
|
|
List<PluginWrapper> resolvedPlugins = getResolvedPlugins(); |
|
|
|
|
|
|
|
for (PluginWrapper pluginWrapper : resolvedPlugins) { |
|
|
|
for (PluginWrapper pluginWrapper : resolvedPlugins) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
LOG.info("Start plugin '" + pluginWrapper.getDescriptor().getPluginId() + "'"); |
|
|
|
LOG.info("Start plugin '" + pluginWrapper.getDescriptor().getPluginId() + "'"); |
|
|
@ -160,8 +156,7 @@ public class DefaultPluginManager implements PluginManager { |
|
|
|
* Stop all active plugins. |
|
|
|
* Stop all active plugins. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void stopPlugins() { |
|
|
|
public void stopPlugins() { |
|
|
|
List<PluginWrapper> resolvedPlugins = getResolvedPlugins(); |
|
|
|
for (PluginWrapper pluginWrapper : startedPlugins) { |
|
|
|
for (PluginWrapper pluginWrapper : resolvedPlugins) { |
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
LOG.info("Stop plugin '" + pluginWrapper.getDescriptor().getPluginId() + "'"); |
|
|
|
LOG.info("Stop plugin '" + pluginWrapper.getDescriptor().getPluginId() + "'"); |
|
|
|
pluginWrapper.getPlugin().stop(); |
|
|
|
pluginWrapper.getPlugin().stop(); |
|
|
|