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

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.tools.ant.taskdefs.optional.starteam.StarTeamTask
              extended by org.apache.tools.ant.taskdefs.optional.starteam.TreeBasedTask
                  extended by org.apache.tools.ant.taskdefs.optional.starteam.StarTeamList
All Implemented Interfaces:
java.lang.Cloneable

public class StarTeamList
extends TreeBasedTask

Produces a listing of the contents of the StarTeam repository at the specified view and StarTeamFolder. Created: Tue Dec 25 06:51:14 2001

Version:
1.0

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.tools.ant.taskdefs.optional.starteam.TreeBasedTask
TreeBasedTask.UnmatchedFileMap
 
Field Summary
 
Fields inherited from class org.apache.tools.ant.taskdefs.optional.starteam.TreeBasedTask
DEFAULT_EXCLUDESETTING, DEFAULT_INCLUDESETTING
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
StarTeamList()
           
 
Method Summary
protected  com.starbase.starteam.View createSnapshotView(com.starbase.starteam.View raw)
          Override of base-class abstract function creates an appropriately configured view for checkoutlists - either the current view or a view from this.label.
protected  void list(com.starbase.starteam.File reposFile, java.io.File localFile)
          Log a repositary file and it's corresponding local file.
protected  void logOperationDescription(com.starbase.starteam.Folder starteamrootFolder, java.io.File targetrootFolder)
          extenders should emit to the log an entry describing the parameters that will be used by this operation.
protected static java.lang.String pad(java.lang.String s, int padlen)
          Return a padded string.
protected static java.lang.String rpad(java.lang.String s, int padlen)
          Return a right padded string.
 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 setLabel(java.lang.String label)
          List files, dates, and statuses as of this label; optional.
protected  void testPreconditions()
          Required base-class abstract function implementation checks for incompatible parameters.
protected  void visit(com.starbase.starteam.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.
 
Methods inherited from class org.apache.tools.ant.taskdefs.optional.starteam.TreeBasedTask
_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
 
Methods inherited from class org.apache.tools.ant.taskdefs.optional.starteam.StarTeamTask
disconnectFromServer, getPassword, getProjectname, getServer, getServername, getServerport, getTypeNames, getURL, getUserName, getUserName, getViewname, getViewURL, openView, setPassword, setProjectname, setServername, setServerport, setURL, setUserName, setViewname
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StarTeamList

public StarTeamList()
Method Detail

setLabel

public void setLabel(java.lang.String label)
List files, dates, and statuses as of this label; optional. The label must exist in starteam or an exception will be thrown. If not specified, the most recent version of each file will be listed.

Parameters:
label - the label to be listed

setAsOfDate

public void setAsOfDate(java.lang.String asOfDateParam)
List files, dates, and statuses as of this date; optional. If not specified, the most recent version of each file will be listed.

Parameters:
asOfDateParam - the date as of which the listing to be made
Since:
Ant 1.6

setAsOfDateFormat

public void setAsOfDateFormat(java.lang.String asOfDateFormat)
Date Format with which asOfDate parameter to be parsed; optional. Must be a SimpleDateFormat compatible string. If not specified, and asOfDateParam is specified, parse will use ISO8601 datetime and date formats.

Parameters:
asOfDateFormat - the SimpleDateFormat-compatible format string
Since:
Ant 1.6

createSnapshotView

protected com.starbase.starteam.View createSnapshotView(com.starbase.starteam.View raw)
Override of base-class abstract function creates an appropriately configured view for checkoutlists - either the current view or a view from this.label.

Specified by:
createSnapshotView in class StarTeamTask
Parameters:
raw - the unconfigured View
Returns:
the snapshot View appropriately configured.

testPreconditions

protected void testPreconditions()
                          throws BuildException
Required base-class abstract function implementation checks for incompatible parameters.

Specified by:
testPreconditions in class TreeBasedTask
Throws:
BuildException - thrown on incompatible params specified
See Also:
execute()

logOperationDescription

protected void logOperationDescription(com.starbase.starteam.Folder starteamrootFolder,
                                       java.io.File targetrootFolder)
extenders should emit to the log an entry describing the parameters that will be used by this operation.

Specified by:
logOperationDescription in class TreeBasedTask
Parameters:
starteamrootFolder - root folder in StarTeam for the operation
targetrootFolder - root local folder for the operation (whether specified by the user or not.

visit

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

Specified by:
visit in class TreeBasedTask
Parameters:
starteamFolder - the StarTeam folder from which files to be checked out
targetFolder - the local mapping of rootStarteamFolder
Throws:
BuildException - on error

list

protected void list(com.starbase.starteam.File reposFile,
                    java.io.File localFile)
             throws java.io.IOException
Log a repositary file and it's corresponding local file.

Parameters:
reposFile - the repositary file to log
localFile - the corresponding local file
Throws:
java.io.IOException - on error getting information from files

pad

protected static java.lang.String pad(java.lang.String s,
                                      int padlen)
Return a padded string.

Parameters:
s - the string to pad
padlen - the size of the padded string
Returns:
the padded string

rpad

protected static java.lang.String rpad(java.lang.String s,
                                       int padlen)
Return a right padded string.

Parameters:
s - the string to pad
padlen - the size of the padded string
Returns:
the padded string