Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.klavergne.cc
Class ClearCaseConnection  view ClearCaseConnection download ClearCaseConnection.java

java.lang.Object
  extended bycom.klavergne.cc.ClearCaseConnection

public class ClearCaseConnection
extends java.lang.Object

This class is a connection to the ClearCase command line tools. It can be used from any other class that wants to execute ClearCase commands.

Version:
1.0

Field Summary
private static boolean clearCaseAvailable
          A boolean value indicating whether ClearCase is installed and available.
private static java.lang.String CLEARDLG_CHECKIN
          The command line argument for cleardlg to check in a file.
private static java.lang.String CLEARDLG_CHECKOUT
          The command line argument for cleardlg to check out a file.
private static java.lang.String CLEARDLG_COMMAND
          The cleardlg ClearCase command.
private static java.lang.String CLEARDLG_DIFF_PREV
          The command line argument for cleardlg to display the differences between the current and previous versions of a file.
private static java.lang.String CLEARDLG_UNCHECKOUT
          The command line argument for cleardlg to uncheck out a file.
private static java.lang.String CLEARTOOL_COMMAND
          The cleartool ClearCase command.
private static java.lang.String CLEARTOOL_HISTORY
          The command line argument for cleartool to display the history.
private static java.lang.String CLEARTOOL_LIST_ACTIVITY
          The command line argument for cleartool to list activities.
private static java.lang.String CLEARTOOL_LSCHECKOUT
          The command line argument for cleartool to list checkouts.
private static java.lang.String CLEARTOOL_SET_ACTIVITY
          The command line argument for cleartool to set the current activity.
private static java.lang.String CLEARTOOL_VERSION
          The command line argument for cleartool to display the version.
private static java.lang.String CLEARTOOL_VERSION_TREE
          The command line argument for cleartool to display the version tree.
private static boolean debug
          A boolean value indicating whether the class is in debug mode.
private static java.lang.String DETAILS_COMMAND
          The ClearCase Details command.
private static java.lang.String EMPTY_STRING
          An empty String ""
private static int exitStatus
          The exit status returned from the previous execute.
private static java.lang.String FIND_CHECKOUTS_COMMAND
          The ClearCase command to find checkouts.
private static java.lang.String HISTORY_COMMAND
          The ClearCase command to display a file's history.
private static java.lang.String MERGE_MANAGER_COMMAND
          The ClearCase Merge Manager command.
private static com.klavergne.process.SmartProcess proc
          The SmartProcess object that will be executed.
private static java.lang.String stdErr
          The standard err returned from the previous execute.
private static java.lang.String stdOut
          The standard out returned from the previous execute.
private static double version
          The ClearCase version that is installed.
 
Constructor Summary
ClearCaseConnection()
           
 
Method Summary
protected static boolean execute()
          Execute the command.
static int executeAddToSourceControl(java.util.List files)
          Adds the files that are specified to source control.
static int executeAddToSourceControl(java.lang.String file)
          Adds the file that is specified to source control.
static int executeAddToSourceControl(java.lang.String[] files)
          Adds the files that are specified to source control.
static int executeCheckin(java.util.List files)
          Checks in the files that are specified.
static int executeCheckin(java.lang.String file)
          Checks in the file that is specified.
static int executeCheckin(java.lang.String[] files)
          Checks in the files that are specified.
static int executeCheckout(java.util.List files)
          Checks out the files that are specified.
static int executeCheckout(java.lang.String file)
          Checks out the file that is specified.
static int executeCheckout(java.lang.String[] files)
          Checks out the files that are specified.
static boolean executeDetails()
          Displays the ClearCase Details window.
static boolean executeDetails(java.lang.String dir)
          Displays the ClearCase Details window.
static boolean executeDiffPrevious(java.lang.String fileName)
          Compares the current version to the previous version of the specified file.
static boolean executeFindCheckouts(java.lang.String dir)
          Displays all files that are checked out in the current stream.
static boolean executeHistory(java.lang.String fileName)
          Displays the full history log of the specified file.
static boolean executeMergeManager()
          Executes the ClearCase Merge Manager tool.
static boolean executeMergeManager(java.lang.String fileName)
          Executes the ClearCase Merge Manager tool.
protected static boolean executeProcess(java.util.List parameters)
          Execute the given command with command line arguments.
protected static boolean executeProcess(java.util.List parameters, boolean wait)
          Execute the given command with command line arguments.
protected static boolean executeProcess(java.lang.String command)
          Execute the given command.
protected static boolean executeProcess(java.lang.String[] parameters)
          Execute the given command with command line arguments.
protected static boolean executeProcess(java.lang.String[] parameters, boolean wait)
          Execute the given command with command line arguments.
protected static boolean executeProcess(java.lang.String command, boolean wait)
          Execute the given command.
static int executeUndoCheckout(java.util.List files)
          Unchecks out the files that are specified.
static int executeUndoCheckout(java.lang.String file)
          Unchecks out the file that is specified.
static int executeUndoCheckout(java.lang.String[] files)
          Unchecks out the files that are specified.
static boolean executeUserPreferences()
          Displays the ClearCase options dialog box.
static boolean executeVersionTree(java.lang.String fileName)
          Displays a graphical representation of all versions of the specified file.
static boolean getDebug()
          Returns a boolean value indicating whether this class should run in debug mode.
static double getVersion()
          Returns the version number of the ClearCase installation.
static boolean isAddToSourceControlAvailable(java.lang.String fileName)
          Returns a boolean value indicating whether the given file can be added to source control.
static boolean isCheckedOut(java.lang.String fileName)
          Returns a boolean value indicating whether the given file is checked out.
static boolean isClearCaseAvailable()
          Returns a boolean value indicating whether ClearCase is installed and available on the machine where this is being executed.
static boolean isFileUnderSourceControl(java.lang.String fileName)
          Returns a boolean value indicating whether this given file is under ClearCase source control.
private static void logErr(java.lang.Object obj)
          Logs the given Object to the System.err stream.
private static void logOut(java.lang.Object obj)
          Logs the given Object to the System.out stream.
static void setDebug(boolean aDebug)
          Sets a boolean value indicating whether this class should run in debug mode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_STRING

private static final java.lang.String EMPTY_STRING
An empty String ""

See Also:
Constant Field Values

CLEARTOOL_COMMAND

private static final java.lang.String CLEARTOOL_COMMAND
The cleartool ClearCase command.

See Also:
Constant Field Values

CLEARDLG_COMMAND

private static final java.lang.String CLEARDLG_COMMAND
The cleardlg ClearCase command.

See Also:
Constant Field Values

FIND_CHECKOUTS_COMMAND

private static final java.lang.String FIND_CHECKOUTS_COMMAND
The ClearCase command to find checkouts.

See Also:
Constant Field Values

HISTORY_COMMAND

private static final java.lang.String HISTORY_COMMAND
The ClearCase command to display a file's history.

See Also:
Constant Field Values

MERGE_MANAGER_COMMAND

private static final java.lang.String MERGE_MANAGER_COMMAND
The ClearCase Merge Manager command.

See Also:
Constant Field Values

DETAILS_COMMAND

private static final java.lang.String DETAILS_COMMAND
The ClearCase Details command.

See Also:
Constant Field Values

CLEARTOOL_VERSION

private static final java.lang.String CLEARTOOL_VERSION
The command line argument for cleartool to display the version.

See Also:
Constant Field Values

CLEARTOOL_VERSION_TREE

private static final java.lang.String CLEARTOOL_VERSION_TREE
The command line argument for cleartool to display the version tree.

See Also:
Constant Field Values

CLEARTOOL_HISTORY

private static final java.lang.String CLEARTOOL_HISTORY
The command line argument for cleartool to display the history.

See Also:
Constant Field Values

CLEARTOOL_LSCHECKOUT

private static final java.lang.String CLEARTOOL_LSCHECKOUT
The command line argument for cleartool to list checkouts.

See Also:
Constant Field Values

CLEARTOOL_LIST_ACTIVITY

private static final java.lang.String CLEARTOOL_LIST_ACTIVITY
The command line argument for cleartool to list activities.

See Also:
Constant Field Values

CLEARTOOL_SET_ACTIVITY

private static final java.lang.String CLEARTOOL_SET_ACTIVITY
The command line argument for cleartool to set the current activity.

See Also:
Constant Field Values

CLEARDLG_CHECKOUT

private static final java.lang.String CLEARDLG_CHECKOUT
The command line argument for cleardlg to check out a file.

See Also:
Constant Field Values

CLEARDLG_CHECKIN

private static final java.lang.String CLEARDLG_CHECKIN
The command line argument for cleardlg to check in a file.

See Also:
Constant Field Values

CLEARDLG_UNCHECKOUT

private static final java.lang.String CLEARDLG_UNCHECKOUT
The command line argument for cleardlg to uncheck out a file.

See Also:
Constant Field Values

CLEARDLG_DIFF_PREV

private static final java.lang.String CLEARDLG_DIFF_PREV
The command line argument for cleardlg to display the differences between the current and previous versions of a file.

See Also:
Constant Field Values

debug

private static boolean debug
A boolean value indicating whether the class is in debug mode.


clearCaseAvailable

private static boolean clearCaseAvailable
A boolean value indicating whether ClearCase is installed and available.


version

private static double version
The ClearCase version that is installed.


proc

private static com.klavergne.process.SmartProcess proc
The SmartProcess object that will be executed.


stdOut

private static java.lang.String stdOut
The standard out returned from the previous execute.


stdErr

private static java.lang.String stdErr
The standard err returned from the previous execute.


exitStatus

private static int exitStatus
The exit status returned from the previous execute.

Constructor Detail

ClearCaseConnection

public ClearCaseConnection()
Method Detail

isClearCaseAvailable

public static boolean isClearCaseAvailable()
Returns a boolean value indicating whether ClearCase is installed and available on the machine where this is being executed.


getVersion

public static double getVersion()
Returns the version number of the ClearCase installation.


getDebug

public static boolean getDebug()
Returns a boolean value indicating whether this class should run in debug mode.


setDebug

public static void setDebug(boolean aDebug)
Sets a boolean value indicating whether this class should run in debug mode.


isFileUnderSourceControl

public static boolean isFileUnderSourceControl(java.lang.String fileName)
Returns a boolean value indicating whether this given file is under ClearCase source control.


isAddToSourceControlAvailable

public static boolean isAddToSourceControlAvailable(java.lang.String fileName)
Returns a boolean value indicating whether the given file can be added to source control.


isCheckedOut

public static boolean isCheckedOut(java.lang.String fileName)
Returns a boolean value indicating whether the given file is checked out.


executeCheckout

public static int executeCheckout(java.lang.String file)
Checks out the file that is specified.


executeCheckout

public static int executeCheckout(java.lang.String[] files)
Checks out the files that are specified.


executeCheckout

public static int executeCheckout(java.util.List files)
Checks out the files that are specified.


executeUndoCheckout

public static int executeUndoCheckout(java.lang.String file)
Unchecks out the file that is specified.


executeUndoCheckout

public static int executeUndoCheckout(java.lang.String[] files)
Unchecks out the files that are specified.


executeUndoCheckout

public static int executeUndoCheckout(java.util.List files)
Unchecks out the files that are specified.


executeCheckin

public static int executeCheckin(java.lang.String file)
Checks in the file that is specified.


executeCheckin

public static int executeCheckin(java.lang.String[] files)
Checks in the files that are specified.


executeCheckin

public static int executeCheckin(java.util.List files)
Checks in the files that are specified.


executeAddToSourceControl

public static int executeAddToSourceControl(java.lang.String file)
Adds the file that is specified to source control.


executeAddToSourceControl

public static int executeAddToSourceControl(java.lang.String[] files)
Adds the files that are specified to source control.


executeAddToSourceControl

public static int executeAddToSourceControl(java.util.List files)
Adds the files that are specified to source control.


executeDiffPrevious

public static boolean executeDiffPrevious(java.lang.String fileName)
Compares the current version to the previous version of the specified file.


executeVersionTree

public static boolean executeVersionTree(java.lang.String fileName)
Displays a graphical representation of all versions of the specified file.


executeHistory

public static boolean executeHistory(java.lang.String fileName)
Displays the full history log of the specified file.


executeFindCheckouts

public static boolean executeFindCheckouts(java.lang.String dir)
Displays all files that are checked out in the current stream.


executeMergeManager

public static boolean executeMergeManager()
Executes the ClearCase Merge Manager tool.


executeMergeManager

public static boolean executeMergeManager(java.lang.String fileName)
Executes the ClearCase Merge Manager tool.


executeDetails

public static boolean executeDetails()
Displays the ClearCase Details window. This is the same as ClearCase Explorer without the extras.


executeDetails

public static boolean executeDetails(java.lang.String dir)
Displays the ClearCase Details window. This is the same as ClearCase Explorer without the extras.


executeUserPreferences

public static boolean executeUserPreferences()
Displays the ClearCase options dialog box.


executeProcess

protected static boolean executeProcess(java.lang.String command)
Execute the given command.


executeProcess

protected static boolean executeProcess(java.lang.String command,
                                        boolean wait)
Execute the given command.


executeProcess

protected static boolean executeProcess(java.util.List parameters)
Execute the given command with command line arguments.


executeProcess

protected static boolean executeProcess(java.util.List parameters,
                                        boolean wait)
Execute the given command with command line arguments.


executeProcess

protected static boolean executeProcess(java.lang.String[] parameters)
Execute the given command with command line arguments.


executeProcess

protected static boolean executeProcess(java.lang.String[] parameters,
                                        boolean wait)
Execute the given command with command line arguments.


execute

protected static boolean execute()
Execute the command.


logOut

private static void logOut(java.lang.Object obj)
Logs the given Object to the System.out stream.


logErr

private static void logErr(java.lang.Object obj)
Logs the given Object to the System.err stream.