Build the command line.
CheckInFile required parameters: -server -name -password -database -project
-file
CheckInFile optional parameters: -workdir -log -verbose -nocache -nocompression
-soshome
CheckInProject required parameters: -server -name -password -database
-project
CheckInProject optional parameters: workdir -recursive -log -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 CheckInFile to the commandline
commandLine.createArgument().setValue(SOSCmd.FLAG_COMMAND);
commandLine.createArgument().setValue(SOSCmd.COMMAND_CHECKIN_FILE);
// add -file xxxxx to the commandline
commandLine.createArgument().setValue(SOSCmd.FLAG_FILE);
commandLine.createArgument().setValue(getFilename());
} else {
// add -command CheckInProject to the commandline
commandLine.createArgument().setValue(SOSCmd.FLAG_COMMAND);
commandLine.createArgument().setValue(SOSCmd.COMMAND_CHECKIN_PROJECT);
// look for a recursive option
commandLine.createArgument().setValue(getRecursive());
}
getRequiredAttributes();
getOptionalAttributes();
// Look for a comment
if (getComment() != null) {
commandLine.createArgument().setValue(SOSCmd.FLAG_COMMENT);
commandLine.createArgument().setValue(getComment());
}
return commandLine;