|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.cruisecontrol.PluginRegistry
Handles "registering" plugins that will be used by the CruiseControl
configuration file.
A PluginRegistry can have a parent registry, which it will query for
a plugin if it's not defined in the registry itself. This is used to
enable projects to have their own plugins and override the classname
for a specific plugin, like the labelincrementer.
The root-registry contains the default list of plugins, i.e. those
that are already registered like AntBuilder that don't have to be registered
separately in the configuration file.
The registry keeps track of the plugin configurations
in order to allow full plugin preconfigurations (default properties + nested elements).
PluginXMLHelper
,
Serialized FormMethod Summary | |
static PluginRegistry |
createRegistry()
|
static PluginRegistry |
createRegistry(PluginRegistry parent)
|
java.lang.Class |
getPluginClass(java.lang.String pluginName)
|
java.lang.String |
getPluginClassname(java.lang.String pluginName)
|
org.jdom.Element |
getPluginConfig(java.lang.String pluginName)
Get the plugin configuration particular to this plugin, merged with the parents |
PluginDetail[] |
getPluginDetails()
|
java.lang.String |
getPluginName(java.lang.Class pluginClass)
|
PluginType[] |
getPluginTypes()
|
java.lang.Class |
instanciatePluginClass(java.lang.String pluginClassname,
java.lang.String pluginName)
|
boolean |
isPluginRegistered(java.lang.String pluginName)
|
void |
register(org.jdom.Element pluginElement)
Registers the given plugin, including plugin configuration. |
void |
register(java.lang.String pluginName,
java.lang.String pluginClassname)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static PluginRegistry createRegistry()
public static PluginRegistry createRegistry(PluginRegistry parent)
public void register(java.lang.String pluginName, java.lang.String pluginClassname)
pluginName
- The name for the plugin, e.g. ant. Note that plugin
names are always treated as case insensitive, so Ant, ant, and AnT are
all treated as the same plugin.pluginClassname
- The fully qualified classname for the
plugin class, e.g. net.sourceforge.cruisecontrol.builders.AntBuilder.public void register(org.jdom.Element pluginElement) throws CruiseControlException
pluginElement
- the JDom element that contains the plugin definition.
CruiseControlException
public java.lang.String getPluginClassname(java.lang.String pluginName)
public java.lang.Class getPluginClass(java.lang.String pluginName) throws CruiseControlException
CruiseControlException
- If the class provided cannot be loaded.public java.lang.Class instanciatePluginClass(java.lang.String pluginClassname, java.lang.String pluginName) throws CruiseControlException
pluginClassname
- pluginName
-
CruiseControlException
- If the class provided cannot be loaded.public java.lang.String getPluginName(java.lang.Class pluginClass)
public PluginDetail[] getPluginDetails() throws CruiseControlException
CruiseControlException
public PluginType[] getPluginTypes()
public boolean isPluginRegistered(java.lang.String pluginName)
java.lang.NullPointerException
- If a null pluginName is passed, then
a NullPointerException will occur. It's recommended to not pass a
null pluginName.public org.jdom.Element getPluginConfig(java.lang.String pluginName)
java.lang.NullPointerException
- if pluginName is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |