net.sourceforge.cruisecontrol.publishers
Class ClearCaseBaselinePublisher

java.lang.Object
  extended bynet.sourceforge.cruisecontrol.publishers.ClearCaseBaselinePublisher
All Implemented Interfaces:
Publisher, java.io.Serializable

public class ClearCaseBaselinePublisher
extends java.lang.Object
implements Publisher

Creates a ClearCase UCM baseline for the specified view's integration stream. Uses the value of the CruiseControl generated ${label} property as well as the value of the baselineprefix attribute (if specified) to name the baseline. A baseline is only created if UCM modifications are recorded in the build log. By default an incremental baseline is created although a full baseline can be created too (incremental baselines are recommended for Continuous Integration).

Author:
Kevin Lee
See Also:
Serialized Form

Constructor Summary
ClearCaseBaselinePublisher()
           
 
Method Summary
 java.util.List getActivities(org.jdom.Element log)
          extract the list of UCM modifications from the CruiseControl log (assumes the UCM sourcecontrol was used)
 java.lang.String getBaselineprefix()
          Get baselineprefix flag status
 java.lang.String getComponent()
          Get the component flag status
 boolean getFull()
          Get full flag status
 java.lang.String getViewtag()
          Get viewtag flag status
static void main(java.lang.String[] args)
          for testing
 void publish(org.jdom.Element log)
          Define the publishing.
 void setBaselineprefix(java.lang.String baselineprefix)
          Set the baselineprefix flag
 void setComponent(java.lang.String comp)
          Set the component to generate the baseline for
 void setFull(boolean full)
          Set the full flag
 void setViewtag(java.lang.String viewtag)
          Set the viewtag status flag
 boolean shouldPublish(org.jdom.Element log)
          determines if the publish should take place
 void validate()
          Called after the configuration is read to make sure that all the mandatory parameters were specified..
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClearCaseBaselinePublisher

public ClearCaseBaselinePublisher()
Method Detail

setBaselineprefix

public void setBaselineprefix(java.lang.String baselineprefix)
Set the baselineprefix flag

Parameters:
baselineprefix - the status to set the flag to

getBaselineprefix

public java.lang.String getBaselineprefix()
Get baselineprefix flag status

Returns:
String containing status of baselineprefix flag

setViewtag

public void setViewtag(java.lang.String viewtag)
Set the viewtag status flag

Parameters:
viewtag - the status to set the flag to

getViewtag

public java.lang.String getViewtag()
Get viewtag flag status

Returns:
String containing status of viewtag flag

setFull

public void setFull(boolean full)
Set the full flag

Parameters:
full - the status to set the flag to

getFull

public boolean getFull()
Get full flag status

Returns:
boolean containing status of full flag

setComponent

public void setComponent(java.lang.String comp)
Set the component to generate the baseline for

Parameters:
comp - the name of the component

getComponent

public java.lang.String getComponent()
Get the component flag status

Returns:
the component the baseline is to be applied to

validate

public void validate()
              throws CruiseControlException
Description copied from interface: Publisher
Called after the configuration is read to make sure that all the mandatory parameters were specified..

Specified by:
validate in interface Publisher
Throws:
CruiseControlException - if there was a configuration error.

getActivities

public java.util.List getActivities(org.jdom.Element log)
extract the list of UCM modifications from the CruiseControl log (assumes the UCM sourcecontrol was used)

Parameters:
log - The Cruise Control log (as a JDOM element).
Returns:
a List of UCM activities

shouldPublish

public boolean shouldPublish(org.jdom.Element log)
determines if the publish should take place

Parameters:
log - the CruiseControl log (as a JDOM element).
Returns:
true if the build was successful and new activities were found

publish

public void publish(org.jdom.Element log)
             throws CruiseControlException
Description copied from interface: Publisher
Define the publishing.

Specified by:
publish in interface Publisher
Parameters:
log - JDOM Element representation of the main cruisecontrol build log
Throws:
CruiseControlException

main

public static void main(java.lang.String[] args)
for testing