com.atlassian.plugin.loaders
Class ClassPathPluginLoader

java.lang.Object
  extended by com.atlassian.plugin.loaders.ClassPathPluginLoader
All Implemented Interfaces:
PluginLoader

public class ClassPathPluginLoader
extends Object
implements PluginLoader

Loads plugins from the classpath


Constructor Summary
ClassPathPluginLoader()
           
ClassPathPluginLoader(String fileNameToLoad)
           
 
Method Summary
 boolean isDynamicPluginLoader()
           
 Iterable<Plugin> loadAllPlugins(ModuleDescriptorFactory moduleDescriptorFactory)
          Loads all plugins that can be installed in the plugin system.
 Iterable<Plugin> loadFoundPlugins(ModuleDescriptorFactory moduleDescriptorFactory)
          Load all newly found plugins that can be installed in the plugin system.
 void removePlugin(Plugin plugin)
          Remove a specific plugin
 boolean supportsAddition()
           
 boolean supportsRemoval()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassPathPluginLoader

public ClassPathPluginLoader()

ClassPathPluginLoader

public ClassPathPluginLoader(String fileNameToLoad)
Method Detail

loadAllPlugins

public Iterable<Plugin> loadAllPlugins(ModuleDescriptorFactory moduleDescriptorFactory)
                                throws PluginParseException
Description copied from interface: PluginLoader
Loads all plugins that can be installed in the plugin system.

Specified by:
loadAllPlugins in interface PluginLoader
Parameters:
moduleDescriptorFactory - the factory for module descriptors
Returns:
the list of found plugins, may be empty
Throws:
PluginParseException - if any error occurred loading plugins

supportsRemoval

public boolean supportsRemoval()
Specified by:
supportsRemoval in interface PluginLoader
Returns:
true if this PluginLoader tracks whether or not plugins are removed from it.

supportsAddition

public boolean supportsAddition()
Specified by:
supportsAddition in interface PluginLoader
Returns:
true if this PluginLoader tracks whether or not plugins are added to it.

isDynamicPluginLoader

public boolean isDynamicPluginLoader()
Specified by:
isDynamicPluginLoader in interface PluginLoader
Returns:
true if this plugin loader can load plugins dynamically

loadFoundPlugins

public Iterable<Plugin> loadFoundPlugins(ModuleDescriptorFactory moduleDescriptorFactory)
Description copied from interface: PluginLoader
Load all newly found plugins that can be installed in the plugin system. Only plugins not previously loaded will be added.

Specified by:
loadFoundPlugins in interface PluginLoader
Parameters:
moduleDescriptorFactory - the factory for module descriptors
Returns:
a list of newly discovered plugins since the last time plugins were loaded

removePlugin

public void removePlugin(Plugin plugin)
                  throws PluginException
Description copied from interface: PluginLoader
Remove a specific plugin

Specified by:
removePlugin in interface PluginLoader
Throws:
PluginException


Copyright © 2014 Atlassian. All rights reserved.