net.sourceforge.cruisecontrol
Class Builder

java.lang.Object
  extended by net.sourceforge.cruisecontrol.util.PerDayScheduleItem
      extended by net.sourceforge.cruisecontrol.Builder
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable
Direct Known Subclasses:
AntBuilder, CompositeBuilder, ExecBuilder, Maven2Builder, MavenBuilder, NantBuilder, PhingBuilder, RakeBuilder

public abstract class Builder
extends PerDayScheduleItem
implements java.lang.Comparable

See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sourceforge.cruisecontrol.util.PerDayScheduleItem
INVALID_NAME_OF_DAY, NOT_SET
 
Constructor Summary
Builder()
           
 
Method Summary
abstract  org.jdom.Element build(java.util.Map properties, Progress progress)
          Execute a build.
abstract  org.jdom.Element buildWithTarget(java.util.Map properties, java.lang.String target, Progress progress)
          Execute a build with the given target.
 int compareTo(java.lang.Object o)
          used to sort builders.
 java.lang.String getGroup()
           
 int getMultiple()
           
 boolean getShowProgress()
           
 int getTime()
           
 boolean isValidDay(java.util.Date now)
          Is this the correct day to be running this builder?
 void setGroup(java.lang.String group)
           
 void setMultiple(int multiple)
          can use Builder.NOT_SET to reset.
 void setShowProgress(boolean showProgress)
           
 void setTime(java.lang.String timeString)
          can use ScheduleItem.NOT_SET to reset.
 void validate()
           
 
Methods inherited from class net.sourceforge.cruisecontrol.util.PerDayScheduleItem
getDay, setDay
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Builder

public Builder()
Method Detail

build

public abstract org.jdom.Element build(java.util.Map properties,
                                       Progress progress)
                                throws CruiseControlException
Execute a build.

Parameters:
properties - build properties
progress - callback to provide progress updates
Returns:
the log resulting from executing the build
Throws:
CruiseControlException - if something breaks

buildWithTarget

public abstract org.jdom.Element buildWithTarget(java.util.Map properties,
                                                 java.lang.String target,
                                                 Progress progress)
                                          throws CruiseControlException
Execute a build with the given target.

Parameters:
properties - build properties
target - the build target to call, overrides target defined in config
progress - callback to provide progress updates
Returns:
the log resulting from executing the build
Throws:
CruiseControlException - if something breaks

validate

public void validate()
              throws CruiseControlException
Throws:
CruiseControlException

getTime

public int getTime()

setTime

public void setTime(java.lang.String timeString)
can use ScheduleItem.NOT_SET to reset.

Parameters:
timeString - new time integer

setMultiple

public void setMultiple(int multiple)
can use Builder.NOT_SET to reset.

Parameters:
multiple - new multiple

getMultiple

public int getMultiple()

getGroup

public java.lang.String getGroup()

setGroup

public void setGroup(java.lang.String group)

setShowProgress

public void setShowProgress(boolean showProgress)

getShowProgress

public boolean getShowProgress()

isValidDay

public boolean isValidDay(java.util.Date now)
Is this the correct day to be running this builder?

Parameters:
now - the current date
Returns:
true if this this the correct day to be running this builder

compareTo

public int compareTo(java.lang.Object o)
used to sort builders. we're only going to care about sorting builders based on build number, so we'll sort based on the multiple attribute.

Specified by:
compareTo in interface java.lang.Comparable