@Override public void execute(final AdminCommandContext context) { Thread t = new Thread() { @Override public void run() { try { command.execute(context); } catch (RuntimeException e) { logger.log(Level.SEVERE, e.getMessage(), e); } } }; t.setPriority(async.priority()); t.start(); report.setActionExitCode(ActionReport.ExitCode.SUCCESS); report.setMessage(MessageFormat.format(strings.getString("command.launch"), model.getCommandName())); } };
@Override public void execute(final AdminCommandContext context) { Thread t = new Thread() { @Override public void run() { try { command.execute(context); } catch (RuntimeException e) { logger.log(Level.SEVERE, e.getMessage(), e); } } }; t.setPriority(async.priority()); t.start(); report.setActionExitCode(ActionReport.ExitCode.SUCCESS); report.setMessage(MessageFormat.format(strings.getString("command.launch"), model.getCommandName())); } };
@Override public BufferedReader getHelp(CommandModel model) throws CommandNotFoundException { BufferedReader manPage = getManPage(model.getCommandName(), model); if (manPage != null) { return manPage; StringBuilder part = new StringBuilder(64); hlp.append("NAME").append(ManifestUtils.EOL); part.append(model.getCommandName()); String description = model.getLocalizedDescription(); if (ok(description)) {
usageText.append( adminStrings.getLocalString("adapter.usage", "Usage: ")); usageText.append(model.getCommandName()); usageText.append(" "); StringBuffer operand = new StringBuffer();
usageText.append( adminStrings.getLocalString("adapter.usage", "Usage: ")); usageText.append(model.getCommandName()); usageText.append(" "); StringBuffer operand = new StringBuffer();
@Override public BufferedReader getHelp(CommandModel model) throws CommandNotFoundException { BufferedReader manPage = getManPage(model.getCommandName(), model); if (manPage != null) { return manPage; StringBuilder part = new StringBuilder(64); hlp.append("NAME").append(ManifestUtils.EOL); part.append(model.getCommandName()); String description = model.getLocalizedDescription(); if (ok(description)) {
bw = new BufferedWriter(writer); String str = cm.getCommandName(); if (str != null && !str.isEmpty()) { bw.write(ROOT_ELEMENT);
public void getHelp(AdminCommand command, ActionReport report) { CommandModel model = getModel(command); report.setActionDescription(model.getCommandName() + " help"); // XXX - this is a hack for now. if the request mapped to an // XMLContentActionReporter, that means we want the command metadata. if (report instanceof XMLContentActionReporter) { getMetadata(command, model, report); } else { report.setMessage(model.getCommandName() + " - " + model.getLocalizedDescription()); report.getTopMessagePart().addProperty("SYNOPSIS", encodeManPage(new BufferedReader(new StringReader( getUsageText(model))))); for (CommandModel.ParamModel param : model.getParameters()) { addParamUsage(report, param); } report.setActionExitCode(ActionReport.ExitCode.SUCCESS); } }
tag.append(cm.getCommandName()); if (cm.isManagedJob()) { tag.append('m');
public void getHelp(AdminCommand command, ActionReport report) { CommandModel model = getModel(command); report.setActionDescription(model.getCommandName() + " help"); // XXX - this is a hack for now. if the request mapped to an // XMLContentActionReporter, that means we want the command metadata. if (report instanceof XMLContentActionReporter) { getMetadata(command, model, report); } else { report.setMessage(model.getCommandName() + " - " + model.getLocalizedDescription()); report.getTopMessagePart().addProperty("SYNOPSIS", encodeManPage(new BufferedReader(new StringReader( getUsageText(model))))); for (CommandModel.ParamModel param : model.getParameters()) { addParamUsage(report, param); } report.setActionExitCode(ActionReport.ExitCode.SUCCESS); } }
report.setActionDescription(model.getCommandName() + " AdminCommand");
report.setActionDescription(model.getCommandName() + " AdminCommand");
"{0} command requires the passwordfile " + "parameter containing {1} entry.", model.getCommandName(), paramName); } else if (paramDesc != null) { errorMsg = adminStrings.getLocalString("admin.param.missing", "{0} command requires the {1} parameter ({2})", model.getCommandName(), paramName, paramDesc); model.getCommandName(), paramName); model.getCommandName(), e.getUnsatisfiedName()); checkAgainstBeanConstraints(injectionTarget, model.getCommandName()); return true;
"{0} command requires the passwordfile " + "parameter containing {1} entry.", model.getCommandName(), paramName); } else if (paramDesc != null) { errorMsg = adminStrings.getLocalString("admin.param.missing", "{0} command requires the {1} parameter ({2})", model.getCommandName(), paramName, paramDesc); model.getCommandName(), paramName); model.getCommandName(), e.getUnsatisfiedName()); checkAgainstBeanConstraints(injectionTarget, model.getCommandName()); return true;
ActionReport report = inv.report(); if (!fromCheckpoint) { report.setActionDescription(model.getCommandName() + " command"); report.setActionExitCode(ActionReport.ExitCode.SUCCESS); ActionReport.ExitCode postSupplementalReturn = ActionReport.ExitCode.SUCCESS; CommandRunnerProgressHelper progressHelper = new CommandRunnerProgressHelper(command, model.getCommandName(), job, inv.progressStatusChild); supplementalExecutor.listSuplementalCommands(model.getCommandName()); try { BufferedReader in = getManPage(model.getCommandName(), model); String manPage = encodeManPage(in); report.setMessage(adminStrings.getLocalString("commandrunner.executor.targettype.unallowed", "Target type is not allowed on single instance command {0} ," , model.getCommandName())); return; report.setMessage(adminStrings.getLocalString("commandrunner.executor.invalidtargettype", "Target {0} is not a supported type. Command {1} supports these types of targets only : {2}", targetName, model.getCommandName(), validTypes.toString())); return; report.setMessage(adminStrings.getLocalString("commandrunner.executor.instanceopnotallowed", "The {0} command is not allowed on instance {1} because it is part of cluster {2}", model.getCommandName(), targetName, c.getName())); return;
ActionReport report = inv.report(); if (!fromCheckpoint) { report.setActionDescription(model.getCommandName() + " command"); report.setActionExitCode(ActionReport.ExitCode.SUCCESS); ActionReport.ExitCode postSupplementalReturn = ActionReport.ExitCode.SUCCESS; CommandRunnerProgressHelper progressHelper = new CommandRunnerProgressHelper(command, model.getCommandName(), job, inv.progressStatusChild); supplementalExecutor.listSuplementalCommands(model.getCommandName()); try { BufferedReader in = getManPage(model.getCommandName(), model); String manPage = encodeManPage(in); report.setMessage(adminStrings.getLocalString("commandrunner.executor.targettype.unallowed", "Target type is not allowed on single instance command {0} ," , model.getCommandName())); return; report.setMessage(adminStrings.getLocalString("commandrunner.executor.invalidtargettype", "Target {0} is not a supported type. Command {1} supports these types of targets only : {2}", targetName, model.getCommandName(), validTypes.toString())); return; report.setMessage(adminStrings.getLocalString("commandrunner.executor.instanceopnotallowed", "The {0} command is not allowed on instance {1} because it is part of cluster {2}", model.getCommandName(), targetName, c.getName())); return;
cmd.addProperty("name", model.getCommandName()); if (model.unknownOptionsAreOperands()) { cmd.addProperty("unknown-options-are-operands", "true");
cmd.addProperty("name", model.getCommandName()); if (model.unknownOptionsAreOperands()) { cmd.addProperty("unknown-options-are-operands", "true");