net.sourceforge.cruisecontrol.labelincrementers
Class PropertyFileLabelIncrementer

java.lang.Object
  extended bynet.sourceforge.cruisecontrol.labelincrementers.PropertyFileLabelIncrementer
All Implemented Interfaces:
LabelIncrementer, java.io.Serializable

public class PropertyFileLabelIncrementer
extends java.lang.Object
implements LabelIncrementer

See Also:
Serialized Form

Constructor Summary
PropertyFileLabelIncrementer()
           
 
Method Summary
 java.lang.String getDefaultLabel()
          Called by Project when there is no previously serialized label.
 java.lang.String incrementLabel(java.lang.String oldLabel, org.jdom.Element buildLog)
          Increments the label when a successful build occurs.
 boolean isPreBuildIncrementer()
          Some implementations of LabelIncrementer, such as those involving dates, are better suited to being incremented before building rather than after building.
 boolean isValidLabel(java.lang.String label)
          Check the validity of a user-supplied label, making sure that it can be incremented successfully by the appropriate implementation of LabelIncrementer
 void setDefaultLabel(java.lang.String defaultLabel)
           
 void setPreBuildIncrementer(boolean preBuildIncrementer)
           
 void setPropertyFile(java.lang.String propertyFile)
           
 void setPropertyName(java.lang.String propertyName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyFileLabelIncrementer

public PropertyFileLabelIncrementer()
Method Detail

incrementLabel

public java.lang.String incrementLabel(java.lang.String oldLabel,
                                       org.jdom.Element buildLog)
Description copied from interface: LabelIncrementer
Increments the label when a successful build occurs. The oldLabel should be transformed and returned as the new label. The build log is also passed in so that some more complex label incrementing can be handled. For example, a label incrementer could find the ant target that was called and increment based on that information.

Specified by:
incrementLabel in interface LabelIncrementer
Parameters:
buildLog - JDOM Element representation of the build.
oldLabel - Label from previous successful build.
Returns:
Label to use for most recent successful build.

isValidLabel

public boolean isValidLabel(java.lang.String label)
Description copied from interface: LabelIncrementer
Check the validity of a user-supplied label, making sure that it can be incremented successfully by the appropriate implementation of LabelIncrementer

Specified by:
isValidLabel in interface LabelIncrementer
Parameters:
label - user-supplied label
Returns:
true if it is a valid label.

isPreBuildIncrementer

public boolean isPreBuildIncrementer()
Description copied from interface: LabelIncrementer
Some implementations of LabelIncrementer, such as those involving dates, are better suited to being incremented before building rather than after building. This method determines whether to increment before building or after building.

Specified by:
isPreBuildIncrementer in interface LabelIncrementer

getDefaultLabel

public java.lang.String getDefaultLabel()
Description copied from interface: LabelIncrementer
Called by Project when there is no previously serialized label.

Specified by:
getDefaultLabel in interface LabelIncrementer
Returns:
defaultLabel

setPreBuildIncrementer

public void setPreBuildIncrementer(boolean preBuildIncrementer)

setPropertyFile

public void setPropertyFile(java.lang.String propertyFile)

setPropertyName

public void setPropertyName(java.lang.String propertyName)

setDefaultLabel

public void setDefaultLabel(java.lang.String defaultLabel)