Java Doc for TreeBasedTask.java in  » Build » ANT » org » apache » tools » ant » taskdefs » optional » starteam » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Build » ANT » org.apache.tools.ant.taskdefs.optional.starteam 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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

All known Subclasses:   org.apache.tools.ant.taskdefs.optional.starteam.StarTeamCheckout,  org.apache.tools.ant.taskdefs.optional.starteam.StarTeamList,  org.apache.tools.ant.taskdefs.optional.starteam.StarTeamCheckin,
TreeBasedTask
abstract public class TreeBasedTask extends StarTeamTask (Code)
TreeBasedTask.java This abstract class is the base for any tasks that are tree-based, that is, for tasks which iterate over a tree of folders in StarTeam which is reflected in a tree of folder the local machine. This class provides the tree-iteration functionality. Derived classes will implement their specific task functionality by the visitor pattern, specifically by implementing the method visit(Folder rootStarteamFolder, java.io.File rootLocalFolder) Created: Sat Dec 15 16:55:19 2001
See Also:    borland StarTeam Web Site

Inner Class :abstract protected class UnmatchedFileMap extends Hashtable

Field Summary
final public static  StringDEFAULT_EXCLUDESETTING
     This disables the exclude filter by default.
final public static  StringDEFAULT_INCLUDESETTING
     This constant sets the filter to include all files.


Method Summary
protected  void_setAsOfDate(String asOfDate)
     non-public method callable only by derived classes that implement setAsOfDate (so that derived tasks that do not accept this parameter will fail if user attempts to use it.
protected  void_setAsOfDateFormat(String asOfDateFormat)
     non-public method callable only by derived classes that implement setAsOfDateFormat (so that derived tasks that do not accept this parameter will fail if user attempts to use it.
protected  void_setLabel(String label)
     protected function to allow subclasses to set the label (or not).
final public  voidexecute()
     This method does the work of opening the supplied Starteam view and calling the visit() method to perform the task.
protected  StringgetAsOfDate()
     return the asOfDate entered by the user for internal use by derived classes.
public  StringgetExcludes()
     Gets the patterns from the exclude filter.
public static  StringgetFullRepositoryPath(com.starbase.starteam.File remotefile)
     Return the full repository path name of a file.
protected  intgetIDofLabelInUse()
     Get the id of the label in use.
public  StringgetIncludes()
     Gets the patterns from the include filter.
protected  StringgetLabel()
    
protected  intgetLabelID(View v)
     Helper method calls on the StarTeam API to retrieve an ID number for the specified view, corresponding to this.label.
protected  LabelgetLabelInUse()
    
public  StringgetRootLocalFolder()
     Returns the local folder specified by the user, corresponding to the starteam folder for this operation or null if not specified.
public  StringgetRootStarteamFolder()
    
protected  ViewgetViewConfiguredByDate(View raw)
     If an asofDate parameter has been supplied by the user return a StarTeam view based on the configuration of the StarTeam view specified the user as of the date specified in the parameter.
public  booleanisForced()
     Get the value of forced.
public  booleanisPreloadFileInformation()
     Get the value of preloadFileInformation.
public  booleanisRecursive()
     Get the value of recursive.
protected  booleanisUsingRevisionLabel()
     returns true if a label has been specified and it is a revision label.
protected  booleanisUsingViewLabel()
     returns true if a label has been specified and it is a view label.
protected  voidlogAsOfDate()
    
protected  voidlogExcludes()
    
protected  voidlogIncludes()
    
protected  voidlogLabel()
     show the label in the log and its type.
abstract protected  voidlogOperationDescription(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  booleanmatchPatterns(String patterns, String pName)
     Convenience method to see if a string match a one pattern in given set of space-separated patterns.
Parameters:
  patterns - the space-separated list of patterns.
Parameters:
  pName - the name to look for matching.
public  voidsetExcludes(String excludes)
     Declare files to exclude using standard excludes patterns; optional. When filtering files, AntStarTeamCheckOut uses an unmodified version of DirectoryScanner's match method, so here are the patterns straight from the Ant source code:
Matches a string against a pattern.
public  voidsetForced(boolean v)
     Flag to force actions regardless of the status that StarTeam is maintaining for the file; optional, default false.
public  voidsetIncludes(String includes)
     Declare files to include using standard includes patterns; optional.
Parameters:
  includes - A string of filter patterns to include.
public  voidsetPreloadFileInformation(boolean v)
     Flag to set to preload file information from the server; optional, default true.
public  voidsetRecursive(boolean v)
     Flag to set to include files in subfolders in the operation; optional, default true.
public  voidsetRootLocalFolder(String rootLocalFolder)
     Set the local folder that will be the root of the tree to which files are checked out; optional.
public  voidsetRootStarteamFolder(String rootStarteamFolder)
     Set the root of the subtree in the StarTeam repository from which to work; optional.
protected  booleanshouldProcess(String pName)
     Look if the file should be processed by the task. Don't process it if it fits no include filters or if it fits an exclude filter.
Parameters:
  pName - the item name to look for being included.
abstract protected  voidtestPreconditions()
     Derived classes must override this method to define tests for any preconditons required by the task.
abstract protected  voidvisit(Folder rootStarteamFolder, java.io.File rootLocalFolder)
    

Field Detail
DEFAULT_EXCLUDESETTING
final public static String DEFAULT_EXCLUDESETTING(Code)
This disables the exclude filter by default. In other words, no files are excluded. This setting is equivalent to setExcludes(null).
See Also:   TreeBasedTask.getExcludes()
See Also:   TreeBasedTask.setExcludes(String excludes)



DEFAULT_INCLUDESETTING
final public static String DEFAULT_INCLUDESETTING(Code)
This constant sets the filter to include all files. This default has the same result as setIncludes("*").
See Also:   TreeBasedTask.getIncludes()
See Also:   TreeBasedTask.setIncludes(String includes)





Method Detail
_setAsOfDate
protected void _setAsOfDate(String asOfDate)(Code)
non-public method callable only by derived classes that implement setAsOfDate (so that derived tasks that do not accept this parameter will fail if user attempts to use it.
Parameters:
  asOfDate - asOfDate entered by user.
since:
   Ant 1.6



_setAsOfDateFormat
protected void _setAsOfDateFormat(String asOfDateFormat)(Code)
non-public method callable only by derived classes that implement setAsOfDateFormat (so that derived tasks that do not accept this parameter will fail if user attempts to use it.
Parameters:
  asOfDateFormat - asOfDate format entered by user.
since:
   Ant 1.6



_setLabel
protected void _setLabel(String label)(Code)
protected function to allow subclasses to set the label (or not). sets the StarTeam label
Parameters:
  label - name of the StarTeam label to be set



execute
final public void execute() throws BuildException(Code)
This method does the work of opening the supplied Starteam view and calling the visit() method to perform the task. Derived classes can customize the called methods testPreconditions() and visit().
exception:
  BuildException - if any error occurs in the processing
See Also:    testPreconditions()
See Also:    visit()



getAsOfDate
protected String getAsOfDate()(Code)
return the asOfDate entered by the user for internal use by derived classes. the asOfDate entered by the user
since:
   Ant 1.6



getExcludes
public String getExcludes()(Code)
Gets the patterns from the exclude filter. Rather that duplicate the details of AntStarTeanCheckOut's filtering here, refer to these links: A string of filter patterns separated by spaces.
See Also:   TreeBasedTask.setExcludes(String excludes)
See Also:   TreeBasedTask.setIncludes(String includes)
See Also:   TreeBasedTask.getIncludes()



getFullRepositoryPath
public static String getFullRepositoryPath(com.starbase.starteam.File remotefile)(Code)
Return the full repository path name of a file. Surprisingly there's no method in com.starbase.starteam.File to provide this.
Parameters:
  remotefile - the Star Team file whose path is to be returned the full repository path name of a file.



getIDofLabelInUse
protected int getIDofLabelInUse()(Code)
Get the id of the label in use. id of the label in use, if labelinuse is present,otherwise return null



getIncludes
public String getIncludes()(Code)
Gets the patterns from the include filter. Rather that duplicate the details of AntStarTeamCheckOut's filtering here, refer to these links: A string of filter patterns separated by spaces.
See Also:   TreeBasedTask.setIncludes(String includes)
See Also:   TreeBasedTask.setExcludes(String excludes)
See Also:   TreeBasedTask.getExcludes()



getLabel
protected String getLabel()(Code)
return the label passed to the task by the user as a string the label passed to the task by the user as a string



getLabelID
protected int getLabelID(View v) throws BuildException(Code)
Helper method calls on the StarTeam API to retrieve an ID number for the specified view, corresponding to this.label.
Parameters:
  v - the View in which to search for this.label the ID number corresponding to this.label or -1 ifno label was provided.
exception:
  BuildException - if this.label does not correspondto any label in the supplied view



getLabelInUse
protected Label getLabelInUse()(Code)
returns the label being used the label being used



getRootLocalFolder
public String getRootLocalFolder()(Code)
Returns the local folder specified by the user, corresponding to the starteam folder for this operation or null if not specified. the local folder that mirrors this.rootStarteamFolder



getRootStarteamFolder
public String getRootStarteamFolder()(Code)
returns the root folder in the Starteam repository used for this operation the root folder in use



getViewConfiguredByDate
protected View getViewConfiguredByDate(View raw) throws BuildException(Code)
If an asofDate parameter has been supplied by the user return a StarTeam view based on the configuration of the StarTeam view specified the user as of the date specified in the parameter. If no asofDate has been specified, return null. This method is meant to be called from within implementations of the createSnapshotView abstract method.
Parameters:
  raw - the raw view to be configured as of the supplied date the view as configured.
exception:
  BuildException - thrown if the date is not parsable by the default orsupplied format patterns.
since:
   Ant 1.6



isForced
public boolean isForced()(Code)
Get the value of forced. value of forced.



isPreloadFileInformation
public boolean isPreloadFileInformation()(Code)
Get the value of preloadFileInformation. value of preloadFileInformation.



isRecursive
public boolean isRecursive()(Code)
Get the value of recursive. value of recursive.



isUsingRevisionLabel
protected boolean isUsingRevisionLabel()(Code)
returns true if a label has been specified and it is a revision label. true if a label has been specified and it is a revision label



isUsingViewLabel
protected boolean isUsingViewLabel()(Code)
returns true if a label has been specified and it is a view label. true if a label has been specified and it is a view label



logAsOfDate
protected void logAsOfDate()(Code)
show the asofDate in the log
since:
   Ant 1.6



logExcludes
protected void logExcludes()(Code)
if excludes have been specified, emit the list to the log



logIncludes
protected void logIncludes()(Code)
if excludes have been specified, emit the list to the log



logLabel
protected void logLabel()(Code)
show the label in the log and its type.



logOperationDescription
abstract protected void logOperationDescription(Folder starteamrootFolder, java.io.File targetrootFolder)(Code)
extenders should 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
Parameters:
  targetrootFolder - root local folder for the operation (whether specified by the user or not.



matchPatterns
protected boolean matchPatterns(String patterns, String pName)(Code)
Convenience method to see if a string match a one pattern in given set of space-separated patterns.
Parameters:
  patterns - the space-separated list of patterns.
Parameters:
  pName - the name to look for matching. whether the name match at least one pattern.



setExcludes
public void setExcludes(String excludes)(Code)
Declare files to exclude using standard excludes patterns; optional. When filtering files, AntStarTeamCheckOut uses an unmodified version of DirectoryScanner's match method, so here are the patterns straight from the Ant source code:
Matches a string against a pattern. The pattern contains two special characters:
'*' which means zero or more characters,
'?' which means one and only one character.
For example, if you want to check out all files except .XML and .HTML files, you would put the following line in your program: 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.
Treatment of overlapping inlcudes and excludes: To give a simplistic example suppose that you set your include filter to "*.htm *.html" and your exclude filter to "index.*". What happens to index.html? AntStarTeamCheckOut will not check out index.html, as it matches an exclude filter ("index.*"), even though it matches the include filter, as well.
Please also read the following sections before using filters:
Parameters:
  excludes - A string of filter patterns to exclude. Separate thepatterns by spaces.
See Also:   TreeBasedTask.setIncludes(String includes)
See Also:   TreeBasedTask.getIncludes()
See Also:   TreeBasedTask.getExcludes()



setForced
public void setForced(boolean v)(Code)
Flag to force actions regardless of the status that StarTeam is maintaining for the file; optional, default false. If rootlocalfolder is set then this should be set "true" as otherwise the checkout will be based on statuses which do not relate to the target folder.
Parameters:
  v - Value to assign to forced.



setIncludes
public void setIncludes(String includes)(Code)
Declare files to include using standard includes patterns; optional.
Parameters:
  includes - A string of filter patterns to include. Separate thepatterns by spaces.
See Also:   TreeBasedTask.getIncludes()
See Also:   TreeBasedTask.setExcludes(String excludes)
See Also:   TreeBasedTask.getExcludes()



setPreloadFileInformation
public void setPreloadFileInformation(boolean v)(Code)
Flag to set to preload file information from the server; optional, default true. Increases performance significantly for projects with many files and/or folders.
Parameters:
  v - Value to assign to preloadFileInformation.



setRecursive
public void setRecursive(boolean v)(Code)
Flag to set to include files in subfolders in the operation; optional, default true.
Parameters:
  v - Value to assign to recursive.



setRootLocalFolder
public void setRootLocalFolder(String rootLocalFolder)(Code)
Set the local folder that will be the root of the tree to which files are checked out; optional. If this is not supplied, then the StarTeam "default folder" associated with rootstarteamfolder is used.
Parameters:
  rootLocalFolder - the local folder that will mirrorthis.rootStarteamFolder



setRootStarteamFolder
public void setRootStarteamFolder(String rootStarteamFolder)(Code)
Set the root of the subtree in the StarTeam repository from which to work; optional. Defaults to the root folder of the view ('/').
Parameters:
  rootStarteamFolder - the root folder



shouldProcess
protected boolean shouldProcess(String pName)(Code)
Look if the file should be processed by the task. Don't process it if it fits no include filters or if it fits an exclude filter.
Parameters:
  pName - the item name to look for being included. whether the file should be processed or not.



testPreconditions
abstract protected void testPreconditions() throws BuildException(Code)
Derived classes must override this method to define tests for any preconditons required by the task. This method is called at the beginning of the execute() method.
exception:
  BuildException - throw if any fatal error exists in theparameters supplied. If there is a non-fatal condition, just writingto the log may be appropriate.
See Also:    execute()



visit
abstract protected void visit(Folder rootStarteamFolder, java.io.File rootLocalFolder) throws BuildException(Code)
Derived classes must override this class to define actual processing to be performed on each folder in the tree defined for the task
Parameters:
  rootStarteamFolder - the StarTeam folderto be visited
Parameters:
  rootLocalFolder - the local mapping of rootStarteamFolder
throws:
  BuildException - on error



Methods inherited from org.apache.tools.ant.taskdefs.optional.starteam.StarTeamTask
abstract protected View createSnapshotView(View rawview) throws BuildException(Code)(Java Doc)
final protected void disconnectFromServer()(Code)(Java Doc)
final public String getPassword()(Code)(Java Doc)
final public String getProjectname()(Code)(Java Doc)
final protected Server getServer()(Code)(Java Doc)
final public String getServername()(Code)(Java Doc)
final public String getServerport()(Code)(Java Doc)
final protected TypeNames getTypeNames()(Code)(Java Doc)
final public String getURL()(Code)(Java Doc)
final public String getUserName()(Code)(Java Doc)
final protected String getUserName(int userID)(Code)(Java Doc)
final protected String getViewURL()(Code)(Java Doc)
final public String getViewname()(Code)(Java Doc)
protected View openView() throws BuildException(Code)(Java Doc)
final public void setPassword(String password)(Code)(Java Doc)
final public void setProjectname(String projectname)(Code)(Java Doc)
final public void setServername(String servername)(Code)(Java Doc)
final public void setServerport(String serverport)(Code)(Java Doc)
final public void setURL(String url)(Code)(Java Doc)
final public void setUserName(String userName)(Code)(Java Doc)
final public void setViewname(String viewname)(Code)(Java Doc)

w_w_w__.jav_a2__s___._c__o__m__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.