|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.plugin.manager.EnabledModuleCachingPluginAccessor
public final class EnabledModuleCachingPluginAccessor
A caching decorator which caches getEnabledModuleDescriptorsByClass(Class) on PluginAccessor interface.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.atlassian.plugin.PluginAccessor |
|---|
PluginAccessor.Descriptor |
| Field Summary | |
|---|---|
protected PluginAccessor |
delegate
|
| Constructor Summary | |
|---|---|
EnabledModuleCachingPluginAccessor(PluginAccessor delegate,
PluginEventManager pluginEventManager)
|
|
| Method Summary | ||
|---|---|---|
ClassLoader |
getClassLoader()
Retrieve the class loader responsible for loading classes and resources from plugins. |
|
Class<?> |
getDynamicPluginClass(String className)
Deprecated. |
|
InputStream |
getDynamicResourceAsStream(String resourcePath)
Retrieve a resource from a currently loaded (and active) dynamically loaded plugin. |
|
|
getEnabledModuleDescriptorsByClass(Class<D> descriptorClazz)
Get all enabled module descriptors that have a specific descriptor class. |
|
|
getEnabledModuleDescriptorsByClass(Class<D> descriptorClazz,
boolean verbose)
Deprecated. |
|
|
getEnabledModuleDescriptorsByType(String type)
Deprecated. |
|
|
getEnabledModulesByClass(Class<M> moduleClass)
Retrieve all plugin modules that implement or extend a specific class. |
|
|
getEnabledModulesByClassAndDescriptor(Class<ModuleDescriptor<M>>[] descriptorClazz,
Class<M> moduleClass)
Deprecated. |
|
|
getEnabledModulesByClassAndDescriptor(Class<ModuleDescriptor<M>> descriptorClass,
Class<M> moduleClass)
Deprecated. |
|
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. |
|
|
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(String key)
Retrieve a given plugin (whether enabled or not). |
|
ModuleDescriptor<?> |
getPluginModule(String completeKey)
Retrieve any plugin module by complete module key. |
|
InputStream |
getPluginResourceAsStream(String pluginKey,
String resourcePath)
Deprecated. |
|
PluginRestartState |
getPluginRestartState(String key)
Gets the state of the plugin upon restart. |
|
Collection<Plugin> |
getPlugins()
Gets all of the currently installed plugins. |
|
Collection<Plugin> |
getPlugins(PluginPredicate 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)
|
|
void |
onPluginDisable(PluginDisabledEvent event)
Clears the enabled module cache when any plugin is disabled. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final PluginAccessor delegate
| Constructor Detail |
|---|
public EnabledModuleCachingPluginAccessor(PluginAccessor delegate,
PluginEventManager pluginEventManager)
| Method Detail |
|---|
public <D extends ModuleDescriptor<?>> List<D> getEnabledModuleDescriptorsByClass(Class<D> descriptorClazz)
PluginAccessor
getEnabledModuleDescriptorsByClass in interface PluginAccessordescriptorClazz - module descriptor class
ModuleDescriptors that implement or extend the given class.public void onPluginDisable(PluginDisabledEvent event)
event - The plugin disabled eventpublic ClassLoader getClassLoader()
PluginAccessor
getClassLoader in interface PluginAccessorpublic InputStream getDynamicResourceAsStream(String resourcePath)
PluginAccessor
getDynamicResourceAsStream in interface PluginAccessorresourcePath - the path to the resource to retrieve
public <M> List<M> getEnabledModulesByClass(Class<M> moduleClass)
PluginAccessor
getEnabledModulesByClass in interface PluginAccessor
public Plugin getEnabledPlugin(String pluginKey)
throws IllegalArgumentException
PluginAccessor
getEnabledPlugin in interface PluginAccessorIllegalArgumentException - If the plugin key is nullpublic ModuleDescriptor<?> getEnabledPluginModule(String completeKey)
PluginAccessor
getEnabledPluginModule in interface PluginAccessorpublic Collection<Plugin> getEnabledPlugins()
PluginAccessor
getEnabledPlugins in interface PluginAccessorPlugins.public <M> Collection<ModuleDescriptor<M>> getModuleDescriptors(ModuleDescriptorPredicate<M> moduleDescriptorPredicate)
PluginAccessor
getModuleDescriptors in interface PluginAccessormoduleDescriptorPredicate - the ModuleDescriptorPredicate to match.
ModuleDescriptors that match the given predicate.public <M> Collection<M> getModules(ModuleDescriptorPredicate<M> moduleDescriptorPredicate)
PluginAccessor
getModules in interface PluginAccessormoduleDescriptorPredicate - the ModuleDescriptorPredicate to match.
ModuleDescriptor.getModule() that match the given predicate.
public Plugin getPlugin(String key)
throws IllegalArgumentException
PluginAccessor
getPlugin in interface PluginAccessorkey - The plugin key. Cannot be null.
IllegalArgumentException - If the plugin key is nullpublic ModuleDescriptor<?> getPluginModule(String completeKey)
PluginAccessorNote: the module may or may not be disabled.
getPluginModule in interface PluginAccessorpublic PluginRestartState getPluginRestartState(String key)
PluginAccessor
getPluginRestartState in interface PluginAccessorkey - The plugin key
public Collection<Plugin> getPlugins()
PluginAccessor
getPlugins in interface PluginAccessorPlugins.public Collection<Plugin> getPlugins(PluginPredicate pluginPredicate)
PluginAccessor
getPlugins in interface PluginAccessorpluginPredicate - the PluginPredicate to match.
Plugins that match the given predicate.
public boolean isPluginEnabled(String key)
throws IllegalArgumentException
PluginAccessor
isPluginEnabled in interface PluginAccessorIllegalArgumentException - If the plugin key is nullpublic boolean isPluginModuleEnabled(String completeKey)
PluginAccessor
isPluginModuleEnabled in interface PluginAccessorPluginAccessor.isPluginEnabled(String)public boolean isSystemPlugin(String key)
isSystemPlugin in interface PluginAccessor
@Deprecated
public Class<?> getDynamicPluginClass(String className)
throws ClassNotFoundException
PluginAccessor
getDynamicPluginClass in interface PluginAccessorclassName - the name of the class to retrieve
ClassNotFoundException - thrown if no classes by that name could be found in any of the enabled dynamic plugins
@Deprecated
public <D extends ModuleDescriptor<?>> List<D> getEnabledModuleDescriptorsByClass(Class<D> descriptorClazz,
boolean verbose)
PluginAccessor
getEnabledModuleDescriptorsByClass in interface PluginAccessordescriptorClazz - module descriptor classverbose - log verbose messages flag
ModuleDescriptors that implement or extend the given class.
@Deprecated
public <M> List<ModuleDescriptor<M>> getEnabledModuleDescriptorsByType(String type)
throws PluginParseException
PluginAccessor
getEnabledModuleDescriptorsByType in interface PluginAccessorModuleDescriptors that are of a given type.
PluginParseException
@Deprecated
public <M> List<M> getEnabledModulesByClassAndDescriptor(Class<ModuleDescriptor<M>> descriptorClass,
Class<M> moduleClass)
PluginAccessor
getEnabledModulesByClassAndDescriptor in interface PluginAccessordescriptorClass - @NotNullmoduleClass - @NotNull
@Deprecated
public <M> List<M> getEnabledModulesByClassAndDescriptor(Class<ModuleDescriptor<M>>[] descriptorClazz,
Class<M> moduleClass)
PluginAccessor
getEnabledModulesByClassAndDescriptor in interface PluginAccessordescriptorClazz - @NotNullmoduleClass - @NotNull
@Deprecated
public InputStream getPluginResourceAsStream(String pluginKey,
String resourcePath)
PluginAccessor
getPluginResourceAsStream in interface PluginAccessor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||