com.atlassian.plugin.loaders
Interface PluginLoader

All Known Subinterfaces:
DiscardablePluginLoader, DynamicPluginLoader
All Known Implementing Classes:
BundledPluginLoader, ClassPathPluginLoader, DirectoryPluginLoader, ForwardingPluginLoader, PermissionCheckingPluginLoader, RosterFilePluginLoader, ScanningPluginLoader, SinglePluginLoader

public interface PluginLoader

Handles loading and unloading plugin artifacts from a location


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()
           
 

Method Detail

loadAllPlugins

Iterable<Plugin> loadAllPlugins(ModuleDescriptorFactory moduleDescriptorFactory)
                                throws PluginParseException
Loads all plugins that can be installed in the plugin system.

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

loadFoundPlugins

Iterable<Plugin> loadFoundPlugins(ModuleDescriptorFactory moduleDescriptorFactory)
                                  throws PluginParseException
Load all newly found plugins that can be installed in the plugin system. Only plugins not previously loaded will be added.

Parameters:
moduleDescriptorFactory - the factory for module descriptors
Returns:
a list of newly discovered plugins since the last time plugins were loaded
Throws:
PluginParseException - if any error occurred loading plugins

supportsAddition

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

supportsRemoval

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

removePlugin

void removePlugin(Plugin plugin)
                  throws PluginException
Remove a specific plugin

Throws:
PluginException

isDynamicPluginLoader

boolean isDynamicPluginLoader()
Returns:
true if this plugin loader can load plugins dynamically
Since:
3.0


Copyright © 2015 Atlassian. All rights reserved.