org.sourcejammer.client.ant
Class SJCommandProcessor

java.lang.Object
  |
  +--org.sourcejammer.client.ant.SJCommandProcessor

public class SJCommandProcessor
extends java.lang.Object

This class acts as a wrapper to the SourceJammer commandline interface. It implements only those commands needed to issue the getproj commandline command.


Field Summary
private  java.lang.String configPath
          Contains the path to the Configuration XML file
private  java.lang.String serverURL
          Contains the URL string to the SourceJammer server
private  org.sourcejammer.client.commandline.CommandLineInterpreter sjInterpreter
          Contains a ref to the SourceJammer command line interpreter.
 
Constructor Summary
SJCommandProcessor(java.lang.String serverURL, java.lang.String configPath)
          constructor.
 
Method Summary
 java.lang.String sjCommandInitialize()
          Initialize the SourceJammer commandline environment.
 java.lang.String sjConCommand(java.lang.String userid, java.lang.String password, java.lang.String archive)
          Calls the SourceJammer con command with the specified parms.
 java.lang.String sjDisconCommand()
          Calls the SourceJammer discon command.
 java.lang.String sjGetProjCommand(java.lang.String project, boolean recurse, boolean mkdir, boolean vfyChkIn)
          Calls the SourceJammer getproj command with the specified parms.
 java.lang.String sjQuitCommand()
          Calls the SourceJammer quit command with the specified parms.
 java.lang.String sjSetLocalDirCommand(java.lang.String destinationPath)
          Calls the SourceJammer lcd command with the specified parms.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serverURL

private java.lang.String serverURL
Contains the URL string to the SourceJammer server


configPath

private java.lang.String configPath
Contains the path to the Configuration XML file


sjInterpreter

private org.sourcejammer.client.commandline.CommandLineInterpreter sjInterpreter
Contains a ref to the SourceJammer command line interpreter.

Constructor Detail

SJCommandProcessor

public SJCommandProcessor(java.lang.String serverURL,
                          java.lang.String configPath)
constructor. Saves the given information for later

Parameters:
serverURL - Ref to the ServerURL
configPath - Ref to the coniguration XML file path
Method Detail

sjCommandInitialize

public java.lang.String sjCommandInitialize()
                                     throws SourceJammerCommandException
Initialize the SourceJammer commandline environment.

Returns:
StringBuffer of initialization response (if any)
Throws:
SourceJammerCommandException - Thrown if there is a problem during initilization

sjConCommand

public java.lang.String sjConCommand(java.lang.String userid,
                                     java.lang.String password,
                                     java.lang.String archive)
                              throws SourceJammerCommandException
Calls the SourceJammer con command with the specified parms.

Parameters:
userid - Ref to userid string
password - Ref to password string
archive - Ref to Archive string
Returns:
StringBuffer of command response (if any)
Throws:
SourceJammerCommandException - Thrown if there is a problem processing the command

sjSetLocalDirCommand

public java.lang.String sjSetLocalDirCommand(java.lang.String destinationPath)
                                      throws SourceJammerCommandException
Calls the SourceJammer lcd command with the specified parms.

Parameters:
destinationPath - Ref to destination path string
Returns:
StringBuffer of command response (if any)
Throws:
SourceJammerCommandException - Thrown if there is a problem processing the command

sjGetProjCommand

public java.lang.String sjGetProjCommand(java.lang.String project,
                                         boolean recurse,
                                         boolean mkdir,
                                         boolean vfyChkIn)
                                  throws SourceJammerCommandException
Calls the SourceJammer getproj command with the specified parms.

Parameters:
project - Ref to project path string
recurse - recurse project flag
mkdir - make directories flag
Returns:
StringBuffer of command response (if any)
Throws:
SourceJammerCommandException - Thrown if there is a problem processing the command

sjDisconCommand

public java.lang.String sjDisconCommand()
                                 throws SourceJammerCommandException
Calls the SourceJammer discon command.

Returns:
StringBuffer of command response (if any)
Throws:
SourceJammerCommandException - Thrown if there is a problem processing the command

sjQuitCommand

public java.lang.String sjQuitCommand()
                               throws SourceJammerCommandException
Calls the SourceJammer quit command with the specified parms.

Returns:
StringBuffer of command response (if any)
Throws:
SourceJammerCommandException - Thrown if there is a problem processing the command


Copyright © 2003 Soucejammer project.