Build the command line
CheckOutFile required parameters: -server -name -password -database -project -file
CheckOutFile optional parameters: -workdir -verbose -nocache -nocompression -soshome
CheckOutProject required parameters: -server -name -password -database -project
CheckOutProject optional parameters:-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 CheckOutFile to the commandline
commandLine.createArgument().setValue(SOSCmd.FLAG_COMMAND);
commandLine.createArgument().setValue(SOSCmd.COMMAND_CHECKOUT_FILE);
// add -file xxxxx to the commandline
commandLine.createArgument().setValue(SOSCmd.FLAG_FILE);
commandLine.createArgument().setValue(getFilename());
} else {
// add -command CheckOutProject to the commandline
commandLine.createArgument().setValue(SOSCmd.FLAG_COMMAND);
commandLine.createArgument().setValue(SOSCmd.COMMAND_CHECKOUT_PROJECT);
// look for a recursive option
commandLine.createArgument().setValue(getRecursive());
}
getRequiredAttributes();
getOptionalAttributes();
return commandLine;