|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PluginAccessor
Allows access to the current plugin system state
Nested Class Summary | |
---|---|
static class |
PluginAccessor.Descriptor
The plugin descriptor file. |
Method Summary | ||
---|---|---|
java.lang.ClassLoader |
getClassLoader()
Retrieve the class loader responsible for loading classes and resources from plugins. |
|
java.lang.Class<?> |
getDynamicPluginClass(java.lang.String className)
Deprecated. since 0.21 this method is not used, use getPlugin(String) .getClassLoader() .loadClass(String) |
|
java.io.InputStream |
getDynamicResourceAsStream(java.lang.String resourcePath)
Retrieve a resource from a currently loaded (and active) dynamically loaded plugin. |
|
|
getEnabledModuleDescriptorsByClass(java.lang.Class<D> descriptorClazz)
Get all enabled module descriptors that have a specific descriptor class. |
|
|
getEnabledModuleDescriptorsByClass(java.lang.Class<D> descriptorClazz,
boolean verbose)
Get all enabled module descriptors that have a specific descriptor class. |
|
|
getEnabledModuleDescriptorsByType(java.lang.String type)
Deprecated. since 0.17, use getModuleDescriptors(com.atlassian.plugin.predicate.ModuleDescriptorPredicate) with an appropriate predicate instead. |
|
|
getEnabledModulesByClass(java.lang.Class<M> moduleClass)
Retrieve all plugin modules that implement or extend a specific class. |
|
|
getEnabledModulesByClassAndDescriptor(java.lang.Class<ModuleDescriptor<M>>[] descriptorClazz,
java.lang.Class<M> moduleClass)
Deprecated. since 0.17, use getModules(com.atlassian.plugin.predicate.ModuleDescriptorPredicate) with an appropriate predicate instead. |
|
|
getEnabledModulesByClassAndDescriptor(java.lang.Class<ModuleDescriptor<M>> descriptorClass,
java.lang.Class<M> moduleClass)
Deprecated. since 0.17, use getModules(com.atlassian.plugin.predicate.ModuleDescriptorPredicate) with an appropriate predicate instead. |
|
Plugin |
getEnabledPlugin(java.lang.String pluginKey)
Retrieve a given plugin if it is enabled. |
|
ModuleDescriptor<?> |
getEnabledPluginModule(java.lang.String completeKey)
Retrieve an enabled plugin module by complete module key. |
|
java.util.Collection<Plugin> |
getEnabledPlugins()
Get all of the currently enabled plugins. |
|
|
getModuleDescriptors(ModuleDescriptorPredicate<M> moduleDescriptorPredicate)
Gets all module descriptors of installed modules that match the given predicate. |
|
|
getModules(ModuleDescriptorPredicate<M> moduleDescriptorPredicate)
Gets all installed modules that match the given predicate. |
|
Plugin |
getPlugin(java.lang.String key)
Retrieve a given plugin (whether enabled or not). |
|
ModuleDescriptor<?> |
getPluginModule(java.lang.String completeKey)
Retrieve any plugin module by complete module key. |
|
java.io.InputStream |
getPluginResourceAsStream(java.lang.String pluginKey,
java.lang.String resourcePath)
Deprecated. since 0.21 this method is not used, use getPlugin(String) .getClassLoader() .getResourceAsStream(String) |
|
PluginRestartState |
getPluginRestartState(java.lang.String key)
Gets the state of the plugin upon restart. |
|
java.util.Collection<Plugin> |
getPlugins()
Gets all of the currently installed plugins. |
|
java.util.Collection<Plugin> |
getPlugins(PluginPredicate pluginPredicate)
Gets all installed plugins that match the given predicate. |
|
boolean |
isPluginEnabled(java.lang.String key)
Whether or not a given plugin is currently enabled. |
|
boolean |
isPluginModuleEnabled(java.lang.String completeKey)
Whether or not a given plugin module is currently enabled. |
|
boolean |
isSystemPlugin(java.lang.String key)
|
Method Detail |
---|
java.util.Collection<Plugin> getPlugins()
Plugin
s.java.util.Collection<Plugin> getPlugins(PluginPredicate pluginPredicate)
pluginPredicate
- the PluginPredicate
to match.
Plugin
s that match the given predicate.java.util.Collection<Plugin> getEnabledPlugins()
Plugin
s.<M> java.util.Collection<M> getModules(ModuleDescriptorPredicate<M> moduleDescriptorPredicate)
moduleDescriptorPredicate
- the ModuleDescriptorPredicate
to match.
ModuleDescriptor.getModule()
that match the given predicate.<M> java.util.Collection<ModuleDescriptor<M>> getModuleDescriptors(ModuleDescriptorPredicate<M> moduleDescriptorPredicate)
moduleDescriptorPredicate
- the ModuleDescriptorPredicate
to match.
ModuleDescriptor
s that match the given predicate.Plugin getPlugin(java.lang.String key)
Plugin getEnabledPlugin(java.lang.String pluginKey)
ModuleDescriptor<?> getPluginModule(java.lang.String completeKey)
Note: the module may or may not be disabled.
ModuleDescriptor<?> getEnabledPluginModule(java.lang.String completeKey)
boolean isPluginEnabled(java.lang.String key)
boolean isPluginModuleEnabled(java.lang.String completeKey)
isPluginEnabled(String)
<M> java.util.List<M> getEnabledModulesByClass(java.lang.Class<M> moduleClass)
@Deprecated <M> java.util.List<M> getEnabledModulesByClassAndDescriptor(java.lang.Class<ModuleDescriptor<M>>[] descriptorClazz, java.lang.Class<M> moduleClass)
getModules(com.atlassian.plugin.predicate.ModuleDescriptorPredicate)
with an appropriate predicate instead.
descriptorClazz
- @NotNullmoduleClass
- @NotNull
@Deprecated <M> java.util.List<M> getEnabledModulesByClassAndDescriptor(java.lang.Class<ModuleDescriptor<M>> descriptorClass, java.lang.Class<M> moduleClass)
getModules(com.atlassian.plugin.predicate.ModuleDescriptorPredicate)
with an appropriate predicate instead.
descriptorClass
- @NotNullmoduleClass
- @NotNull
<D extends ModuleDescriptor<?>> java.util.List<D> getEnabledModuleDescriptorsByClass(java.lang.Class<D> descriptorClazz)
descriptorClazz
- module descriptor class
ModuleDescriptor
s that implement or extend the given class.<D extends ModuleDescriptor<?>> java.util.List<D> getEnabledModuleDescriptorsByClass(java.lang.Class<D> descriptorClazz, boolean verbose)
descriptorClazz
- module descriptor classverbose
- log verbose messages flag
ModuleDescriptor
s that implement or extend the given class.@Deprecated <M> java.util.List<ModuleDescriptor<M>> getEnabledModuleDescriptorsByType(java.lang.String type) throws PluginParseException
getModuleDescriptors(com.atlassian.plugin.predicate.ModuleDescriptorPredicate)
with an appropriate predicate instead.
ModuleDescriptor
s that are of a given type.
PluginParseException
java.io.InputStream getDynamicResourceAsStream(java.lang.String resourcePath)
resourcePath
- the path to the resource to retrieve
@Deprecated java.io.InputStream getPluginResourceAsStream(java.lang.String pluginKey, java.lang.String resourcePath)
getPlugin(String)
.getClassLoader()
.getResourceAsStream(String)
@Deprecated java.lang.Class<?> getDynamicPluginClass(java.lang.String className) throws java.lang.ClassNotFoundException
getPlugin(String)
.getClassLoader()
.loadClass(String)
className
- the name of the class to retrieve
java.lang.ClassNotFoundException
- thrown if no classes by that name could be found in any of the enabled dynamic pluginsjava.lang.ClassLoader getClassLoader()
boolean isSystemPlugin(java.lang.String key)
PluginRestartState getPluginRestartState(java.lang.String key)
key
- The plugin key
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |