org.apache.tools.ant.taskdefs.optional.starteam

Class StarTeamCheckin

public class StarTeamCheckin extends TreeBasedTask

Checks files into a StarTeam project. Optionally adds files and in the local tree that are not managed by the repository to its control. Created: Sat Dec 15 20:26:07 2001

Version: 1.0

UNKNOWN: name="stcheckin" category="scm" product="Starteam"

Constructor Summary
StarTeamCheckin()
Constructor for StarTeamCheckin.
Method Summary
protected ViewcreateSnapshotView(View raw)
Override of base-class abstract function creates an appropriately configured view.
StringgetComment()
Get the comment attribute for this operation
booleanisAddUncontrolled()
Get the value of addUncontrolled.
protected voidlogOperationDescription(Folder starteamrootFolder, File targetrootFolder)
Implements base-class abstract function to emit to the log an entry describing the parameters that will be used by this operation.
voidsetAddUncontrolled(boolean addUncontrolled)
if true, any files or folders NOT in StarTeam will be added to the repository.
voidsetComment(String comment)
Optional checkin comment to be saved with the file.
voidsetCreateFolders(boolean argCreateFolders)
Sets the value of createFolders
voidsetUnlocked(boolean v)
Set to do an unlocked checkout; optional, default is false; If true, file will be unlocked so that other users may change it.
protected voidtestPreconditions()
Implements base-class abstract function to define tests for any preconditons required by the task.
protected voidvisit(Folder starteamFolder, File targetFolder)
Implements base-class abstract function to perform the checkout operation on the files in each folder of the tree.

Constructor Detail

StarTeamCheckin

public StarTeamCheckin()
Constructor for StarTeamCheckin.

Method Detail

createSnapshotView

protected View createSnapshotView(View raw)
Override of base-class abstract function creates an appropriately configured view. For checkins this is always the current or "tip" view.

Parameters: raw the unconfigured View

Returns: the snapshot View appropriately configured.

getComment

public String getComment()
Get the comment attribute for this operation

Returns: value of comment.

isAddUncontrolled

public boolean isAddUncontrolled()
Get the value of addUncontrolled.

Returns: value of addUncontrolled.

logOperationDescription

protected void logOperationDescription(Folder starteamrootFolder, File targetrootFolder)
Implements base-class abstract function to emit to the log an entry describing the parameters that will be used by this operation.

Parameters: starteamrootFolder root folder in StarTeam for the operation targetrootFolder root local folder for the operation (whether specified by the user or not).

setAddUncontrolled

public void setAddUncontrolled(boolean addUncontrolled)
if true, any files or folders NOT in StarTeam will be added to the repository. Defaults to "false".

Parameters: addUncontrolled Value to assign to addUncontrolled.

setComment

public void setComment(String comment)
Optional checkin comment to be saved with the file.

Parameters: comment Value to assign to comment.

setCreateFolders

public void setCreateFolders(boolean argCreateFolders)
Sets the value of createFolders

Parameters: argCreateFolders Value to assign to this.createFolders

setUnlocked

public void setUnlocked(boolean v)
Set to do an unlocked checkout; optional, default is false; If true, file will be unlocked so that other users may change it. If false, lock status will not change.

Parameters: v true means do an unlocked checkout false means leave status alone.

testPreconditions

protected void testPreconditions()
Implements base-class abstract function to define tests for any preconditons required by the task.

Throws: BuildException thrown if both rootLocalFolder and viewRootLocalFolder are defined

visit

protected void visit(Folder starteamFolder, File targetFolder)
Implements base-class abstract function to perform the checkout operation on the files in each folder of the tree.

Parameters: starteamFolder the StarTeam folder to which files will be checked in targetFolder local folder from which files will be checked in

Throws: BuildException if any error occurs