FileDocCategorySizeDatePackage
Continuus.javaAPI DocApache Ant 1.704228Wed Dec 13 06:16:20 GMT 2006org.apache.tools.ant.taskdefs.optional.ccm

Continuus

public abstract class Continuus extends org.apache.tools.ant.Task
A base class for creating tasks for executing commands on Continuus 5.1.

The class extends the task as it operates by executing the ccm.exe program supplied with Continuus/Synergy. By default the task expects the ccm executable to be in the path, you can override this be specifying the ccmdir attribute.

Fields Summary
private String
ccmDir
private String
ccmAction
private static final String
CCM_EXE
Constant for the thing to execute
public static final String
COMMAND_CREATE_TASK
The 'CreateTask' command
public static final String
COMMAND_CHECKOUT
The 'Checkout' command
public static final String
COMMAND_CHECKIN
The 'Checkin' command
public static final String
COMMAND_RECONFIGURE
The 'Reconfigure' command
public static final String
COMMAND_DEFAULT_TASK
The 'Reconfigure' command
Constructors Summary
Methods Summary
public java.lang.StringgetCcmAction()
Get the value of ccmAction.

return
value of ccmAction.


                  
       
        return ccmAction;
    
protected final java.lang.StringgetCcmCommand()
Builds and returns the command string to execute ccm

return
String containing path to the executable

        String toReturn = ccmDir;
        if (!toReturn.equals("") && !toReturn.endsWith("/")) {
            toReturn += "/";
        }

        toReturn += CCM_EXE;

        return toReturn;
    
protected intrun(org.apache.tools.ant.types.Commandline cmd, org.apache.tools.ant.taskdefs.ExecuteStreamHandler handler)
Run the command.

param
cmd the command line
param
handler an execute stream handler
return
the exit status of the command

        try {
            Execute exe = new Execute(handler);
            exe.setAntRun(getProject());
            exe.setWorkingDirectory(getProject().getBaseDir());
            exe.setCommandline(cmd.getCommandline());
            return exe.execute();
        } catch (java.io.IOException e) {
            throw new BuildException(e, getLocation());
        }
    
protected intrun(org.apache.tools.ant.types.Commandline cmd)
Run the command.

param
cmd the command line
return
the exit status of the command

        return run(cmd, new LogStreamHandler(this, Project.MSG_VERBOSE, Project.MSG_WARN));
    
public voidsetCcmAction(java.lang.String v)
Set the value of ccmAction.

param
v Value to assign to ccmAction.
ant.attribute
ignore="true"

        this.ccmAction = v;
    
public final voidsetCcmDir(java.lang.String dir)
Set the directory where the ccm executable is located.

param
dir the directory containing the ccm executable

        ccmDir = FileUtils.translatePath(dir);