public interface PluginAccessor
| Modifier and Type | Interface and Description |
|---|---|
static class |
PluginAccessor.Descriptor
The plugin descriptor file.
|
| Modifier and Type | Method and Description |
|---|---|
default <D extends ModuleDescriptor<?>> |
getActiveModuleDescriptorsByClass(Class<D> descriptorClazz)
Deprecated.
in 5.0 for removal in 6.0 when
ScopeManager is removed. Use
getEnabledModuleDescriptorsByClass(Class) instead. |
ClassLoader |
getClassLoader()
Retrieve the class loader responsible for loading classes and resources from plugins.
|
Iterable<ModuleDescriptor<?>> |
getDynamicModules(Plugin plugin)
Retrieve all currently registered dynamic modules i.e.
|
InputStream |
getDynamicResourceAsStream(String resourcePath)
Retrieve a resource from a currently loaded (and active) dynamically loaded plugin.
|
<D extends ModuleDescriptor<?>> |
getEnabledModuleDescriptorsByClass(Class<D> descriptorClazz)
Get all enabled module descriptors that have a specific descriptor class.
|
<M> List<M> |
getEnabledModulesByClass(Class<M> moduleClass)
Retrieve all plugin modules that implement or extend a specific class.
|
Plugin |
getEnabledPlugin(String pluginKey)
Retrieve a given plugin if it is enabled.
|
ModuleDescriptor<?> |
getEnabledPluginModule(String completeKey)
Retrieve an enabled plugin module by complete module key.
|
Collection<Plugin> |
getEnabledPlugins()
Get all of the currently enabled plugins.
|
default <M> Collection<ModuleDescriptor<M>> |
getModuleDescriptors(ModuleDescriptorPredicate<M> moduleDescriptorPredicate)
Deprecated.
in 5.0 for removal in 6.0. Use
getModuleDescriptors(Predicate) instead. |
<M> Collection<ModuleDescriptor<M>> |
getModuleDescriptors(Predicate<ModuleDescriptor<M>> moduleDescriptorPredicate)
Gets all module descriptors of installed modules that match the given predicate.
|
default <M> Collection<M> |
getModules(ModuleDescriptorPredicate<M> moduleDescriptorPredicate)
Deprecated.
in 5.0 for removal in 6.0. Use
getModules(Predicate) instead. |
<M> Collection<M> |
getModules(Predicate<ModuleDescriptor<M>> moduleDescriptorPredicate)
Gets all installed modules that match the given predicate.
|
Plugin |
getPlugin(String key)
Retrieve a given plugin (whether enabled or not).
|
ModuleDescriptor<?> |
getPluginModule(String completeKey)
Retrieve any plugin module by complete module key.
|
PluginRestartState |
getPluginRestartState(String key)
Gets the state of the plugin upon restart.
|
Collection<Plugin> |
getPlugins()
Gets all of the currently installed plugins.
|
default Collection<Plugin> |
getPlugins(PluginPredicate pluginPredicate)
Deprecated.
in 5.0 for removal in 6.0, use
getPlugins(Predicate) instead |
Collection<Plugin> |
getPlugins(Predicate<Plugin> pluginPredicate)
Gets all installed plugins that match the given predicate.
|
boolean |
isPluginEnabled(String key)
Whether or not a given plugin is currently enabled.
|
boolean |
isPluginModuleEnabled(String completeKey)
Whether or not a given plugin module is currently enabled.
|
boolean |
isSystemPlugin(String key) |
Collection<Plugin> getPlugins()
Plugins.@Deprecated default Collection<Plugin> getPlugins(PluginPredicate pluginPredicate)
getPlugins(Predicate) insteadpluginPredicate - the PluginPredicate to match.Plugins that match the given predicate.Collection<Plugin> getPlugins(Predicate<Plugin> pluginPredicate)
Collection<Plugin> getEnabledPlugins()
Plugins.@Deprecated default <M> Collection<M> getModules(ModuleDescriptorPredicate<M> moduleDescriptorPredicate)
getModules(Predicate) instead.moduleDescriptorPredicate - the ModuleDescriptorPredicate to match.ModuleDescriptor.getModule() that match the given predicate.@Deprecated default <M> Collection<ModuleDescriptor<M>> getModuleDescriptors(ModuleDescriptorPredicate<M> moduleDescriptorPredicate)
getModuleDescriptors(Predicate) instead.moduleDescriptorPredicate - the ModuleDescriptorPredicate to match.ModuleDescriptors that match the given predicate.<M> Collection<M> getModules(Predicate<ModuleDescriptor<M>> moduleDescriptorPredicate)
moduleDescriptorPredicate - describes which modules to matchModuleDescriptor.getModule() that match the given predicate.<M> Collection<ModuleDescriptor<M>> getModuleDescriptors(Predicate<ModuleDescriptor<M>> moduleDescriptorPredicate)
moduleDescriptorPredicate - describes which modules to matchModuleDescriptors that match the given predicate.Plugin getPlugin(String key) throws IllegalArgumentException
key - The plugin key. Cannot be null.IllegalArgumentException - If the plugin key is nullPlugin getEnabledPlugin(String pluginKey) throws IllegalArgumentException
IllegalArgumentException - If the plugin key is nullModuleDescriptor<?> getPluginModule(String completeKey)
Note: the module may or may not be disabled.
ModuleDescriptor<?> getEnabledPluginModule(String completeKey)
boolean isPluginEnabled(String key) throws IllegalArgumentException
IllegalArgumentException - If the plugin key is nullboolean isPluginModuleEnabled(String completeKey)
isPluginEnabled(String)<M> List<M> getEnabledModulesByClass(Class<M> moduleClass)
<D extends ModuleDescriptor<?>> List<D> getEnabledModuleDescriptorsByClass(Class<D> descriptorClazz)
descriptorClazz - module descriptor classModuleDescriptors that implement or extend the given class.@Deprecated default <D extends ModuleDescriptor<?>> List<D> getActiveModuleDescriptorsByClass(Class<D> descriptorClazz)
ScopeManager is removed. Use
getEnabledModuleDescriptorsByClass(Class) instead.Result of this method should not be cached across requests.
descriptorClazz - module descriptor classModuleDescriptors that implement or extend the given class and active for the current request.ScopeManagerInputStream getDynamicResourceAsStream(String resourcePath)
resourcePath - the path to the resource to retrieveClassLoader getClassLoader()
boolean isSystemPlugin(String key)
PluginRestartState getPluginRestartState(String key)
key - The plugin keyIterable<ModuleDescriptor<?>> getDynamicModules(Plugin plugin)
plugin via
PluginController.addDynamicModule(Plugin, org.dom4j.Element) during the lifetime of
this plugin, but not removed via PluginController.removeDynamicModule(Plugin, ModuleDescriptor).plugin - to queryPluginController.addDynamicModule(Plugin, org.dom4j.Element),
PluginController.removeDynamicModule(Plugin, ModuleDescriptor)Copyright © 2019 Atlassian. All rights reserved.