com.starbase.starteam.commandline
Class StarTeamCmd

java.lang.Object
  |
  +--com.starbase.starteam.commandline.StarTeamCmd

public class StarTeamCmd
extends java.lang.Object

The main class implementing the StarTeam commandline.


Constructor Summary
StarTeamCmd()
          StarTeamCmd can be extended, or an application may register for events directly off this object
 
Method Summary
 void addListener(IListener listener)
          Add a listener for events triggered by the command line Events will be fired whenever the appropriate command line actions are executed
static void main(java.lang.String[] args)
          The main entry point for the commandline.
 void removeListener(IListener listener)
          Remove a listener (i.e.
static int run(java.lang.String[] args)
          Same functionality as main but returns an error code instead of calling System.exit.
 int runCommandLine(java.lang.String[] args)
          A mechanism to allow an Aplication Developer to create a StarTeamCmd-derived class, and implement its main method e.g.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StarTeamCmd

public StarTeamCmd()
StarTeamCmd can be extended, or an application may register for events directly off this object

Method Detail

main

public static void main(java.lang.String[] args)
The main entry point for the commandline. See the StarTeam user's guide for commandline specifications. This will call System.exit when finished so you will not want to use this method if you plan to make other calls. Use run instead.

Parameters:
args - arguments to the commandline

run

public static int run(java.lang.String[] args)
Same functionality as main but returns an error code instead of calling System.exit. It also catches and prints any error to standard error (System.err).

Parameters:
args - arguments to the commandline
Returns:
an error code. 0 = no errors, 1 = errors occured. Some commands may have other return codes indicating status.

runCommandLine

public int runCommandLine(java.lang.String[] args)
A mechanism to allow an Aplication Developer to create a StarTeamCmd-derived class, and implement its main method e.g. public class MyStarTeamCmd extends StarTeamCmd { public static void main(String[] args) { System.exit(new MyStarTeamCmd().runCommandLine(args)); } }

Parameters:
args - String[] arguments to the commandline
Returns:
int an error code. 0 = no errors, 1 = errors occured. Some commands may have other return codes indicating status.

addListener

public void addListener(IListener listener)
Add a listener for events triggered by the command line Events will be fired whenever the appropriate command line actions are executed

Parameters:
listener - IListener An application-specific event handler implementation which will handle the events

removeListener

public void removeListener(IListener listener)
Remove a listener (i.e. a previously registered event handler)

Parameters:
listener - IListener The listener to remove


StarTeam SDK 10.4, Build 36
Copyright © 2003-2008 Borland Software Corporation. All rights reserved.