Java Doc for BasicCommand.java in  » IDE-Netbeans » cvsclient » org » netbeans » lib » cvsclient » command » 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 » IDE Netbeans » cvsclient » org.netbeans.lib.cvsclient.command 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.netbeans.lib.cvsclient.command.Command
      org.netbeans.lib.cvsclient.command.BuildableCommand
         org.netbeans.lib.cvsclient.command.BasicCommand

All known Subclasses:   org.netbeans.lib.cvsclient.command.annotate.RannotateCommand,  org.netbeans.lib.cvsclient.command.diff.DiffCommand,  org.netbeans.lib.cvsclient.command.watchers.WatchersCommand,  org.netbeans.lib.cvsclient.command.edit.EditCommand,  org.netbeans.lib.cvsclient.command.unedit.UneditCommand,  org.netbeans.lib.cvsclient.command.annotate.AnnotateCommand,  org.netbeans.lib.cvsclient.command.commit.CommitCommand,  org.netbeans.lib.cvsclient.command.tag.TagCommand,  org.netbeans.lib.cvsclient.command.watch.WatchCommand,  org.netbeans.lib.cvsclient.command.status.StatusCommand,  org.netbeans.lib.cvsclient.command.log.LogCommand,  org.netbeans.lib.cvsclient.command.remove.RemoveCommand,  org.netbeans.lib.cvsclient.command.checkout.CheckoutCommand,  org.netbeans.lib.cvsclient.command.update.UpdateCommand,  org.netbeans.lib.cvsclient.command.log.RlogCommand,  org.netbeans.lib.cvsclient.command.editors.EditorsCommand,
BasicCommand
abstract public class BasicCommand extends BuildableCommand (Code)
A class that provides common functionality for many of the CVS command that send similar sequences of requests.
author:
   Robert Greig


Field Summary
protected  ClientServicesclientServices
     The client services that are provided to this command.
protected  File[]files
     The files and/or directories to operate on.
protected  Listrequests
     The requests that are sent and processed.


Method Summary
final protected  voidaddArgumentRequest(boolean value, String argument)
     If the specified value is true, add a ArgumentRequest for the specified argument.
protected  voidaddArgumentRequests()
     Add the argument requests.
final protected  voidaddDirectoryRequest(File directory)
     Adds a DirectoryRequest (and maybe a StickyRequest) to the request list.
final protected  voidaddRequest(Request request)
     Adds the specified request to the request list.
protected  voidaddRequestForFile(File file, Entry entry)
     This method is called for each explicit file and for files within a directory.
final protected  voidaddRequestForWorkingDirectory(ClientServices clientServices)
     Adds the request for the current working directory.
protected  voidaddRequestsForDirectory(File directory)
     Adds the appropriate requests for a given directory.
protected  voidaddRequestsForFile(File file)
     Add the appropriate requests for a single file.
final protected  voidappendFileArguments(StringBuffer buffer)
     Appends the file's names to the specified buffer.
protected  booleanassumeLocalPathWhenUnspecified()
     The result from this command is used only when the getFiles() returns null or empty array. in such a case and when this method returns true, it is assumed the localpath should be taken as the 'default' file for the building of requests. Generally assumed to be true.
protected  booleandoesCheckFileTime()
     Should return true if unchanged files should not be sent to server.
public  voidexecute(ClientServices client, EventManager em)
     Execute a command.
public  FilegetFileEndingWith(String ending)
    
Parameters:
  ending - - the ending part of the file's pathname..
public  File[]getFiles()
     Get the files and/or directories specified for this command to operate on.
public  booleangetRecursive()
     Gets the value of the recursive option.
public  FilegetXthFile(int index)
     Get a single file from the "files" list.
public  booleanisRecursive()
     Gets the value of the recursive option.
protected  voidsendEntryAndModifiedRequests(Entry entry, File file)
     Send an Entry followed by a Modified or Unchanged request based on whether the file has been untouched on the local machine.
public  voidsetFiles(File[] theFiles)
     Set the files and/or directories on which to execute the command. The way these are processed is:

  • Default action (i.e.
public  voidsetRecursive(boolean recursive)
     Sets the value of the recursive option.

Field Detail
clientServices
protected ClientServices clientServices(Code)
The client services that are provided to this command.



files
protected File[] files(Code)
The files and/or directories to operate on.



requests
protected List requests(Code)
The requests that are sent and processed.





Method Detail
addArgumentRequest
final protected void addArgumentRequest(boolean value, String argument)(Code)
If the specified value is true, add a ArgumentRequest for the specified argument.



addArgumentRequests
protected void addArgumentRequests()(Code)
Add the argument requests. The argument requests are created using the original set of files/directories passed in. Subclasses of this class should call this method at the appropriate point in their execute() method. Note that arguments are appended to the list.



addDirectoryRequest
final protected void addDirectoryRequest(File directory)(Code)
Adds a DirectoryRequest (and maybe a StickyRequest) to the request list.



addRequest
final protected void addRequest(Request request)(Code)
Adds the specified request to the request list.



addRequestForFile
protected void addRequestForFile(File file, Entry entry)(Code)
This method is called for each explicit file and for files within a directory.



addRequestForWorkingDirectory
final protected void addRequestForWorkingDirectory(ClientServices clientServices) throws IOException(Code)
Adds the request for the current working directory.



addRequestsForDirectory
protected void addRequestsForDirectory(File directory) throws IOException, CommandAbortedException(Code)
Adds the appropriate requests for a given directory. Sends a directory request followed by as many Entry and Modified requests as required
Parameters:
  directory - the directory to send requests for
throws:
  IOException - if an error occurs constructing the requests



addRequestsForFile
protected void addRequestsForFile(File file) throws IOException(Code)
Add the appropriate requests for a single file. A directory request is sent, followed by an Entry and Modified request
Parameters:
  file - the file to send requests for
throws:
  IOException - if an error occurs constructing the requests



appendFileArguments
final protected void appendFileArguments(StringBuffer buffer)(Code)
Appends the file's names to the specified buffer.



assumeLocalPathWhenUnspecified
protected boolean assumeLocalPathWhenUnspecified()(Code)
The result from this command is used only when the getFiles() returns null or empty array. in such a case and when this method returns true, it is assumed the localpath should be taken as the 'default' file for the building of requests. Generally assumed to be true. Can be overriden by subclasses. However make sure you know what you are doing. :)



doesCheckFileTime
protected boolean doesCheckFileTime()(Code)
Should return true if unchanged files should not be sent to server. If false is returned, all files will be sent to server This method is used by sendEntryAndModifiedRequests.



execute
public void execute(ClientServices client, EventManager em) throws CommandException, AuthenticationException(Code)
Execute a command. This implementation sends a Root request, followed by as many Directory and Entry requests as is required by the recurse setting and the file arguments that have been set. Subclasses should call this first, and tag on the end of the requests list any further requests and, finally, the actually request that does the command (e.g.
update
,
status
etc.)
Parameters:
  client - the client services object that provides any necessaryservices to this command, including the ability to actually processall the requests
throws:
  CommandException - if an error occurs executing the command



getFileEndingWith
public File getFileEndingWith(String ending)(Code)

Parameters:
  ending - - the ending part of the file's pathname.. path separator is cvs's default '/'



getFiles
public File[] getFiles()(Code)
Get the files and/or directories specified for this command to operate on. the array of Files



getRecursive
public boolean getRecursive()(Code)
Gets the value of the recursive option. true if recursive, false if not



getXthFile
public File getXthFile(int index)(Code)
Get a single file from the "files" list. returns only files, not directories. This method is used from within the builders, because for single file requests, the cvs server doesn't return us enough information to identify what file has been returned. Thus we sort the "files" array (files come before directories. Then the response froms erver comes in the same order and the files can be found this way.
Parameters:
  index - the index of the file in the list.



isRecursive
public boolean isRecursive()(Code)
Gets the value of the recursive option. true if recursive, false if not



sendEntryAndModifiedRequests
protected void sendEntryAndModifiedRequests(Entry entry, File file)(Code)
Send an Entry followed by a Modified or Unchanged request based on whether the file has been untouched on the local machine.
Parameters:
  entry - the entry for the file
Parameters:
  file - the file in question



setFiles
public void setFiles(File[] theFiles)(Code)
Set the files and/or directories on which to execute the command. The way these are processed is:

  • Default action (i.e. not setting the files explicitly or setting them to
    null
    ) is to use the directory in which the command was executed (see how directories are treated, below)
  • Files are handled how you would expect
  • For directories, all files within the directory are sent

Parameters:
  theFiles - the files to operate on. May be null to indicate that thelocal directory specified in the client should be used. Full, absolutecanonical pathnames must be supplied.



setRecursive
public void setRecursive(boolean recursive)(Code)
Sets the value of the recursive option.
Parameters:
  recursive - true if the command should recurse, false otherwise



Fields inherited from org.netbeans.lib.cvsclient.command.BuildableCommand
protected Builder builder(Code)(Java Doc)

Methods inherited from org.netbeans.lib.cvsclient.command.BuildableCommand
public void commandTerminated(TerminationEvent e)(Code)(Java Doc)
public Builder createBuilder(EventManager eventManager)(Code)(Java Doc)
public void execute(ClientServices client, EventManager eventManager) throws CommandException, AuthenticationException(Code)(Java Doc)
protected boolean isBuilderSet()(Code)(Java Doc)
public void messageSent(BinaryMessageEvent e)(Code)(Java Doc)
public void messageSent(MessageEvent e)(Code)(Java Doc)
public void setBuilder(Builder builder)(Code)(Java Doc)

Fields inherited from org.netbeans.lib.cvsclient.command.Command
protected String localDirectory(Code)(Java Doc)

Methods inherited from org.netbeans.lib.cvsclient.command.Command
public Object clone()(Code)(Java Doc)
public void commandTerminated(TerminationEvent e)(Code)(Java Doc)
public void execute(ClientServices client, EventManager eventManager) throws CommandException, CommandAbortedException, AuthenticationException(Code)(Java Doc)
public void fileAdded(FileAddedEvent e)(Code)(Java Doc)
public void fileInfoGenerated(FileInfoEvent e)(Code)(Java Doc)
public void fileRemoved(FileRemovedEvent e)(Code)(Java Doc)
public void fileToRemove(FileToRemoveEvent e)(Code)(Java Doc)
public void fileUpdated(FileUpdatedEvent e)(Code)(Java Doc)
abstract public String getCVSArguments()(Code)(Java Doc)
abstract public String getCVSCommand()(Code)(Java Doc)
public String getDisplayName()(Code)(Java Doc)
final public GlobalOptions getGlobalOptions()(Code)(Java Doc)
final public String getLocalDirectory()(Code)(Java Doc)
final public String getLocalPath()(Code)(Java Doc)
abstract public String getOptString()(Code)(Java Doc)
final public String getRelativeToLocalPathInUnixStyle(File file)(Code)(Java Doc)
final protected static String getTrimmedString(String s)(Code)(Java Doc)
public boolean hasFailed()(Code)(Java Doc)
public void messageSent(MessageEvent e)(Code)(Java Doc)
public void messageSent(BinaryMessageEvent e)(Code)(Java Doc)
public void moduleExpanded(ModuleExpansionEvent e)(Code)(Java Doc)
abstract public void resetCVSCommand()(Code)(Java Doc)
abstract public boolean setCVSCommand(char opt, String optArg)(Code)(Java Doc)
public void setDisplayName(String name)(Code)(Java Doc)
final protected void setLocalDirectory(String localDirectory)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.