com.atlassian.confluence.plugin.cached
Class EnabledModuleCachingPluginAccessor
java.lang.Object
com.atlassian.confluence.plugin.cached.EnabledModuleCachingPluginAccessor
- All Implemented Interfaces:
- com.atlassian.plugin.PluginAccessor
public final class EnabledModuleCachingPluginAccessor
- extends java.lang.Object
- implements com.atlassian.plugin.PluginAccessor
A caching decorator which caches getEnabledModuleDescriptorsByClass(Class)
on PluginAccessor
interface.
Backported from plugins 2.7.0.
Nested classes/interfaces inherited from interface com.atlassian.plugin.PluginAccessor |
com.atlassian.plugin.PluginAccessor.Descriptor |
Field Summary |
protected com.atlassian.plugin.PluginAccessor |
delegate
|
Method Summary |
static
<M,T extends com.atlassian.plugin.ModuleDescriptor<M>>
com.atlassian.plugin.tracker.PluginModuleTracker<M,T> |
|
create(com.atlassian.plugin.PluginAccessor pluginAccessor,
com.atlassian.plugin.event.PluginEventManager pluginEventManager,
java.lang.Class<? extends com.atlassian.plugin.ModuleDescriptor<?>> moduleDescriptorClass)
Static factory method for constructing trackers generically where M is not known. |
java.lang.ClassLoader |
getClassLoader()
|
java.lang.Class<?> |
getDynamicPluginClass(java.lang.String className)
|
java.io.InputStream |
getDynamicResourceAsStream(java.lang.String resourcePath)
|
<D extends com.atlassian.plugin.ModuleDescriptor<?>>
java.util.List<D> |
|
getEnabledModuleDescriptorsByClass(java.lang.Class<D> descriptorClazz)
|
<D extends com.atlassian.plugin.ModuleDescriptor<?>>
java.util.List<D> |
|
getEnabledModuleDescriptorsByClass(java.lang.Class<D> descriptorClazz,
boolean verbose)
|
<M> java.util.List<com.atlassian.plugin.ModuleDescriptor<M>> |
|
getEnabledModuleDescriptorsByType(java.lang.String type)
|
|
getEnabledModulesByClass(java.lang.Class<M> moduleClass)
|
|
getEnabledModulesByClassAndDescriptor(java.lang.Class<com.atlassian.plugin.ModuleDescriptor<M>>[] descriptorClazz,
java.lang.Class<M> moduleClass)
|
|
getEnabledModulesByClassAndDescriptor(java.lang.Class<com.atlassian.plugin.ModuleDescriptor<M>> descriptorClass,
java.lang.Class<M> moduleClass)
|
com.atlassian.plugin.Plugin |
getEnabledPlugin(java.lang.String pluginKey)
|
com.atlassian.plugin.ModuleDescriptor<?> |
getEnabledPluginModule(java.lang.String completeKey)
|
java.util.Collection<com.atlassian.plugin.Plugin> |
getEnabledPlugins()
|
<M> java.util.Collection<com.atlassian.plugin.ModuleDescriptor<M>> |
|
getModuleDescriptors(com.atlassian.plugin.predicate.ModuleDescriptorPredicate<M> moduleDescriptorPredicate)
|
<M> java.util.Collection<M> |
|
getModules(com.atlassian.plugin.predicate.ModuleDescriptorPredicate<M> moduleDescriptorPredicate)
|
com.atlassian.plugin.Plugin |
getPlugin(java.lang.String key)
|
com.atlassian.plugin.ModuleDescriptor<?> |
getPluginModule(java.lang.String completeKey)
|
java.io.InputStream |
getPluginResourceAsStream(java.lang.String pluginKey,
java.lang.String resourcePath)
|
com.atlassian.plugin.PluginRestartState |
getPluginRestartState(java.lang.String key)
|
java.util.Collection<com.atlassian.plugin.Plugin> |
getPlugins()
|
java.util.Collection<com.atlassian.plugin.Plugin> |
getPlugins(com.atlassian.plugin.predicate.PluginPredicate pluginPredicate)
|
boolean |
isPluginEnabled(java.lang.String key)
|
boolean |
isPluginModuleEnabled(java.lang.String completeKey)
|
boolean |
isSystemPlugin(java.lang.String key)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.atlassian.plugin.PluginAccessor |
getClassLoader, getDynamicPluginClass, getDynamicResourceAsStream, getEnabledModuleDescriptorsByClass, getEnabledModuleDescriptorsByType, getEnabledModulesByClass, getEnabledModulesByClassAndDescriptor, getEnabledModulesByClassAndDescriptor, getEnabledPlugin, getEnabledPluginModule, getEnabledPlugins, getModuleDescriptors, getModules, getPlugin, getPluginModule, getPluginResourceAsStream, getPluginRestartState, getPlugins, getPlugins, isPluginEnabled, isPluginModuleEnabled, isSystemPlugin |
delegate
protected final com.atlassian.plugin.PluginAccessor delegate
EnabledModuleCachingPluginAccessor
public EnabledModuleCachingPluginAccessor(com.atlassian.plugin.PluginAccessor delegate,
com.atlassian.plugin.event.PluginEventManager pluginEventManager)
getEnabledModuleDescriptorsByClass
public <D extends com.atlassian.plugin.ModuleDescriptor<?>> java.util.List<D> getEnabledModuleDescriptorsByClass(java.lang.Class<D> descriptorClazz)
- Specified by:
getEnabledModuleDescriptorsByClass
in interface com.atlassian.plugin.PluginAccessor
create
public static <M,T extends com.atlassian.plugin.ModuleDescriptor<M>> com.atlassian.plugin.tracker.PluginModuleTracker<M,T> create(com.atlassian.plugin.PluginAccessor pluginAccessor,
com.atlassian.plugin.event.PluginEventManager pluginEventManager,
java.lang.Class<? extends com.atlassian.plugin.ModuleDescriptor<?>> moduleDescriptorClass)
- Static factory method for constructing trackers generically where M is not known.
- Type Parameters:
M
- The module class, generically inferred.T
- The module descriptor class.- Parameters:
pluginAccessor
- For getting the enabled descriptors of a certain type.pluginEventManager
- For being told about changes to the enabled plugins.moduleDescriptorClass
- The type of module descriptors we are interested in.
- Returns:
- a PluginModuleTracker useful for fast and up to date caching of the currently enabled module descriptors.
- Since:
- 2.7.0
getClassLoader
public java.lang.ClassLoader getClassLoader()
- Specified by:
getClassLoader
in interface com.atlassian.plugin.PluginAccessor
getDynamicResourceAsStream
public java.io.InputStream getDynamicResourceAsStream(java.lang.String resourcePath)
- Specified by:
getDynamicResourceAsStream
in interface com.atlassian.plugin.PluginAccessor
getEnabledModulesByClass
public <M> java.util.List<M> getEnabledModulesByClass(java.lang.Class<M> moduleClass)
- Specified by:
getEnabledModulesByClass
in interface com.atlassian.plugin.PluginAccessor
getEnabledPlugin
public com.atlassian.plugin.Plugin getEnabledPlugin(java.lang.String pluginKey)
throws java.lang.IllegalArgumentException
- Specified by:
getEnabledPlugin
in interface com.atlassian.plugin.PluginAccessor
- Throws:
java.lang.IllegalArgumentException
getEnabledPluginModule
public com.atlassian.plugin.ModuleDescriptor<?> getEnabledPluginModule(java.lang.String completeKey)
- Specified by:
getEnabledPluginModule
in interface com.atlassian.plugin.PluginAccessor
getEnabledPlugins
public java.util.Collection<com.atlassian.plugin.Plugin> getEnabledPlugins()
- Specified by:
getEnabledPlugins
in interface com.atlassian.plugin.PluginAccessor
getModuleDescriptors
public <M> java.util.Collection<com.atlassian.plugin.ModuleDescriptor<M>> getModuleDescriptors(com.atlassian.plugin.predicate.ModuleDescriptorPredicate<M> moduleDescriptorPredicate)
- Specified by:
getModuleDescriptors
in interface com.atlassian.plugin.PluginAccessor
getModules
public <M> java.util.Collection<M> getModules(com.atlassian.plugin.predicate.ModuleDescriptorPredicate<M> moduleDescriptorPredicate)
- Specified by:
getModules
in interface com.atlassian.plugin.PluginAccessor
getPlugin
public com.atlassian.plugin.Plugin getPlugin(java.lang.String key)
throws java.lang.IllegalArgumentException
- Specified by:
getPlugin
in interface com.atlassian.plugin.PluginAccessor
- Throws:
java.lang.IllegalArgumentException
getPluginModule
public com.atlassian.plugin.ModuleDescriptor<?> getPluginModule(java.lang.String completeKey)
- Specified by:
getPluginModule
in interface com.atlassian.plugin.PluginAccessor
getPluginRestartState
public com.atlassian.plugin.PluginRestartState getPluginRestartState(java.lang.String key)
- Specified by:
getPluginRestartState
in interface com.atlassian.plugin.PluginAccessor
getPlugins
public java.util.Collection<com.atlassian.plugin.Plugin> getPlugins()
- Specified by:
getPlugins
in interface com.atlassian.plugin.PluginAccessor
getPlugins
public java.util.Collection<com.atlassian.plugin.Plugin> getPlugins(com.atlassian.plugin.predicate.PluginPredicate pluginPredicate)
- Specified by:
getPlugins
in interface com.atlassian.plugin.PluginAccessor
isPluginEnabled
public boolean isPluginEnabled(java.lang.String key)
throws java.lang.IllegalArgumentException
- Specified by:
isPluginEnabled
in interface com.atlassian.plugin.PluginAccessor
- Throws:
java.lang.IllegalArgumentException
isPluginModuleEnabled
public boolean isPluginModuleEnabled(java.lang.String completeKey)
- Specified by:
isPluginModuleEnabled
in interface com.atlassian.plugin.PluginAccessor
isSystemPlugin
public boolean isSystemPlugin(java.lang.String key)
- Specified by:
isSystemPlugin
in interface com.atlassian.plugin.PluginAccessor
getDynamicPluginClass
public java.lang.Class<?> getDynamicPluginClass(java.lang.String className)
throws java.lang.ClassNotFoundException
- Specified by:
getDynamicPluginClass
in interface com.atlassian.plugin.PluginAccessor
- Throws:
java.lang.ClassNotFoundException
getEnabledModuleDescriptorsByClass
public <D extends com.atlassian.plugin.ModuleDescriptor<?>> java.util.List<D> getEnabledModuleDescriptorsByClass(java.lang.Class<D> descriptorClazz,
boolean verbose)
- Specified by:
getEnabledModuleDescriptorsByClass
in interface com.atlassian.plugin.PluginAccessor
getEnabledModuleDescriptorsByType
public <M> java.util.List<com.atlassian.plugin.ModuleDescriptor<M>> getEnabledModuleDescriptorsByType(java.lang.String type)
throws com.atlassian.plugin.PluginParseException
- Specified by:
getEnabledModuleDescriptorsByType
in interface com.atlassian.plugin.PluginAccessor
- Throws:
com.atlassian.plugin.PluginParseException
getEnabledModulesByClassAndDescriptor
public <M> java.util.List<M> getEnabledModulesByClassAndDescriptor(java.lang.Class<com.atlassian.plugin.ModuleDescriptor<M>> descriptorClass,
java.lang.Class<M> moduleClass)
- Specified by:
getEnabledModulesByClassAndDescriptor
in interface com.atlassian.plugin.PluginAccessor
getEnabledModulesByClassAndDescriptor
public <M> java.util.List<M> getEnabledModulesByClassAndDescriptor(java.lang.Class<com.atlassian.plugin.ModuleDescriptor<M>>[] descriptorClazz,
java.lang.Class<M> moduleClass)
- Specified by:
getEnabledModulesByClassAndDescriptor
in interface com.atlassian.plugin.PluginAccessor
getPluginResourceAsStream
public java.io.InputStream getPluginResourceAsStream(java.lang.String pluginKey,
java.lang.String resourcePath)
- Specified by:
getPluginResourceAsStream
in interface com.atlassian.plugin.PluginAccessor
Copyright © 2003-2013 Atlassian. All Rights Reserved.