net.sourceforge.cruisecontrol
Class BuildInfo

java.lang.Object
  extended bynet.sourceforge.cruisecontrol.BuildInfo
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

public class BuildInfo
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable

Contains various information about a specific build. The information is extracted from the name of the log file generated by the build.

Author:
Robert Watkins, Hack Kampbjorn
See Also:
Serialized Form

Field Summary
static char LABEL_SEPARATOR
           
static java.lang.String LOG_DATE_PATTERN
           
static java.lang.String LOG_PREFIX
           
 
Constructor Summary
BuildInfo(java.io.File logFile)
           
BuildInfo(LogFile logFile)
           
 
Method Summary
 int compareTo(java.lang.Object arg0)
          Return a comparison based on the build time.
 java.util.Date getBuildDate()
           
 java.lang.String getDateStamp()
          Gets the date stamp of the log name.
 java.lang.String getLabel()
           
 LogFile getLogFile()
           
 java.lang.String getLogName()
          Gets the log's name with a file extension.
 boolean isSuccessful()
           
static BuildInfoSummary loadFromDir(java.io.File logDir)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG_PREFIX

public static final java.lang.String LOG_PREFIX
See Also:
Constant Field Values

LABEL_SEPARATOR

public static final char LABEL_SEPARATOR
See Also:
Constant Field Values

LOG_DATE_PATTERN

public static final java.lang.String LOG_DATE_PATTERN
See Also:
Constant Field Values
Constructor Detail

BuildInfo

public BuildInfo(java.io.File logFile)
          throws java.text.ParseException

BuildInfo

public BuildInfo(LogFile logFile)
          throws java.text.ParseException
Method Detail

getBuildDate

public java.util.Date getBuildDate()

getDateStamp

public java.lang.String getDateStamp()
Gets the date stamp of the log name.

Returns:
the build date as a stamp.

getLabel

public java.lang.String getLabel()

isSuccessful

public boolean isSuccessful()

getLogName

public java.lang.String getLogName()
Gets the log's name with a file extension.


getLogFile

public LogFile getLogFile()

loadFromDir

public static BuildInfoSummary loadFromDir(java.io.File logDir)
                                    throws CruiseControlWebAppException
Throws:
CruiseControlWebAppException

compareTo

public int compareTo(java.lang.Object arg0)
Return a comparison based on the build time.

Specified by:
compareTo in interface java.lang.Comparable
See Also:
Comparable.compareTo(java.lang.Object)