| java.lang.Object net.sourceforge.cruisecontrol.labelincrementers.FormattedLabelIncrementer
FormattedLabelIncrementer | public class FormattedLabelIncrementer implements LabelIncrementer(Code) | | This class provides a label incrementation for creating consistent, formatted upper
case labels. This class expects the label format to be either "x_y_z" or "y_z"
where x is any String, y is an integer and z is one of REL, INT or BLD.
Usage:
<formattedlabelincrementer prefix="false" defaultlabel="1.INT"/%gt;
author: Kevin Lee author: Jeff Brekke (Jeff.Brekke@qg.com) author: alden almagro (alden@thoughtworks.com) author: Paul Julius (pdjulius@thoughtworks.com) |
Method Summary | |
public String | getDefaultLabel() | public String | incrementLabel(String oldLabel, Element buildLog) Increments the label when a successful build occurs.
Assumes that the label will be in the format of "x_y_z" or "y_z",
where x can be anything, y is an integer and z is one of REL, INT or BLD
The y value will be incremented by one, the rest will remain the same.
The label is converted to uppercase by default.
Parameters: oldLabel - Label from previous successful build. | public boolean | isPreBuildIncrementer() | public boolean | isValidLabel(String label) Verify that the label specified is a valid label. | public void | setDefaultLabel(String label) | public void | setPreBuildIncrementer(boolean preInc) | public void | setPrefix(boolean prefix) | public void | setSeparator(String newSeparator) |
FormattedLabelIncrementer | public FormattedLabelIncrementer()(Code) | | |
getDefaultLabel | public String getDefaultLabel()(Code) | | Get the default label
string containing the default label |
incrementLabel | public String incrementLabel(String oldLabel, Element buildLog)(Code) | | Increments the label when a successful build occurs.
Assumes that the label will be in the format of "x_y_z" or "y_z",
where x can be anything, y is an integer and z is one of REL, INT or BLD
The y value will be incremented by one, the rest will remain the same.
The label is converted to uppercase by default.
Parameters: oldLabel - Label from previous successful build. Label to use for most recent successful build. |
isPreBuildIncrementer | public boolean isPreBuildIncrementer()(Code) | | Checks whether the label should be incremented pre/post build
true if the label will be incremented before the build, else false |
isValidLabel | public boolean isValidLabel(String label)(Code) | | Verify that the label specified is a valid label. In this case a valid
label contains at least one '_' character, and an integer after the last
but one occurrence of the '_' character, followed by REL, INT or BLD
Parameters: label - the label to check for validity true if label is valid, else false |
setDefaultLabel | public void setDefaultLabel(String label)(Code) | | Set the default label
Parameters: label - string to set the default label to |
setPreBuildIncrementer | public void setPreBuildIncrementer(boolean preInc)(Code) | | Set the pre/post behavior of the label incrementer
Parameters: preInc - whether to increment the build before the build, default is false |
setPrefix | public void setPrefix(boolean prefix)(Code) | | Set whether a prefix is required or no
Parameters: prefix - whether to include a prefix with the label, default is true |
setSeparator | public void setSeparator(String newSeparator)(Code) | | set the separtor to be use between parts of the build label, default is "_"
Parameters: newSeparator - the character string to use as a separator |
|
|