Fields Summary |
---|
private String | mClearToolDir |
private String | mviewPath |
private String | mobjSelect |
private static int | pcnt |
private boolean | mFailonerr |
private static final String | CLEARTOOL_EXEConstant for the thing to execute |
public static final String | COMMAND_UPDATEThe 'Update' command |
public static final String | COMMAND_CHECKOUTThe 'Checkout' command |
public static final String | COMMAND_CHECKINThe 'Checkin' command |
public static final String | COMMAND_UNCHECKOUTThe 'UndoCheckout' command |
public static final String | COMMAND_LOCKThe 'Lock' command |
public static final String | COMMAND_UNLOCKThe 'Unlock' command |
public static final String | COMMAND_MKBLThe 'Mkbl' command |
public static final String | COMMAND_MKLABELThe 'Mklabel' command |
public static final String | COMMAND_MKLBTYPEThe 'Mklbtype' command |
public static final String | COMMAND_RMTYPEThe 'Rmtype' command |
public static final String | COMMAND_LSCOThe 'LsCheckout' command |
public static final String | COMMAND_MKELEMThe 'Mkelem' command |
public static final String | COMMAND_MKATTRThe 'Mkattr' command |
public static final String | COMMAND_MKDIRThe 'Mkdir' command |
Methods Summary |
---|
protected final java.lang.String | getClearToolCommand()Builds and returns the command string to execute cleartool
String toReturn = mClearToolDir;
if (!toReturn.equals("") && !toReturn.endsWith("/")) {
toReturn += "/";
}
toReturn += CLEARTOOL_EXE;
return toReturn;
|
public boolean | getFailOnErr()Get failonerr flag status
return mFailonerr;
|
public java.lang.String | getObjSelect()Get the object to operate on
return mobjSelect;
|
public java.lang.String | getViewPath()Get the path to the item in a clearcase view
return mviewPath;
|
public java.lang.String | getViewPathBasename()Get the basename path of the item in a clearcase view
return (new File(mviewPath)).getName();
|
protected int | run(org.apache.tools.ant.types.Commandline cmd)Execute the given command are return success or failure
try {
Project aProj = getProject();
Execute exe
= new Execute(new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN));
exe.setAntRun(aProj);
exe.setWorkingDirectory(aProj.getBaseDir());
exe.setCommandline(cmd.getCommandline());
return exe.execute();
} catch (java.io.IOException e) {
throw new BuildException(e, getLocation());
}
|
protected java.lang.String | runS(org.apache.tools.ant.types.Commandline cmdline)Execute the given command, and return it's output
String outV = "opts.cc.runS.output" + pcnt++;
ExecTask exe = new ExecTask(this);
Commandline.Argument arg = exe.createArg();
exe.setExecutable(cmdline.getExecutable());
arg.setLine(Commandline.toString(cmdline.getArguments()));
exe.setOutputproperty(outV);
exe.execute();
return getProject().getProperty(outV);
|
public final void | setClearToolDir(java.lang.String dir)Set the directory where the cleartool executable is located.
mClearToolDir = FileUtils.translatePath(dir);
|
public void | setFailOnErr(boolean failonerr)If true, command will throw an exception on failure.
mFailonerr = failonerr;
|
public final void | setObjSelect(java.lang.String objSelect)Set the object to operate on.
mobjSelect = objSelect;
|
public final void | setViewPath(java.lang.String viewPath)Set the path to the item in a ClearCase view to operate on.
mviewPath = viewPath;
|