Project: stp

com.ibm.rational.stp.client.samples
Class Example

Object
  extended by com.ibm.rational.stp.client.samples.Example

public class Example
extends Object

This sample application uses the ClearCase CM API to put a file under source control.


Nested Class Summary
private static class Example.MyAuthCallback
          CM API Authentication callback.
 
Field Summary
private static boolean tracing
           
 
Constructor Summary
Example()
           
 
Method Summary
(package private) static void addToSourceControl(CcFile res, CcDirectory parent)
          Put the specified file under ClearCase source control.
(package private) static CcFile buildProxy(File f, CcProvider provider)
          Construct a CcFile proxy for the specified file.
(package private) static CcProvider getProvider(String serverUrl, String login, String password)
          Get the ClearCase CM API provider for this example.
static void main(String[] args)
           
(package private) static void myAssert(boolean expr)
           
(package private) static void printProps(CcFile file)
          Print some interesting properties of the specified file.
(package private) static void printUsageMsg()
           
(package private) static void trace(String string)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tracing

private static boolean tracing
Constructor Detail

Example

public Example()
Method Detail

printUsageMsg

static void printUsageMsg()

getProvider

static CcProvider getProvider(String serverUrl,
                              String login,
                              String password)
                       throws Exception
Get the ClearCase CM API provider for this example. Establish authentication callback for logging in to the CM Server.

Returns:
new ClearCase provider
Throws:
Exception - if provider cannot be instantiated

buildProxy

static CcFile buildProxy(File f,
                         CcProvider provider)
                  throws javax.wvcm.WvcmException
Construct a CcFile proxy for the specified file.

Throws:
javax.wvcm.WvcmException

printProps

static void printProps(CcFile file)
                throws javax.wvcm.WvcmException
Print some interesting properties of the specified file.

Throws:
javax.wvcm.WvcmException

addToSourceControl

static void addToSourceControl(CcFile res,
                               CcDirectory parent)
                        throws Exception
Put the specified file under ClearCase source control. The file must reside in a ClearCase web view in a source-controlled directory, but must not already be under source control itself.

Throws:
Exception

myAssert

static void myAssert(boolean expr)

trace

static void trace(String string)

main

public static void main(String[] args)

Generated Fri 13-May-2011 09:35 AM

Copyright © IBM 2011. All rights reserved.