ParameterMap props = params.getOptions();
if (params.getOperands().size() > 0) {
for (String op : params.getOperands())
props.add("DEFAULT", op);
}
final ActionReport report = new PlainTextActionReporter();
CommandExecution ce = new CommandExecution() {
public ActionReport getActionReport() {
return report;
}
public ActionReport.ExitCode getExitCode() {
return report.getActionExitCode();
}
public String getMessage() {
return report.getMessage();
}
};
runner.getCommandInvocation(commandName, report, kernelIdentity.getSubject()).parameters(props).execute();
return ce;
}