|
||||||||||
| 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
| 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. |
java.util.List |
getEnabledModuleDescriptorsByClass(java.lang.Class descriptorClazz)
Get all enabled module descriptors that have a specific descriptor class. |
java.util.List |
getEnabledModuleDescriptorsByType(java.lang.String type)
Deprecated. since 0.17, use getModuleDescriptors(com.atlassian.plugin.predicate.ModuleDescriptorPredicate) with an appropriate predicate instead. |
java.util.List |
getEnabledModulesByClass(java.lang.Class moduleClass)
Retrieve all plugin modules that implement or extend a specific class. |
java.util.List |
getEnabledModulesByClassAndDescriptor(java.lang.Class[] descriptorClazz,
java.lang.Class moduleClass)
Deprecated. since 0.17, use getModules(com.atlassian.plugin.predicate.ModuleDescriptorPredicate) with an appropriate predicate instead. |
java.util.List |
getEnabledModulesByClassAndDescriptor(java.lang.Class descriptorClazz,
java.lang.Class 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 |
getEnabledPlugins()
Get all of the currently enabled plugins. |
java.util.Collection |
getModuleDescriptors(ModuleDescriptorPredicate moduleDescriptorPredicate)
Gets all module descriptors of installed modules that match the given predicate. |
java.util.Collection |
getModules(ModuleDescriptorPredicate 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) |
java.util.Collection |
getPlugins()
Gets all of the currently installed plugins. |
java.util.Collection |
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 getPlugins()
Plugins.java.util.Collection getPlugins(PluginPredicate pluginPredicate)
pluginPredicate - the PluginPredicate to match.
Plugins that match the given predicate.java.util.Collection getEnabledPlugins()
Plugins.java.util.Collection getModules(ModuleDescriptorPredicate moduleDescriptorPredicate)
moduleDescriptorPredicate - the ModuleDescriptorPredicate to match.
ModuleDescriptor.getModule() that match the given predicate.java.util.Collection getModuleDescriptors(ModuleDescriptorPredicate moduleDescriptorPredicate)
moduleDescriptorPredicate - the ModuleDescriptorPredicate to match.
ModuleDescriptors 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)java.util.List getEnabledModulesByClass(java.lang.Class moduleClass)
java.util.List getEnabledModulesByClassAndDescriptor(java.lang.Class[] descriptorClazz,
java.lang.Class moduleClass)
getModules(com.atlassian.plugin.predicate.ModuleDescriptorPredicate) with an appropriate predicate instead.
descriptorClazz - @NotNullmoduleClass - @NotNull
java.util.List getEnabledModulesByClassAndDescriptor(java.lang.Class descriptorClazz,
java.lang.Class moduleClass)
getModules(com.atlassian.plugin.predicate.ModuleDescriptorPredicate) with an appropriate predicate instead.
descriptorClazz - @NotNullmoduleClass - @NotNull
java.util.List getEnabledModuleDescriptorsByClass(java.lang.Class descriptorClazz)
ModuleDescriptors that implement or extend the given class.
java.util.List getEnabledModuleDescriptorsByType(java.lang.String type)
throws PluginParseException
getModuleDescriptors(com.atlassian.plugin.predicate.ModuleDescriptorPredicate) with an appropriate predicate instead.
ModuleDescriptors that are of a given type.
PluginParseExceptionjava.io.InputStream getDynamicResourceAsStream(java.lang.String resourcePath)
resourcePath - the path to the resource to retrieve
java.io.InputStream getPluginResourceAsStream(java.lang.String pluginKey,
java.lang.String resourcePath)
getPlugin(String).getClassLoader().getResourceAsStream(String)
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)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||