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

public Class CCUpdate

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

Performs a ClearCase Update command.

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
graphical Displays a graphical dialog during the update No
log Specifies a log file for ClearCase to write to No
overwrite Specifies whether to overwrite hijacked files or not No
rename Specifies that hijacked files should be renamed with a .keep extension No
currenttime Specifies that modification time should be written as the current time. Either currenttime or preservetime can be specified. No
preservetime Specifies that modification time should preserved from the VOB time. Either currenttime or preservetime can be specified. 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_CURRENTTIME

-ctime flag -- modified time is written as the current time

public static final String
FLAG_GRAPHICAL

-graphical flag -- display graphical dialog during update operation

public static final String
FLAG_LOG

-log flag -- file to log status to

public static final String
FLAG_NOVERWRITE

-noverwrite flag -- do not overwrite hijacked files

public static final String
FLAG_OVERWRITE

-overwrite flag -- overwrite hijacked files

public static final String
FLAG_PRESERVETIME

-ptime flag -- modified time is written as the VOB time

public static final String
FLAG_RENAME

-rename flag -- rename hijacked files with .keep extension

private boolean
private boolean
private String
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 boolean

Returns:

boolean containing status of current time flag
getCurrentTime
()

Get current time status

public boolean

Returns:

boolean containing status of graphical flag
getGraphical
()

Get graphical flag status

public String

Returns:

String containing the path to the log file
getLog
()

Get log file

private void
getLogCommand(Commandline
containing the command line string with or without the log flag and path appended
cmd
)

Get the 'log' command

public boolean

Returns:

boolean containing status of overwrite flag
getOverwrite
()

Get overwrite hijacked files status

public boolean

Returns:

boolean containing status of preserve time flag
getPreserveTime
()

Get preserve time status

public boolean

Returns:

boolean containing status of rename flag
getRename
()

Get rename hijacked files status

public void
setCurrentTime(boolean
the status to set the flag to
ct
)

If true, modification time should be written as the current time.

public void
setGraphical(boolean
the status to set the flag to
graphical
)

If true, displays a graphical dialog during the update.

public void
setLog(String
the path to the log file
log
)

Sets the log file where cleartool records the status of the command.

public void
setOverwrite(boolean
the status to set the flag to
ow
)

If true, overwrite hijacked files.

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

If true, modification time should be preserved from the VOB time.

public void
setRename(boolean
the status to set the flag to
ren
)

If true, hijacked files are renamed with a .keep extension.

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

Field Detail

FLAG_CURRENTTIMEback to summary
public static final String FLAG_CURRENTTIME

-ctime flag -- modified time is written as the current time

FLAG_GRAPHICALback to summary
public static final String FLAG_GRAPHICAL

-graphical flag -- display graphical dialog during update operation

FLAG_LOGback to summary
public static final String FLAG_LOG

-log flag -- file to log status to

FLAG_NOVERWRITEback to summary
public static final String FLAG_NOVERWRITE

-noverwrite flag -- do not overwrite hijacked files

FLAG_OVERWRITEback to summary
public static final String FLAG_OVERWRITE

-overwrite flag -- overwrite hijacked files

FLAG_PRESERVETIMEback to summary
public static final String FLAG_PRESERVETIME

-ptime flag -- modified time is written as the VOB time

FLAG_RENAMEback to summary
public static final String FLAG_RENAME

-rename flag -- rename hijacked files with .keep extension

mCtimeback to summary
private boolean mCtime
mGraphicalback to summary
private boolean mGraphical
mLogback to summary
private String mLog
mOverwriteback to summary
private boolean mOverwrite
mPtimeback to summary
private boolean mPtime
mRenameback to summary
private boolean mRename

Constructor Detail

CCUpdateback to summary
public CCUpdate()

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
getCurrentTimeback to summary
public boolean getCurrentTime()

Get current time status

Returns:boolean

boolean containing status of current time flag

getGraphicalback to summary
public boolean getGraphical()

Get graphical flag status

Returns:boolean

boolean containing status of graphical flag

getLogback to summary
public String getLog()

Get log file

Returns:String

String containing the path to the log file

getLogCommandback to summary
private void getLogCommand(Commandline cmd)

Get the 'log' command

Parameters
cmd:Commandline

containing the command line string with or without the log flag and path appended

getOverwriteback to summary
public boolean getOverwrite()

Get overwrite hijacked files status

Returns:boolean

boolean containing status of overwrite flag

getPreserveTimeback to summary
public boolean getPreserveTime()

Get preserve time status

Returns:boolean

boolean containing status of preserve time flag

getRenameback to summary
public boolean getRename()

Get rename hijacked files status

Returns:boolean

boolean containing status of rename flag

setCurrentTimeback to summary
public void setCurrentTime(boolean ct)

If true, modification time should be written as the current time. Either currenttime or preservetime can be specified.

Parameters
ct:boolean

the status to set the flag to

setGraphicalback to summary
public void setGraphical(boolean graphical)

If true, displays a graphical dialog during the update.

Parameters
graphical:boolean

the status to set the flag to

setLogback to summary
public void setLog(String log)

Sets the log file where cleartool records the status of the command.

Parameters
log:String

the path to the log file

setOverwriteback to summary
public void setOverwrite(boolean ow)

If true, overwrite hijacked files.

Parameters
ow:boolean

the status to set the flag to

setPreserveTimeback to summary
public void setPreserveTime(boolean pt)

If true, modification time should be preserved from the VOB time. Either currenttime or preservetime can be specified.

Parameters
pt:boolean

the status to set the flag to

setRenameback to summary
public void setRename(boolean ren)

If true, hijacked files are renamed with a .keep extension.

Parameters
ren:boolean

the status to set the flag to