* @param throwOnWarning (vs.ignore warning)
* @return
*/
public ActionReporter executeCommand(Subject subject, String command, ParameterMap parameters, Status status, boolean includeFailureMessage, boolean throwOnWarning, boolean managed) {
RestActionReporter ar = ResourceUtil.runCommand(command, parameters, subject, managed);
ExitCode code = ar.getActionExitCode();
if (code.equals(ExitCode.FAILURE) || (code.equals(ExitCode.WARNING) && throwOnWarning)) {
Throwable t = ar.getFailureCause();
if (t instanceof SecurityException) {
throw new WebApplicationException(Response.status(Status.UNAUTHORIZED).build());
}
if (includeFailureMessage) {