public class StarTeamCheckout extends TreeBasedTask
<taskdef name="starteamcheckout" classname="org.apache.tools.ant.taskdefs.StarTeamCheckout"/> <starteamcheckout username="BuildMaster" password="ant" starteamFolder="Source" starteamurl="servername:portnum/project/view" createworkingdirectories="true"/>
TreeBasedTask.UnmatchedFileMap
DEFAULT_EXCLUDESETTING, DEFAULT_INCLUDESETTING
description, location, project
Constructor and Description |
---|
StarTeamCheckout() |
Modifier and Type | Method and Description |
---|---|
protected View |
createSnapshotView(View raw)
Override of base-class abstract function creates an
appropriately configured view for checkouts - either
the current view or a view from this.label or the raw
view itself in the case of a revision label.
|
boolean |
getUseRepositoryTimeStamp()
returns the value of the useRepositoryTimestamp member
|
protected void |
logOperationDescription(Folder starteamrootFolder,
java.io.File targetrootFolder)
extenders should emit to the log an entry describing the parameters
that will be used by this operation.
|
void |
setAsOfDate(java.lang.String asOfDateParam)
List files, dates, and statuses as of this date; optional.
|
void |
setAsOfDateFormat(java.lang.String asOfDateFormat)
Date Format with which asOfDate parameter to be parsed; optional.
|
void |
setConvertEOL(boolean value)
Set whether or not files should be checked out using the
local machine's EOL convention.
|
void |
setCreateWorkingDirs(boolean value)
flag (defaults to true) to create all directories
that are in the Starteam repository even if they are empty.
|
void |
setDeleteUncontrolled(boolean value)
Whether or not all local files not in StarTeam should be deleted.
|
void |
setLabel(java.lang.String label)
Sets the label StarTeam is to use for checkout; defaults to the most recent file.
|
void |
setLocked(boolean v)
Set to do a locked checkout; optional default is false.
|
void |
setUnlocked(boolean v)
Set to do an unlocked checkout.
|
void |
setUseRepositoryTimeStamp(boolean useRepositoryTimeStamp)
sets the useRepositoryTimestmp member.
|
protected void |
testPreconditions()
Implements base-class abstract function to define tests for
any preconditons required by the task.
|
protected void |
visit(Folder starteamFolder,
java.io.File targetFolder)
Implements base-class abstract function to perform the checkout
operation on the files in each folder of the tree.
|
_setAsOfDate, _setAsOfDateFormat, _setLabel, execute, getAsOfDate, getExcludes, getFullRepositoryPath, getIDofLabelInUse, getIncludes, getLabel, getLabelID, getLabelInUse, getRootLocalFolder, getRootStarteamFolder, getViewConfiguredByDate, isForced, isPreloadFileInformation, isRecursive, isUsingRevisionLabel, isUsingViewLabel, logAsOfDate, logExcludes, logIncludes, logLabel, matchPatterns, setExcludes, setForced, setIncludes, setPreloadFileInformation, setRecursive, setRootLocalFolder, setRootStarteamFolder, shouldProcess
disconnectFromServer, getPassword, getProjectname, getServer, getServername, getServerport, getTypeNames, getURL, getUserName, getUserName, getViewname, getViewURL, openView, setPassword, setProjectname, setServername, setServerport, setURL, setUserName, setViewname
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
public void setCreateWorkingDirs(boolean value)
value
- the value to set the attribute to.public void setDeleteUncontrolled(boolean value)
true
.value
- the value to set the attribute to.public void setConvertEOL(boolean value)
true
.value
- the value to set the attribute to.public void setLabel(java.lang.String label)
label
- the label to be usedpublic void setLocked(boolean v) throws BuildException
v
- True to do a locked checkout, false to checkout without
changing status/.BuildException
- if both locked and unlocked are set truepublic void setUnlocked(boolean v) throws BuildException
v
- True to do an unlocked checkout, false to checkout without
changing status.BuildException
- if both locked and unlocked are set truepublic void setUseRepositoryTimeStamp(boolean useRepositoryTimeStamp)
useRepositoryTimeStamp
- true means checked out files will get the repository timestamp.
false means the checked out files will be timestamped at the time
of checkout.public boolean getUseRepositoryTimeStamp()
public void setAsOfDate(java.lang.String asOfDateParam)
asOfDateParam
- the date as of which the listing to be madepublic void setAsOfDateFormat(java.lang.String asOfDateFormat)
asOfDateFormat
- the SimpleDateFormat-compatible format stringprotected View createSnapshotView(View raw) throws BuildException
createSnapshotView
in class StarTeamTask
raw
- the unconfigured View
View
appropriately configured.BuildException
- on errorprotected void testPreconditions() throws BuildException
testPreconditions
in class TreeBasedTask
BuildException
- thrown if both rootLocalFolder
and viewRootLocalFolder are definedexecute()
protected void logOperationDescription(Folder starteamrootFolder, java.io.File targetrootFolder)
logOperationDescription
in class TreeBasedTask
starteamrootFolder
- root folder in StarTeam for the operationtargetrootFolder
- root local folder for the operation (whether specified
by the user or not.protected void visit(Folder starteamFolder, java.io.File targetFolder) throws BuildException
visit
in class TreeBasedTask
starteamFolder
- the StarTeam folder from which files to be
checked outtargetFolder
- the local mapping of rootStarteamFolderBuildException
- if any error occurs