org.apache.tools.ant.taskdefs.optional.scm
public class AntStarTeamCheckOut extends Task
force
to
true.
starteam-sdk.jar
in your classpath to run this program.
For more information about the StarTeam API and how to license it, see
the link below.
Version: 1.0
See Also: StarBase Web Site
UNKNOWN: name="starteam" category="scm" ignore="true"
Field Summary | |
---|---|
static String | DEFAULT_EXCLUDESETTING
This disables the exclude filter by default. |
static String | DEFAULT_FOLDERSETTING
The default folder to search; the root folder. |
static String | DEFAULT_INCLUDESETTING
This constant sets the filter to include all files. |
Method Summary | |
---|---|
protected void | checkParameters() |
void | execute()
Do the execution.
|
protected String | formatForDisplay(Property p, Object value)
Formats a property value for display to the user.
|
String | getExcludes()
Gets the patterns from the exclude filter. |
String | getFolderName()
Gets the folderName attribute.
|
boolean | getForce()
Gets the force attribute.
|
String | getIncludes()
Gets the patterns from the include filter. |
String | getPassword()
Gets the password attribute.
|
protected Property | getPrimaryDescriptor(Type t)
Get the primary descriptor of the given item type. |
String | getProjectName()
Gets the projectName attribute.
|
boolean | getRecursion()
Gets the recursion attribute, which tells
AntStarTeamCheckOut whether to search subfolders when checking out
files.
|
protected Property | getSecondaryDescriptor(Type t)
Get the secondary descriptor of the given item type. |
protected Server | getServer()
Creates and logs in to a StarTeam server.
|
String | getServerName()
Gets the serverName attribute.
|
int | getServerPort()
Gets the serverPort attribute.
|
String | getTargetFolder()
Gets the targetFolder attribute.
|
boolean | getTargetFolderAbsolute()
returns whether the StarTeam default path is factored into calculated
target path locations (false) or whether targetFolder is an absolute
mapping to the root folder named by folderName
|
String | getUsername()
Gets the username attribute.
|
boolean | getVerbose()
Gets the verbose attribute.
|
String | getViewName()
Gets the viewName attribute.
|
protected boolean | matchPatterns(String patterns, String pName)
Convenient method to see if a string match a one pattern in given set
of space-separated patterns.
|
protected void | runFolder(Server s, Project p, View v, Type t, Folder f, File tgt)
Searches for files in the given folder. |
protected void | runItem(Server s, Project p, View v, Type t, Folder f, Item item, File tgt)
Check out one file if it matches the include filter but not the exclude
filter.
|
protected void | runProject(Server s, Project p)
Searches for the given view in the project.
|
protected void | runServer(Server s)
Searches for the specified project on the server.
|
protected void | runType(Server s, Project p, View v, Type t)
Searches for folders in the given view.
|
void | setExcludes(String excludes)
Sets the exclude filter. |
void | setFolderName(String folderName)
Sets the folderName attribute to the given value. |
void | setForce(boolean force)
Sets the force attribute to the given value.
|
void | setIncludes(String includes)
Sets the include filter. |
void | setPassword(String password)
Sets the password attribute to the given value.
|
void | setProjectName(String projectName)
Sets the projectName attribute to the given value.
|
void | setRecursion(boolean recursion)
Turns recursion on or off.
|
void | setServerName(String serverName)
Sets the serverName attribute to the given value.
|
void | setServerPort(int serverPort)
Sets the serverPort attribute to the given value. |
void | setTargetFolder(String targetFolder)
Sets the targetFolder attribute to the given value.
|
void | setTargetFolderAbsolute(boolean targetFolderAbsolute)
sets the property that indicates whether or not the Star Team "default
folder" is to be used when calculation paths for items on the target
(false) or if targetFolder is an absolute mapping to the root folder
named by foldername.
|
void | setUsername(String username)
Sets the username attribute to the given value.
|
void | setVerbose(boolean verbose)
Sets the verbose attribute to the given value.
|
void | setViewName(String viewName)
Sets the viewName attribute to the given value.
|
protected boolean | shouldCheckout(String pName)
Look if the file should be checked out. |
setExcludes(null)
.
See Also: getExcludes AntStarTeamCheckOut
See Also: getFolderName AntStarTeamCheckOut
setIncludes("*")
.
See Also: getIncludes AntStarTeamCheckOut
Throws: BuildException
Parameters: p An item property to format. value
Returns: A string containing the property, which is truncated to 35 characters for display.
Returns: A string of filter patterns separated by spaces.
See Also: AntStarTeamCheckOut AntStarTeamCheckOut getIncludes
folderName
attribute.
Returns: The subfolder from which to check out files. All subfolders will be searched, as well.
See Also: AntStarTeamCheckOut
force
attribute.
Returns: whether to continue if the target directory exists.
See Also: AntStarTeamCheckOut
Returns: A string of filter patterns separated by spaces.
See Also: AntStarTeamCheckOut AntStarTeamCheckOut getExcludes
Parameters: t An item type. At this point it will always be "file".
Returns: The specified item's primary descriptor.
projectName
attribute.
Returns: The StarTeam project to search.
See Also: AntStarTeamCheckOut
recursion
attribute, which tells
AntStarTeamCheckOut whether to search subfolders when checking out
files.
Returns: whether to search subfolders when checking out files.
See Also: AntStarTeamCheckOut
Parameters: t An item type. At this point it will always be "file".
Returns: The specified item's secondary descriptor. There may not be one for every file.
Returns: A StarTeam server.
serverName
attribute.
Returns: The StarTeam server to log in to.
See Also: AntStarTeamCheckOut
serverPort
attribute.
Returns: A string containing the port on the StarTeam server to use.
See Also: AntStarTeamCheckOut
targetFolder
attribute.
Returns: The target path on the local machine to check out to.
See Also: AntStarTeamCheckOut
Returns: returns true if absolute mapping is used, false if it is not used.
See Also: AntStarTeamCheckOut
verbose
attribute.
Returns: whether to display all files as it checks them out.
See Also: AntStarTeamCheckOut
viewName
attribute.
Returns: The view to find the specified folder in.
See Also: AntStarTeamCheckOut
Parameters: patterns the space-separated list of patterns. pName the name to look for matching.
Returns: whether the name match at least one pattern.
Parameters: s A StarTeam server. p A valid project on the server. v A view name from the specified project. t An item type which is currently always "file". f The folder to search. tgt Target folder on local machine
Parameters: s A StarTeam server. p A valid project on the server. v A view name from the specified project. t An item type which is currently always "file". f The folder the file is localed in. item The file to check out. tgt target folder on local machine
Parameters: s A StarTeam server. p A valid project on the given server.
Parameters: s A StarTeam server.
Parameters: s A StarTeam server. p A valid project on the server. v A view name from the specified project. t An item type which is currently always "file".
DirectoryScanner
's match
method, so here are the patterns straight from the Ant source code:
setExcludes("*.XML *.HTML");
Finally, note that filters have no effect on the directories
that are scanned; you could not skip over all files in directories
whose names begin with "project," for instance. Parameters: excludes A string of filter patterns to exclude. Separate the patterns by spaces.
See Also: AntStarTeamCheckOut getIncludes getExcludes
folderName
attribute to the given value. To
search the root folder, use a slash or backslash, or simply don't set a
folder at all.
Parameters: folderName The subfolder from which to check out files.
See Also: getFolderName
force
attribute to the given value.
Parameters: force if true, it overwrites files in the target directory. By default it set to false as a safeguard. Note that if the target directory does not exist, this setting has no effect.
See Also: getForce
DirectoryScanner
's match
method, so here are the patterns straight from the Ant source code:
setIncludes("*.java *.class");
Finally, note that filters have no effect on the directories
that are scanned; you could not check out files from directories with
names beginning only with "build," for instance. Of course, you could
limit AntStarTeamCheckOut to a particular folder and its subfolders
with the setFolderName(String folderName)
command. Parameters: includes A string of filter patterns to include. Separate the patterns by spaces.
See Also: getIncludes AntStarTeamCheckOut getExcludes
password
attribute to the given value.
Parameters: password Your password for the specified StarTeam server.
See Also: getPassword
projectName
attribute to the given value.
Parameters: projectName The StarTeam project to search.
See Also: getProjectName
Parameters: recursion if it is true, the default, subfolders are searched
recursively for files to check out. Otherwise, only files
specified by folderName
are scanned.
See Also: getRecursion
serverName
attribute to the given value.
Parameters: serverName The name of the server you wish to connect to.
See Also: getServerName
serverPort
attribute to the given value. The
given value must be a valid integer, but it must be a string object.
Parameters: serverPort A string containing the port on the StarTeam server to use.
See Also: getServerPort
targetFolder
attribute to the given value.
Parameters: targetFolder The target path on the local machine to check out to.
See Also: getTargetFolder
Parameters: targetFolderAbsolute true if the absolute mapping is to be used. false (the default) if the "default folder" is to be factored in.
See Also: getTargetFolderAbsolute
username
attribute to the given value.
Parameters: username Your username for the specified StarTeam server.
See Also: getUsername
verbose
attribute to the given value.
Parameters: verbose whether to display all files as it checks them out. By default it is false, so the program only displays the total number of files unless you override this default.
See Also: getVerbose
viewName
attribute to the given value.
Parameters: viewName The view to find the specified folder in.
See Also: getViewName
Parameters: pName the item name to look for being included.
Returns: whether the file should be checked out or not.