net.sourceforge.cruisecontrol.util
Class XMLLogHelper
java.lang.Object
net.sourceforge.cruisecontrol.util.XMLLogHelper
- public class XMLLogHelper
- extends java.lang.Object
Wrapper for the cruisecontrol build log. This class serves two purposes:
- Provide a convenient way to get relevant information about the build
- Abstract the build information so that the XML for the build log can change easily
The CruiseControl log is expected to be in the following format:
Note: buildtarget is only present when a target is forced via the JMX interface.
- Version:
- $Id: XMLLogHelper.java 2877 2007-02-26 00:47:47Z jfredrick $
- Author:
- Alden Almagro, Jonny Boman
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLLogHelper
public XMLLogHelper(org.jdom.Element log)
getLogFileName
public java.lang.String getLogFileName()
throws CruiseControlException
- Returns:
- the build log name
- Throws:
CruiseControlException
getLabel
public java.lang.String getLabel()
throws CruiseControlException
- Returns:
- the label for this build
- Throws:
CruiseControlException
getBuildTimestamp
public java.lang.String getBuildTimestamp()
throws CruiseControlException
- Throws:
CruiseControlException
wasPreviousBuildSuccessful
public boolean wasPreviousBuildSuccessful()
throws CruiseControlException
- Returns:
- true if the previous build was successful, false if it was not
- Throws:
CruiseControlException
isBuildNecessary
public boolean isBuildNecessary()
- Returns:
- true if the build was necessary
getProjectName
public java.lang.String getProjectName()
throws CruiseControlException
- Returns:
- project name as defined in the ant build file
- Throws:
CruiseControlException
isBuildSuccessful
public boolean isBuildSuccessful()
- Returns:
- true if the build was successful, false otherwise
getBuildParticipants
public java.util.Set getBuildParticipants()
- Looks in modifications/changelist/ or modifications/modification/user depending on SouceControl implementation.
- Returns:
Set
of usernames that have modified code since the last build
getAntProperty
public java.lang.String getAntProperty(java.lang.String propertyName)
throws CruiseControlException
- Parameters:
propertyName
- the name of the ant property
- Returns:
- the value of the ant property
- Throws:
CruiseControlException
getCruiseControlInfoProperty
public java.lang.String getCruiseControlInfoProperty(java.lang.String name)
throws CruiseControlException
- Throws:
CruiseControlException
getModifications
public java.util.Set getModifications()
isBuildFix
public boolean isBuildFix()
throws CruiseControlException
- Throws:
CruiseControlException