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

public Class CCCheckin

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

The following attributes are interpreted:

Task attributes
Attribute Values Required
viewpath Path to the ClearCase view file or directory that the command will operate on 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
nowarn Suppress warning messages No
preservetime Preserve the modification time No
keepcopy Keeps a copy of the file with a .keep extension No
identical Allows the file to be checked in even if it is identical to the original 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_IDENTICAL

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

public static final String
FLAG_KEEPCOPY

-keep flag -- keeps a copy of the file with a .keep extension

public static final String
FLAG_NOCOMMENT

-nc flag -- no comment is specified

public static final String
FLAG_NOWARN

-nwarn flag -- suppresses warning messages

public static final String
FLAG_PRESERVETIME

-ptime flag -- preserves the modification time

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 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 identical flag
getIdentical
()

Get identical flag status

public boolean

Returns:

boolean containing status of keepcopy flag
getKeepCopy
()

Get keepcopy flag status

public boolean

Returns:

boolean containing status of nwarn flag
getNoWarn
()

Get nowarn flag status

public boolean

Returns:

boolean containing status of preservetime flag
getPreserveTime
()

Get preservetime 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
setIdentical(boolean
the status to set the flag to
identical
)

If true, allows the file to be checked in even if it is identical to the original.

public void
setKeepCopy(boolean
the status to set the flag to
keep
)

If true, keeps a copy of the file with a .keep extension.

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

If true, suppress warning messages.

public void
setPreserveTime(boolean
the status to set the flag to
ptime
)

If true, preserve the modification time.

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_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_KEEPCOPYback to summary
public static final String FLAG_KEEPCOPY

-keep flag -- keeps a copy of the file with a .keep extension

FLAG_NOCOMMENTback to summary
public static final String FLAG_NOCOMMENT

-nc flag -- no comment is specified

FLAG_NOWARNback to summary
public static final String FLAG_NOWARN

-nwarn flag -- suppresses warning messages

FLAG_PRESERVETIMEback to summary
public static final String FLAG_PRESERVETIME

-ptime flag -- preserves the modification time

mCfileback to summary
private String mCfile
mCommentback to summary
private String mComment
mIdenticalback to summary
private boolean mIdentical
mKeepback to summary
private boolean mKeep
mNwarnback to summary
private boolean mNwarn
mPtimeback to summary
private boolean mPtime

Constructor Detail

CCCheckinback to summary
public CCCheckin()

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

getIdenticalback to summary
public boolean getIdentical()

Get identical flag status

Returns:boolean

boolean containing status of identical flag

getKeepCopyback to summary
public boolean getKeepCopy()

Get keepcopy flag status

Returns:boolean

boolean containing status of keepcopy flag

getNoWarnback to summary
public boolean getNoWarn()

Get nowarn flag status

Returns:boolean

boolean containing status of nwarn flag

getPreserveTimeback to summary
public boolean getPreserveTime()

Get preservetime flag status

Returns:boolean

boolean containing status of preservetime 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

setIdenticalback to summary
public void setIdentical(boolean identical)

If true, allows the file to be checked in even if it is identical to the original.

Parameters
identical:boolean

the status to set the flag to

setKeepCopyback to summary
public void setKeepCopy(boolean keep)

If true, keeps a copy of the file with a .keep extension.

Parameters
keep:boolean

the status to set the flag to

setNoWarnback to summary
public void setNoWarn(boolean nwarn)

If true, suppress warning messages.

Parameters
nwarn:boolean

the status to set the flag to

setPreserveTimeback to summary
public void setPreserveTime(boolean ptime)

If true, preserve the modification time.

Parameters
ptime:boolean

the status to set the flag to