org.sonar.core.plugin
Class AbstractPluginRepository

java.lang.Object
  extended by org.sonar.core.plugin.AbstractPluginRepository
All Implemented Interfaces:
BatchComponent, PluginRepository, ServerComponent

public abstract class AbstractPluginRepository
extends Object
implements PluginRepository

Since:
2.2

Constructor Summary
AbstractPluginRepository()
           
 
Method Summary
protected static Object getExtensionKey(Object component)
           
 Plugin getPlugin(String key)
           
 Plugin getPluginForExtension(Object extension)
           
 String getPluginKey(Plugin plugin)
           
 Collection<Plugin> getPlugins()
           
 Property[] getProperties(Plugin plugin)
          Returns the list of properties of a plugin
 Property[] getProperties(String pluginKey)
           
protected  void invokeExtensionProviders(org.picocontainer.MutablePicoContainer container)
          Must be executed by implementations when all plugins are registered.
protected static boolean isExtensionProvider(Object extension)
           
protected static boolean isType(Object extension, Class<? extends Extension> extensionClass)
           
protected  void registerPlugin(org.picocontainer.MutablePicoContainer container, Plugin plugin, String pluginKey)
           
protected abstract  boolean shouldRegisterExtension(org.picocontainer.PicoContainer container, String pluginKey, Object extension)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPluginRepository

public AbstractPluginRepository()
Method Detail

registerPlugin

protected void registerPlugin(org.picocontainer.MutablePicoContainer container,
                              Plugin plugin,
                              String pluginKey)

invokeExtensionProviders

protected void invokeExtensionProviders(org.picocontainer.MutablePicoContainer container)
Must be executed by implementations when all plugins are registered.


shouldRegisterExtension

protected abstract boolean shouldRegisterExtension(org.picocontainer.PicoContainer container,
                                                   String pluginKey,
                                                   Object extension)

getPlugins

public Collection<Plugin> getPlugins()
Specified by:
getPlugins in interface PluginRepository

getPlugin

public Plugin getPlugin(String key)
Specified by:
getPlugin in interface PluginRepository

getPluginKey

public String getPluginKey(Plugin plugin)

getProperties

public Property[] getProperties(Plugin plugin)
Returns the list of properties of a plugin

Specified by:
getProperties in interface PluginRepository

getProperties

public Property[] getProperties(String pluginKey)

getPluginForExtension

public Plugin getPluginForExtension(Object extension)
Specified by:
getPluginForExtension in interface PluginRepository

isType

protected static boolean isType(Object extension,
                                Class<? extends Extension> extensionClass)

isExtensionProvider

protected static boolean isExtensionProvider(Object extension)

getExtensionKey

protected static Object getExtensionKey(Object component)


Copyright © 2009-2011 SonarSource. All Rights Reserved.