org.apache.tools.ant.taskdefs.optional.clearcase

Class CCMklabel

public class CCMklabel extends ClearCase

Task to perform mklabel command to ClearCase.

The following attributes are interpreted:

Attribute Values Required
viewpath Path to the ClearCase view file or directory that the command will operate on No
replace Replace a label of the same type on the same branch No
recurse Process each subdirectory under viewpath No
version Identify a specific version to attach the label to No
typename Name of the label type Yes
vob Name of the VOB No
comment Specify a comment. Only one of comment or cfile may be used. No
commentfile Specify a file containing a comment. Only one of comment or cfile may be used. No
failonerr Throw an exception if the command fails. Default is true No
Field Summary
static StringFLAG_COMMENT
-c flag -- comment to attach to the file
static StringFLAG_COMMENTFILE
-cfile flag -- file containing a comment to attach to the file
static StringFLAG_NOCOMMENT
-nc flag -- no comment is specified
static StringFLAG_RECURSE
-recurse flag -- process all subdirectories
static StringFLAG_REPLACE
-replace flag -- replace another label of the same type
static StringFLAG_VERSION
-version flag -- attach label to specified version
Method Summary
voidexecute()
Executes the task.
StringgetComment()
Get comment string
StringgetCommentFile()
Get comment file
booleangetRecurse()
Get recurse flag status
booleangetReplace()
Get replace flag status
StringgetTypeName()
Get type-name
StringgetVersion()
Get version flag status
StringgetVOB()
Get VOB name
voidsetComment(String comment)
Set comment string
voidsetCommentFile(String cfile)
Set comment file
voidsetRecurse(boolean recurse)
Set recurse flag
voidsetReplace(boolean replace)
Set the replace flag
voidsetTypeName(String tn)
Set the type-name
voidsetVersion(String version)
Set the version flag
voidsetVOB(String vob)
Set the VOB name

Field Detail

FLAG_COMMENT

public static final String FLAG_COMMENT
-c flag -- comment to attach to the file

FLAG_COMMENTFILE

public static final String FLAG_COMMENTFILE
-cfile flag -- file containing a comment to attach to the file

FLAG_NOCOMMENT

public static final String FLAG_NOCOMMENT
-nc flag -- no comment is specified

FLAG_RECURSE

public static final String FLAG_RECURSE
-recurse flag -- process all subdirectories

FLAG_REPLACE

public static final String FLAG_REPLACE
-replace flag -- replace another label of the same type

FLAG_VERSION

public static final String FLAG_VERSION
-version flag -- attach label to specified version

Method Detail

execute

public void execute()
Executes the task.

Builds a command line to execute cleartool and then calls Exec's run method to execute the command line.

Throws: BuildException if the command fails and failonerr is set to true

getComment

public String getComment()
Get comment string

Returns: String containing the comment

getCommentFile

public String getCommentFile()
Get comment file

Returns: String containing the path to the comment file

getRecurse

public boolean getRecurse()
Get recurse flag status

Returns: boolean containing status of recurse flag

getReplace

public boolean getReplace()
Get replace flag status

Returns: boolean containing status of replace flag

getTypeName

public String getTypeName()
Get type-name

Returns: String containing type name

getVersion

public String getVersion()
Get version flag status

Returns: boolean containing status of version flag

getVOB

public String getVOB()
Get VOB name

Returns: String containing VOB name

setComment

public void setComment(String comment)
Set comment string

Parameters: comment the comment string

setCommentFile

public void setCommentFile(String cfile)
Set comment file

Parameters: cfile the path to the comment file

setRecurse

public void setRecurse(boolean recurse)
Set recurse flag

Parameters: recurse the status to set the flag to

setReplace

public void setReplace(boolean replace)
Set the replace flag

Parameters: replace the status to set the flag to

setTypeName

public void setTypeName(String tn)
Set the type-name

Parameters: tn the type name

setVersion

public void setVersion(String version)
Set the version flag

Parameters: version the status to set the flag to

setVOB

public void setVOB(String vob)
Set the VOB name

Parameters: vob the VOB name