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

public Class CCMkdir

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

Performs ClearCase mkdir.

The following attributes are interpreted:

Task attributes
Attribute Values Required
viewpath Path to the ClearCase view directory that the command will operate on Yes
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
nocheckout Do not checkout after element creation 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 directory

public static final String
FLAG_COMMENTFILE

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

public static final String
FLAG_NOCHECKOUT

-nco flag -- do not checkout element after creation

public static final String
FLAG_NOCOMMENT

-nc flag -- no comment is specified

private String
private String
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 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
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 noco flag
getNoCheckout
()

Get no checkout flag status

public void
setComment(String
the comment string
comment
)

Sets the comment string.

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

Specifies a file containing a comment.

public void
setNoCheckout(boolean
the status to set the flag to
co
)

If true, do not checkout element after creation.

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 directory

FLAG_COMMENTFILEback to summary
public static final String FLAG_COMMENTFILE

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

FLAG_NOCHECKOUTback to summary
public static final String FLAG_NOCHECKOUT

-nco flag -- do not checkout element after creation

FLAG_NOCOMMENTback to summary
public static final String FLAG_NOCOMMENT

-nc flag -- no comment is specified

mCfileback to summary
private String mCfile
mCommentback to summary
private String mComment
mNocoback to summary
private boolean mNoco

Constructor Detail

CCMkdirback to summary
public CCMkdir()

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
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

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

getNoCheckoutback to summary
public boolean getNoCheckout()

Get no checkout flag status

Returns:boolean

boolean containing status of noco flag

setCommentback to summary
public void setComment(String comment)

Sets the comment string.

Parameters
comment:String

the comment string

setCommentFileback to summary
public void setCommentFile(String cfile)

Specifies a file containing a comment.

Parameters
cfile:String

the path to the comment file

setNoCheckoutback to summary
public void setNoCheckout(boolean co)

If true, do not checkout element after creation.

Parameters
co:boolean

the status to set the flag to