Methods Summary |
---|
protected org.apache.tools.ant.types.Commandline | buildCmdLine()Build the command line
GetFile required parameters: -server -name -password -database -project -file
GetFile optional parameters: -workdir -revision -verbose -nocache -nocompression -soshome
GetProject required parameters: -server -name -password -database -project
GetProject optional parameters: -label -workdir -recursive -verbose -nocache
-nocompression -soshome
commandLine = new Commandline();
// If we find a "file" attribute then act on a file otherwise act on a project
if (getFilename() != null) {
// add -command GetFile to the commandline
commandLine.createArgument().setValue(SOSCmd.FLAG_COMMAND);
commandLine.createArgument().setValue(SOSCmd.COMMAND_GET_FILE);
// add -file xxxxx to the commandline
commandLine.createArgument().setValue(SOSCmd.FLAG_FILE);
commandLine.createArgument().setValue(getFilename());
// look for a version attribute
if (getVersion() != null) {
//add -revision xxxxx to the commandline
commandLine.createArgument().setValue(SOSCmd.FLAG_VERSION);
commandLine.createArgument().setValue(getVersion());
}
} else {
// add -command GetProject to the commandline
commandLine.createArgument().setValue(SOSCmd.FLAG_COMMAND);
commandLine.createArgument().setValue(SOSCmd.COMMAND_GET_PROJECT);
// look for a recursive option
commandLine.createArgument().setValue(getRecursive());
// look for a label option
if (getLabel() != null) {
commandLine.createArgument().setValue(SOSCmd.FLAG_LABEL);
commandLine.createArgument().setValue(getLabel());
}
}
getRequiredAttributes();
getOptionalAttributes();
return commandLine;
|
public final void | setFile(java.lang.String filename)The Filename to act upon.
If no file is specified then the tasks
act upon the project.
super.setInternalFilename(filename);
|
public void | setLabel(java.lang.String label)The labeled version to operate on in SourceSafe.
super.setInternalLabel(label);
|
public void | setRecursive(boolean recursive)Flag to recursively apply the action. Defaults to false
super.setInternalRecursive(recursive);
|
public void | setVersion(java.lang.String version)Set the version number to get -
only works with SOSGet on a file.
super.setInternalVersion(version);
|