|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.cruisecontrol.PluginXMLHelper
Helps mapping the XML to object by instantiating and initializing beans.
Some plugins can be self-configuring
. For the others, the
the configureObject(org.jdom.Element, Object, boolean)
defines the operations
to be performed.
Constructor Summary | |
PluginXMLHelper(ProjectHelper plugins)
|
Method Summary | |
java.lang.Object |
configure(org.jdom.Element objectElement,
java.lang.Class pluginClass,
boolean skipChildElements)
Given a JDOM Element and a class, this method will instantiate an object of type pluginClass, and configure the element.
|
java.lang.Object |
configure(org.jdom.Element objectElement,
java.lang.Object pluginInstance,
boolean skipChildElements)
Same as configure(org.jdom.Element, Class, boolean) , except that
the client already has a pluginInstance. |
protected void |
configureObject(org.jdom.Element objectElement,
java.lang.Object object,
boolean skipChildElements)
Configure the specified plugin object given the JDOM Element defining the plugin configuration. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PluginXMLHelper(ProjectHelper plugins)
Method Detail |
public java.lang.Object configure(org.jdom.Element objectElement, java.lang.Class pluginClass, boolean skipChildElements) throws CruiseControlException
configure
the element.
When the plugin is self-configuring
the plugin takes
the responsibility of configuring itself
configure(org.jdom.Element, Object, boolean)
to use when one already has an instance.
objectElement
- the JDOM Element defining the plugin configurationpluginClass
- the class to instantiateskipChildElements
- false
to recurse the configuration, true
otherwise
CruiseControlException
- if the plugin class cannot be instantiated,
if the configuration failsconfigure(org.jdom.Element, Object, boolean)
public java.lang.Object configure(org.jdom.Element objectElement, java.lang.Object pluginInstance, boolean skipChildElements) throws CruiseControlException
configure(org.jdom.Element, Class, boolean)
, except that
the client already has a pluginInstance.
CruiseControlException
- if the configuration failsprotected void configureObject(org.jdom.Element objectElement, java.lang.Object object, boolean skipChildElements) throws CruiseControlException
public Yyy createXxx()
methods that corresponds to non-plugins child elements
(i.e. known by the instance class). The returned instance must be assignable to the Yyy typepublic void add(Xxx)
methods that corresponds to child elements which are
plugins themselves, e.g. which will require asking the ProjectXMLHelper to
configure the plugin
objectElement
- the JDOM Element defining the plugin configurationobject
- the instance to configure to instantiateskipChildElements
- false
to recurse the configuration, true
otherwise
CruiseControlException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |