|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.cruisecontrol.ProjectXMLHelper
Instantiates a project from a JDOM Element. Supports the use of Ant-like patterns in
attribute values that look like this: ${propertyname}
Constructor Summary | |
ProjectXMLHelper()
|
|
ProjectXMLHelper(java.util.Map projectProperties,
PluginRegistry projectPlugins)
|
Method Summary | |
java.lang.Object |
configurePlugin(org.jdom.Element pluginElement,
boolean skipChildElements)
TODO: also check that instantiated class implements/extends correct interface/class |
java.lang.Object |
getConfiguredPlugin(PluginXMLHelper pluginHelper,
java.lang.String pluginName)
Get a [partially] configured plugin instance given its plugin name. |
static void |
parsePropertiesInElement(org.jdom.Element element,
java.util.Map props,
boolean failIfMissing)
|
static java.lang.String |
parsePropertiesInString(java.util.Map props,
java.lang.String string,
boolean failIfMissing)
Parses a string by replacing all occurrences of a property macro with the resolved value of the property. |
static void |
registerProperty(java.util.Map props,
org.jdom.Element propertyElement,
boolean failIfMissing)
Registers one or more properties as defined in a property element. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ProjectXMLHelper()
public ProjectXMLHelper(java.util.Map projectProperties, PluginRegistry projectPlugins)
Method Detail |
public java.lang.Object configurePlugin(org.jdom.Element pluginElement, boolean skipChildElements) throws CruiseControlException
configurePlugin
in interface ProjectHelper
CruiseControlException
public java.lang.Object getConfiguredPlugin(PluginXMLHelper pluginHelper, java.lang.String pluginName) throws CruiseControlException
pluginName
-
null
if the plugin was never configured.
CruiseControlException
- if the registered class cannot be loaded,
if a property cannot be resolved,
if the plugin configuration failspublic static void registerProperty(java.util.Map props, org.jdom.Element propertyElement, boolean failIfMissing) throws CruiseControlException
propertyElement
- The element from which we will register properties
CruiseControlException
public static java.lang.String parsePropertiesInString(java.util.Map props, java.lang.String string, boolean failIfMissing) throws CruiseControlException
string
- The string to be parsed
CruiseControlException
- if a property cannot be resolvedpublic static void parsePropertiesInElement(org.jdom.Element element, java.util.Map props, boolean failIfMissing) throws CruiseControlException
CruiseControlException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |