org.netbeans.lib.cvsclient.commandLine
Class CVSCommand

java.lang.Object
  extended by org.netbeans.lib.cvsclient.commandLine.CVSCommand

public class CVSCommand
extends java.lang.Object

An implementation of the standard CVS client utility (command line tool) in Java


Constructor Summary
CVSCommand()
           
 
Method Summary
 boolean executeCommand(Command command, java.io.PrintStream stderr)
          Execute a configured CVS command
static void main(java.lang.String[] args)
          Execute the CVS command and exit JVM.
static boolean processCommand(java.lang.String[] args, java.io.File[] files, java.lang.String localPath, int port, java.io.PrintStream stdout, java.io.PrintStream stderr)
          Process the CVS command passed in args[] array with all necessary options.
static boolean processCommand(java.lang.String[] args, java.io.File[] files, java.lang.String localPath, java.io.PrintStream stdout, java.io.PrintStream stderr)
          Process the CVS command passed in args[] array with all necessary options.
 void setGlobalOptions(GlobalOptions globalOptions)
           
 void setLocalPath(java.lang.String localPath)
           
 void setRepository(java.lang.String repository)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CVSCommand

public CVSCommand()
Method Detail

executeCommand

public boolean executeCommand(Command command,
                              java.io.PrintStream stderr)
                       throws CommandException,
                              AuthenticationException
Execute a configured CVS command

Parameters:
command - the command to execute
Throws:
CommandException - if there is an error running the command
AuthenticationException

setRepository

public void setRepository(java.lang.String repository)

setLocalPath

public void setLocalPath(java.lang.String localPath)

setGlobalOptions

public void setGlobalOptions(GlobalOptions globalOptions)

main

public static void main(java.lang.String[] args)
Execute the CVS command and exit JVM.


processCommand

public static boolean processCommand(java.lang.String[] args,
                                     java.io.File[] files,
                                     java.lang.String localPath,
                                     java.io.PrintStream stdout,
                                     java.io.PrintStream stderr)
Process the CVS command passed in args[] array with all necessary options. The only difference from main() method is, that this method does not exit the JVM and provides command output.

Parameters:
args - The command with options
files - The files to execute the command on.
localPath - The local working directory
stdout - The standard output of the command
stderr - The error output of the command.

processCommand

public static boolean processCommand(java.lang.String[] args,
                                     java.io.File[] files,
                                     java.lang.String localPath,
                                     int port,
                                     java.io.PrintStream stdout,
                                     java.io.PrintStream stderr)
Process the CVS command passed in args[] array with all necessary options. The only difference from main() method is, that this method does not exit the JVM and provides command output.

Parameters:
args - The command with options
files - The files to execute the command on.
localPath - The local working directory
port - The port number that is used to connect to the remote server. It is taken into account only when it's value is greater then zero.
stdout - The standard output of the command
stderr - The error output of the command.
Returns:
whether the command was processed successfully

 

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