Top Description Fields Constructors Methods
org.apache.tools.ant.taskdefs.optional.clearcase

public Class CCMkbl

extends ClearCase
Class Inheritance
Imports
org.apache.tools.ant.BuildException, .Project, org.apache.tools.ant.taskdefs.Execute, org.apache.tools.ant.types.Commandline

Task to CreateBaseline command to ClearCase.

The following attributes are interpreted:

Task attributes
Attribute Values Required
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
baselinerootname Specify the name to be associated with the baseline. Yes
nowarn Suppress warning messages No
identical Allows the baseline to be created even if it is identical to the previous baseline. No
full Creates a full baseline. No
nlabel Allows the baseline to be created without a label. No
failonerr Throw an exception if the command fails. Default is true No

Field Summary

Modifier and TypeField and Description
public static final String
FLAG_COMMENT

-c flag -- comment to attach to the file

public static final String
FLAG_COMMENTFILE

-cfile flag -- file containing a comment to attach to the file

public static final String
FLAG_FULL

-full flag -- baseline to be created is full

public static final String
FLAG_IDENTICAL

-identical flag -- allows the file to be checked in even if it is identical to the original

public static final String
FLAG_INCREMENTAL

-incremental flag -- baseline to be created is incremental

public static final String
FLAG_NLABEL

-nlabel -- baseline to be created without a label

public static final String
FLAG_NOCOMMENT

-nc flag -- no comment is specified

private String
private String
private String
private boolean
private boolean
private boolean
private boolean
Inherited from org.apache.tools.ant.taskdefs.optional.clearcase.ClearCase:
COMMAND_CHECKINCOMMAND_CHECKOUTCOMMAND_LOCKCOMMAND_LSCOCOMMAND_MKATTRCOMMAND_MKBLCOMMAND_MKDIRCOMMAND_MKELEMCOMMAND_MKLABELCOMMAND_MKLBTYPECOMMAND_RMTYPECOMMAND_UNCHECKOUTCOMMAND_UNLOCKCOMMAND_UPDATE

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
checkOptions(Commandline cmd)

Check the command line options.

public void
execute()

Overrides org.apache.tools.ant.Task.execute.

Executes the task.
public String

Returns:

String containing the name of the baseline
getBaselineRootName
()

Get baseline_root_name

public String

Returns:

String containing the comment
getComment
()

Get comment string

private void
getCommentCommand(Commandline
containing the command line string with or without the comment flag and string appended
cmd
)

Get the 'comment' command

public String

Returns:

String containing the path to the comment file
getCommentFile
()

Get comment file

private void
getCommentFileCommand(Commandline
CommandLine containing the command line string with or without the commentfile flag and file appended
cmd
)

Get the 'commentfile' command

public boolean

Returns:

boolean containing status of full flag
getFull
()

Get full flag status

public boolean

Returns:

boolean containing status of identical flag
getIdentical
()

Get identical flag status

public boolean

Returns:

boolean containing status of nlabel flag
getNlabel
()

Get nlabel status

public boolean

Returns:

boolean containing status of nwarn flag
getNoWarn
()

Get nowarn flag status

public void
setBaselineRootName(String
the name of the baseline
baselineRootName
)

Set baseline_root_name

public void
setComment(String
the comment string
comment
)

Set comment string

public void
setCommentFile(String
the path to the comment file
cfile
)

Set comment file

public void
setFull(boolean
the status to set the flag to
full
)

Set the full flag

public void
setIdentical(boolean
the status to set the flag to
identical
)

Set the identical flag

public void
setNlabel(boolean
the status to set the flag to
nlabel
)

Set the nlabel flag

public void
setNoWarn(boolean
the status to set the flag to
nwarn
)

Set the nowarn flag

Inherited from org.apache.tools.ant.taskdefs.optional.clearcase.ClearCase:
getClearToolCommandgetFailOnErrgetObjSelectgetViewPathgetViewPathBasenamerunrunSrunSsetClearToolDirsetFailOnErrsetObjSelectsetViewPath

Field Detail

FLAG_COMMENTback to summary
public static final String FLAG_COMMENT

-c flag -- comment to attach to the file

FLAG_COMMENTFILEback to summary
public static final String FLAG_COMMENTFILE

-cfile flag -- file containing a comment to attach to the file

FLAG_FULLback to summary
public static final String FLAG_FULL

-full flag -- baseline to be created is full

FLAG_IDENTICALback to summary
public static final String FLAG_IDENTICAL

-identical flag -- allows the file to be checked in even if it is identical to the original

FLAG_INCREMENTALback to summary
public static final String FLAG_INCREMENTAL

-incremental flag -- baseline to be created is incremental

FLAG_NLABELback to summary
public static final String FLAG_NLABEL

-nlabel -- baseline to be created without a label

FLAG_NOCOMMENTback to summary
public static final String FLAG_NOCOMMENT

-nc flag -- no comment is specified

mBaselineRootNameback to summary
private String mBaselineRootName
mCfileback to summary
private String mCfile
mCommentback to summary
private String mComment
mFullback to summary
private boolean mFull
mIdenticalback to summary
private boolean mIdentical
mNlabelback to summary
private boolean mNlabel
mNwarnback to summary
private boolean mNwarn

Constructor Detail

CCMkblback to summary
public CCMkbl()

Method Detail

checkOptionsback to summary
private void checkOptions(Commandline cmd)

Check the command line options.

executeback to summary
public void execute() throws BuildException

Overrides org.apache.tools.ant.Task.execute.

Executes the task.

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

Annotations
@Override
Exceptions
BuildException:
if the command fails and failonerr is set to true
getBaselineRootNameback to summary
public String getBaselineRootName()

Get baseline_root_name

Returns:String

String containing the name of the baseline

getCommentback to summary
public String getComment()

Get comment string

Returns:String

String containing the comment

getCommentCommandback to summary
private void getCommentCommand(Commandline cmd)

Get the 'comment' command

Parameters
cmd:Commandline

containing the command line string with or without the comment flag and string appended

getCommentFileback to summary
public String getCommentFile()

Get comment file

Returns:String

String containing the path to the comment file

getCommentFileCommandback to summary
private void getCommentFileCommand(Commandline cmd)

Get the 'commentfile' command

Parameters
cmd:Commandline

CommandLine containing the command line string with or without the commentfile flag and file appended

getFullback to summary
public boolean getFull()

Get full flag status

Returns:boolean

boolean containing status of full flag

getIdenticalback to summary
public boolean getIdentical()

Get identical flag status

Returns:boolean

boolean containing status of identical flag

getNlabelback to summary
public boolean getNlabel()

Get nlabel status

Returns:boolean

boolean containing status of nlabel flag

getNoWarnback to summary
public boolean getNoWarn()

Get nowarn flag status

Returns:boolean

boolean containing status of nwarn flag

setBaselineRootNameback to summary
public void setBaselineRootName(String baselineRootName)

Set baseline_root_name

Parameters
baselineRootName:String

the name of the baseline

setCommentback to summary
public void setComment(String comment)

Set comment string

Parameters
comment:String

the comment string

setCommentFileback to summary
public void setCommentFile(String cfile)

Set comment file

Parameters
cfile:String

the path to the comment file

setFullback to summary
public void setFull(boolean full)

Set the full flag

Parameters
full:boolean

the status to set the flag to

setIdenticalback to summary
public void setIdentical(boolean identical)

Set the identical flag

Parameters
identical:boolean

the status to set the flag to

setNlabelback to summary
public void setNlabel(boolean nlabel)

Set the nlabel flag

Parameters
nlabel:boolean

the status to set the flag to

setNoWarnback to summary
public void setNoWarn(boolean nwarn)

Set the nowarn flag

Parameters
nwarn:boolean

the status to set the flag to