public class MockPluginAccessor extends Object implements com.atlassian.plugin.PluginAccessor
Constructor and Description |
---|
MockPluginAccessor() |
Modifier and Type | Method and Description |
---|---|
MockPluginAccessor |
addPlugin(com.atlassian.plugin.Plugin plugin) |
MockPluginAccessor |
addPlugins(com.atlassian.plugin.Plugin... plugins) |
ClassLoader |
getClassLoader() |
Iterable<com.atlassian.plugin.ModuleDescriptor<?>> |
getDynamicModules(com.atlassian.plugin.Plugin plugin) |
Class<?> |
getDynamicPluginClass(String className) |
InputStream |
getDynamicResourceAsStream(String resourcePath) |
<D extends com.atlassian.plugin.ModuleDescriptor<?>> |
getEnabledModuleDescriptorsByClass(Class<D> descriptorClazz) |
<D extends com.atlassian.plugin.ModuleDescriptor<?>> |
getEnabledModuleDescriptorsByClass(Class<D> descriptorClazz,
boolean verbose) |
<M> List<com.atlassian.plugin.ModuleDescriptor<M>> |
getEnabledModuleDescriptorsByType(String type) |
<M> List<M> |
getEnabledModulesByClass(Class<M> moduleClass) |
<M> List<M> |
getEnabledModulesByClassAndDescriptor(Class<com.atlassian.plugin.ModuleDescriptor<M>>[] descriptorClazz,
Class<M> moduleClass) |
<M> List<M> |
getEnabledModulesByClassAndDescriptor(Class<com.atlassian.plugin.ModuleDescriptor<M>> moduleDescriptorClass,
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) |
<M> Collection<M> |
getModules(com.atlassian.plugin.predicate.ModuleDescriptorPredicate<M> moduleDescriptorPredicate) |
com.atlassian.plugin.Plugin |
getPlugin(String key) |
com.atlassian.plugin.ModuleDescriptor<?> |
getPluginModule(String completeKey) |
InputStream |
getPluginResourceAsStream(String pluginKey,
String resourcePath) |
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) |
boolean |
isPluginEnabled(String key) |
boolean |
isPluginModuleEnabled(String completeKey) |
boolean |
isSystemPlugin(String key) |
public Collection<com.atlassian.plugin.Plugin> getPlugins()
getPlugins
in interface com.atlassian.plugin.PluginAccessor
public MockPluginAccessor addPlugins(com.atlassian.plugin.Plugin... plugins)
public MockPluginAccessor addPlugin(com.atlassian.plugin.Plugin plugin)
public Collection<com.atlassian.plugin.Plugin> getPlugins(com.atlassian.plugin.predicate.PluginPredicate pluginPredicate)
getPlugins
in interface com.atlassian.plugin.PluginAccessor
public Collection<com.atlassian.plugin.Plugin> getEnabledPlugins()
getEnabledPlugins
in interface com.atlassian.plugin.PluginAccessor
public <M> Collection<M> getModules(com.atlassian.plugin.predicate.ModuleDescriptorPredicate<M> moduleDescriptorPredicate)
getModules
in interface com.atlassian.plugin.PluginAccessor
public <M> Collection<com.atlassian.plugin.ModuleDescriptor<M>> getModuleDescriptors(com.atlassian.plugin.predicate.ModuleDescriptorPredicate<M> moduleDescriptorPredicate)
getModuleDescriptors
in interface com.atlassian.plugin.PluginAccessor
public com.atlassian.plugin.Plugin getPlugin(String key) throws IllegalArgumentException
getPlugin
in interface com.atlassian.plugin.PluginAccessor
IllegalArgumentException
public com.atlassian.plugin.Plugin getEnabledPlugin(String pluginKey) throws IllegalArgumentException
getEnabledPlugin
in interface com.atlassian.plugin.PluginAccessor
IllegalArgumentException
public com.atlassian.plugin.ModuleDescriptor<?> getPluginModule(String completeKey)
getPluginModule
in interface com.atlassian.plugin.PluginAccessor
public com.atlassian.plugin.ModuleDescriptor<?> getEnabledPluginModule(String completeKey)
getEnabledPluginModule
in interface com.atlassian.plugin.PluginAccessor
public boolean isPluginEnabled(String key) throws IllegalArgumentException
isPluginEnabled
in interface com.atlassian.plugin.PluginAccessor
IllegalArgumentException
public boolean isPluginModuleEnabled(String completeKey)
isPluginModuleEnabled
in interface com.atlassian.plugin.PluginAccessor
public <M> List<M> getEnabledModulesByClass(Class<M> moduleClass)
getEnabledModulesByClass
in interface com.atlassian.plugin.PluginAccessor
public <M> List<M> getEnabledModulesByClassAndDescriptor(Class<com.atlassian.plugin.ModuleDescriptor<M>>[] descriptorClazz, Class<M> moduleClass)
getEnabledModulesByClassAndDescriptor
in interface com.atlassian.plugin.PluginAccessor
public <M> List<M> getEnabledModulesByClassAndDescriptor(Class<com.atlassian.plugin.ModuleDescriptor<M>> moduleDescriptorClass, Class<M> moduleClass)
getEnabledModulesByClassAndDescriptor
in interface com.atlassian.plugin.PluginAccessor
public <D extends com.atlassian.plugin.ModuleDescriptor<?>> List<D> getEnabledModuleDescriptorsByClass(Class<D> descriptorClazz)
getEnabledModuleDescriptorsByClass
in interface com.atlassian.plugin.PluginAccessor
public <D extends com.atlassian.plugin.ModuleDescriptor<?>> List<D> getEnabledModuleDescriptorsByClass(Class<D> descriptorClazz, boolean verbose)
getEnabledModuleDescriptorsByClass
in interface com.atlassian.plugin.PluginAccessor
public <M> List<com.atlassian.plugin.ModuleDescriptor<M>> getEnabledModuleDescriptorsByType(String type) throws com.atlassian.plugin.PluginParseException
getEnabledModuleDescriptorsByType
in interface com.atlassian.plugin.PluginAccessor
com.atlassian.plugin.PluginParseException
public InputStream getDynamicResourceAsStream(String resourcePath)
getDynamicResourceAsStream
in interface com.atlassian.plugin.PluginAccessor
public InputStream getPluginResourceAsStream(String pluginKey, String resourcePath)
getPluginResourceAsStream
in interface com.atlassian.plugin.PluginAccessor
public Class<?> getDynamicPluginClass(String className) throws ClassNotFoundException
getDynamicPluginClass
in interface com.atlassian.plugin.PluginAccessor
ClassNotFoundException
public ClassLoader getClassLoader()
getClassLoader
in interface com.atlassian.plugin.PluginAccessor
public boolean isSystemPlugin(String key)
isSystemPlugin
in interface com.atlassian.plugin.PluginAccessor
public com.atlassian.plugin.PluginRestartState getPluginRestartState(String key)
getPluginRestartState
in interface com.atlassian.plugin.PluginAccessor
public Iterable<com.atlassian.plugin.ModuleDescriptor<?>> getDynamicModules(com.atlassian.plugin.Plugin plugin)
getDynamicModules
in interface com.atlassian.plugin.PluginAccessor
Copyright © 2002-2015 Atlassian. All Rights Reserved.