com.atlassian.confluence.plugin
Class NullPluginAccessor

java.lang.Object
  extended by com.atlassian.confluence.plugin.NullPluginAccessor
All Implemented Interfaces:
com.atlassian.plugin.PluginAccessor

public class NullPluginAccessor
extends java.lang.Object
implements com.atlassian.plugin.PluginAccessor

No-op plugin accessor that can be substituted when the plugin system is unavailable.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.plugin.PluginAccessor
com.atlassian.plugin.PluginAccessor.Descriptor
 
Constructor Summary
NullPluginAccessor()
           
 
Method Summary
 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)
           
<M> java.util.List<M>
getEnabledModulesByClass(java.lang.Class<M> moduleClass)
           
<M> java.util.List<M>
getEnabledModulesByClassAndDescriptor(java.lang.Class<com.atlassian.plugin.ModuleDescriptor<M>>[] descriptorClazz, java.lang.Class<M> moduleClass)
           
<M> java.util.List<M>
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
 

Constructor Detail

NullPluginAccessor

public NullPluginAccessor()
Method Detail

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

getEnabledPlugins

public java.util.Collection<com.atlassian.plugin.Plugin> getEnabledPlugins()
Specified by:
getEnabledPlugins 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

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

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

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

getPluginModule

public com.atlassian.plugin.ModuleDescriptor<?> getPluginModule(java.lang.String completeKey)
Specified by:
getPluginModule in interface com.atlassian.plugin.PluginAccessor

getEnabledPluginModule

public com.atlassian.plugin.ModuleDescriptor<?> getEnabledPluginModule(java.lang.String completeKey)
Specified by:
getEnabledPluginModule 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

getEnabledModulesByClass

public <M> java.util.List<M> getEnabledModulesByClass(java.lang.Class<M> moduleClass)
Specified by:
getEnabledModulesByClass 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

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

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

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

getDynamicResourceAsStream

public java.io.InputStream getDynamicResourceAsStream(java.lang.String resourcePath)
Specified by:
getDynamicResourceAsStream 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

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

getClassLoader

public java.lang.ClassLoader getClassLoader()
Specified by:
getClassLoader in interface com.atlassian.plugin.PluginAccessor

isSystemPlugin

public boolean isSystemPlugin(java.lang.String key)
Specified by:
isSystemPlugin 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


Copyright © 2003-2014 Atlassian. All Rights Reserved.