Build the command line
AddLabel required parameters: -server -name -password -database -project -label
AddLabel optional parameters: -verbose -comment
commandLine = new Commandline();
// add -command AddLabel to the commandline
commandLine.createArgument().setValue(SOSCmd.FLAG_COMMAND);
commandLine.createArgument().setValue(SOSCmd.COMMAND_LABEL);
getRequiredAttributes();
// a label is required
if (getLabel() == null) {
throw new BuildException("label attribute must be set!", getLocation());
}
commandLine.createArgument().setValue(SOSCmd.FLAG_LABEL);
commandLine.createArgument().setValue(getLabel());
// -verbose
commandLine.createArgument().setValue(getVerbose());
// Look for a comment
if (getComment() != null) {
commandLine.createArgument().setValue(SOSCmd.FLAG_COMMENT);
commandLine.createArgument().setValue(getComment());
}
return commandLine;