org.netbeans.lib.cvsclient.commandLine.command
Interface CommandProvider

All Known Implementing Classes:
add, annotate, checkout, commit, diff, export, Import, locbundlecheck, log, rannotate, remove, rlog, rtag, status, tag, update

public interface CommandProvider

The provider of CVS commands. The implementation of this interface knows how to create a CVS command from an array of arguments.


Method Summary
 Command createCommand(java.lang.String[] args, int index, GlobalOptions gopt, java.lang.String workDir)
          Create the CVS command from an array of arguments.
 java.lang.String getName()
          Get the name of this command.
 java.lang.String[] getSynonyms()
          Get the list of synonyms of names of this command.
 java.lang.String getUsage()
          Get a short string describibg the usage of the command.
 void printLongDescription(java.io.PrintStream out)
          Print a long help description (multi-line with all supported switches and their description) of this command to the provided print stream.
 void printShortDescription(java.io.PrintStream out)
          Print a short help description (one-line only) for this command to the provided print stream.
 

Method Detail

getName

java.lang.String getName()
Get the name of this command. The default implementation returns the name of the implementing class.


getSynonyms

java.lang.String[] getSynonyms()
Get the list of synonyms of names of this command.


createCommand

Command createCommand(java.lang.String[] args,
                      int index,
                      GlobalOptions gopt,
                      java.lang.String workDir)
Create the CVS command from an array of arguments.

Parameters:
args - The array of arguments passed to the command.
index - The index in the array where the command's arguments start.
workDir - The working directory.
Returns:
The implementation of the Command class, which have set the passed arguments.

getUsage

java.lang.String getUsage()
Get a short string describibg the usage of the command.


printShortDescription

void printShortDescription(java.io.PrintStream out)
Print a short help description (one-line only) for this command to the provided print stream.

Parameters:
out - The print stream.

printLongDescription

void printLongDescription(java.io.PrintStream out)
Print a long help description (multi-line with all supported switches and their description) of this command to the provided print stream.

Parameters:
out - The print stream.

 

Built on August 7 2008.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.