Package 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
Modifier and TypeMethodDescriptioncreateModule(Plugin plugin, Element module, ModuleDescriptorFactory moduleDescriptorFactory) If this loader is capable of loading a plugin of the type passed, attempt to create a module descriptor.booleanloadAllPlugins(ModuleDescriptorFactory moduleDescriptorFactory) Loads all plugins that can be installed in the plugin system.loadFoundPlugins(ModuleDescriptorFactory moduleDescriptorFactory) Load all newly found plugins that can be installed in the plugin system.voidremovePlugin(Plugin plugin) Remove a specific pluginbooleanboolean
-
Method Details
-
loadAllPlugins
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
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
Remove a specific plugin -
isDynamicPluginLoader
boolean isDynamicPluginLoader()- Returns:
trueif this plugin loader can load plugins dynamically- Since:
- 3.0
-
createModule
ModuleDescriptor<?> createModule(Plugin plugin, Element module, ModuleDescriptorFactory moduleDescriptorFactory) If this loader is capable of loading a plugin of the type passed, attempt to create a module descriptor. Add that module descriptor to the plugin.If capable, always return a ModuleDescriptor, even if it indicates a failure case. Caller is responsible for handling exceptional
ModuleDescriptor.- Parameters:
plugin- that the module will be added tomodule- to createmoduleDescriptorFactory- basic factory, may be overridden- Returns:
- null if incapable of creating
- Since:
- 7.5.0
-