Package com.atlassian.confluence.plugin
Class NullPluginAccessor
- java.lang.Object
-
- com.atlassian.confluence.plugin.NullPluginAccessor
-
- All Implemented Interfaces:
com.atlassian.plugin.PluginAccessor
public class NullPluginAccessor extends Object implements com.atlassian.plugin.PluginAccessor
No-op plugin accessor that can be substituted when the plugin system is unavailable.
-
-
Constructor Summary
Constructors Constructor Description NullPluginAccessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ClassLoader
getClassLoader()
Iterable<com.atlassian.plugin.ModuleDescriptor<?>>
getDynamicModules(com.atlassian.plugin.Plugin plugin)
InputStream
getDynamicResourceAsStream(String resourcePath)
<D extends com.atlassian.plugin.ModuleDescriptor<?>>
List<D>getEnabledModuleDescriptorsByClass(Class<D> descriptorClazz)
<M> List<M>
getEnabledModulesByClass(Class<M> moduleClass)
com.atlassian.plugin.Plugin
getEnabledPlugin(String pluginKey)
com.atlassian.plugin.ModuleDescriptor<?>
getEnabledPluginModule(String completeKey)
Collection<com.atlassian.plugin.Plugin>
getEnabledPlugins()
<M> Collection<com.atlassian.plugin.ModuleDescriptor<M>>
getModuleDescriptors(com.atlassian.plugin.predicate.ModuleDescriptorPredicate<M> moduleDescriptorPredicate)
Deprecated.since 7.0.1<M> Collection<com.atlassian.plugin.ModuleDescriptor<M>>
getModuleDescriptors(Predicate<com.atlassian.plugin.ModuleDescriptor<M>> moduleDescriptorPredicate)
<M> Collection<M>
getModules(com.atlassian.plugin.predicate.ModuleDescriptorPredicate<M> moduleDescriptorPredicate)
Deprecated.since 7.0.1<M> Collection<M>
getModules(Predicate<com.atlassian.plugin.ModuleDescriptor<M>> moduleDescriptorPredicate)
com.atlassian.plugin.Plugin
getPlugin(String key)
com.atlassian.plugin.ModuleDescriptor<?>
getPluginModule(String completeKey)
com.atlassian.plugin.PluginRestartState
getPluginRestartState(String key)
Collection<com.atlassian.plugin.Plugin>
getPlugins()
Collection<com.atlassian.plugin.Plugin>
getPlugins(com.atlassian.plugin.predicate.PluginPredicate pluginPredicate)
Deprecated.since 7.0.1Collection<com.atlassian.plugin.Plugin>
getPlugins(Predicate<com.atlassian.plugin.Plugin> pluginPredicate)
boolean
isPluginEnabled(String key)
boolean
isPluginModuleEnabled(String completeKey)
boolean
isSystemPlugin(String key)
-
-
-
Method Detail
-
getPlugins
public Collection<com.atlassian.plugin.Plugin> getPlugins()
- Specified by:
getPlugins
in interfacecom.atlassian.plugin.PluginAccessor
-
getPlugins
@Deprecated public Collection<com.atlassian.plugin.Plugin> getPlugins(com.atlassian.plugin.predicate.PluginPredicate pluginPredicate)
Deprecated.since 7.0.1- Specified by:
getPlugins
in interfacecom.atlassian.plugin.PluginAccessor
-
getPlugins
public Collection<com.atlassian.plugin.Plugin> getPlugins(Predicate<com.atlassian.plugin.Plugin> pluginPredicate)
- Specified by:
getPlugins
in interfacecom.atlassian.plugin.PluginAccessor
-
getEnabledPlugins
public Collection<com.atlassian.plugin.Plugin> getEnabledPlugins()
- Specified by:
getEnabledPlugins
in interfacecom.atlassian.plugin.PluginAccessor
-
getModules
@Deprecated public <M> Collection<M> getModules(com.atlassian.plugin.predicate.ModuleDescriptorPredicate<M> moduleDescriptorPredicate)
Deprecated.since 7.0.1- Specified by:
getModules
in interfacecom.atlassian.plugin.PluginAccessor
-
getModuleDescriptors
@Deprecated public <M> Collection<com.atlassian.plugin.ModuleDescriptor<M>> getModuleDescriptors(com.atlassian.plugin.predicate.ModuleDescriptorPredicate<M> moduleDescriptorPredicate)
Deprecated.since 7.0.1- Specified by:
getModuleDescriptors
in interfacecom.atlassian.plugin.PluginAccessor
-
getModules
public <M> Collection<M> getModules(Predicate<com.atlassian.plugin.ModuleDescriptor<M>> moduleDescriptorPredicate)
- Specified by:
getModules
in interfacecom.atlassian.plugin.PluginAccessor
-
getModuleDescriptors
public <M> Collection<com.atlassian.plugin.ModuleDescriptor<M>> getModuleDescriptors(Predicate<com.atlassian.plugin.ModuleDescriptor<M>> moduleDescriptorPredicate)
- Specified by:
getModuleDescriptors
in interfacecom.atlassian.plugin.PluginAccessor
-
getPlugin
public com.atlassian.plugin.Plugin getPlugin(String key) throws IllegalArgumentException
- Specified by:
getPlugin
in interfacecom.atlassian.plugin.PluginAccessor
- Throws:
IllegalArgumentException
-
getEnabledPlugin
public com.atlassian.plugin.Plugin getEnabledPlugin(String pluginKey) throws IllegalArgumentException
- Specified by:
getEnabledPlugin
in interfacecom.atlassian.plugin.PluginAccessor
- Throws:
IllegalArgumentException
-
getPluginModule
public com.atlassian.plugin.ModuleDescriptor<?> getPluginModule(String completeKey)
- Specified by:
getPluginModule
in interfacecom.atlassian.plugin.PluginAccessor
-
getEnabledPluginModule
public com.atlassian.plugin.ModuleDescriptor<?> getEnabledPluginModule(String completeKey)
- Specified by:
getEnabledPluginModule
in interfacecom.atlassian.plugin.PluginAccessor
-
isPluginEnabled
public boolean isPluginEnabled(String key) throws IllegalArgumentException
- Specified by:
isPluginEnabled
in interfacecom.atlassian.plugin.PluginAccessor
- Throws:
IllegalArgumentException
-
isPluginModuleEnabled
public boolean isPluginModuleEnabled(String completeKey)
- Specified by:
isPluginModuleEnabled
in interfacecom.atlassian.plugin.PluginAccessor
-
getEnabledModulesByClass
public <M> List<M> getEnabledModulesByClass(Class<M> moduleClass)
- Specified by:
getEnabledModulesByClass
in interfacecom.atlassian.plugin.PluginAccessor
-
getEnabledModuleDescriptorsByClass
public <D extends com.atlassian.plugin.ModuleDescriptor<?>> List<D> getEnabledModuleDescriptorsByClass(Class<D> descriptorClazz)
- Specified by:
getEnabledModuleDescriptorsByClass
in interfacecom.atlassian.plugin.PluginAccessor
-
getDynamicResourceAsStream
public InputStream getDynamicResourceAsStream(String resourcePath)
- Specified by:
getDynamicResourceAsStream
in interfacecom.atlassian.plugin.PluginAccessor
-
getClassLoader
public ClassLoader getClassLoader()
- Specified by:
getClassLoader
in interfacecom.atlassian.plugin.PluginAccessor
-
isSystemPlugin
public boolean isSystemPlugin(String key)
- Specified by:
isSystemPlugin
in interfacecom.atlassian.plugin.PluginAccessor
-
getPluginRestartState
public com.atlassian.plugin.PluginRestartState getPluginRestartState(String key)
- Specified by:
getPluginRestartState
in interfacecom.atlassian.plugin.PluginAccessor
-
getDynamicModules
public Iterable<com.atlassian.plugin.ModuleDescriptor<?>> getDynamicModules(com.atlassian.plugin.Plugin plugin)
- Specified by:
getDynamicModules
in interfacecom.atlassian.plugin.PluginAccessor
-
-