use of org.glassfish.internal.embedded.admin.CommandExecution in project Payara by payara.
the class EmbeddedAdminCtrImpl method execute.
public CommandExecution execute(String commandName, CommandParameters params) {
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;
}
Aggregations