//Execute it
boolean notifyOption = false;
if (params != null) {
notifyOption = params.containsKey("notify");
}
ActionReporter ar = new PropsFileActionReporter(); //new RestActionReporter(); //Must use PropsFileActionReporter because some commands react diferently on it :-(
final RestPayloadImpl.Outbound outbound = new RestPayloadImpl.Outbound(false);
final CommandRunner.CommandInvocation commandInvocation =
getCommandRunner().getCommandInvocation(commandName.getScope(), commandName.getName(), ar, getSubject(),notifyOption);
if (inbound != null) {
commandInvocation.inbound(inbound);
}
commandInvocation
.outbound(outbound)
.parameters(params)
.execute();
ar = (ActionReporter) commandInvocation.report();
fixActionReporterSpecialCases(ar);
ActionReport.ExitCode exitCode = ar.getActionExitCode();
int status = HttpURLConnection.HTTP_OK; /*200 - ok*/
if (exitCode == ActionReport.ExitCode.FAILURE) {
status = HttpURLConnection.HTTP_INTERNAL_ERROR;
}
ResponseBuilder rb = Response.status(status);