public void removeDetach() { if (options.containsKey(DETACH)) { options.remove(DETACH); } }
/** * @return detach option */ public boolean isDetachedCommand() { if (options.containsKey(DETACH)) { String value = options.getOne(DETACH); return (ok(value)) ? Boolean.parseBoolean(value) : true; } return false; }
/** * @return notify option */ public boolean isNotifyCommand() { if (options.containsKey(NOTIFY)) { String value = options.getOne(NOTIFY); return (ok(value)) ? Boolean.parseBoolean(value) : true; } return false; }
/** * @return the terse */ public boolean isTerse() { boolean terse; if (options.containsKey(TERSE)) { String value = options.getOne(TERSE); if (ok(value)) terse = Boolean.parseBoolean(value); else terse = true; } else terse = env.getBooleanOption(TERSE); return terse; }
/** * @return the echo */ public boolean isEcho() { boolean echo; if (options.containsKey(ECHO)) { String value = options.getOne(ECHO); if (ok(value)) echo = Boolean.parseBoolean(value); else echo = true; } else echo = env.getBooleanOption(ECHO); return echo; }
/** * @return the terse */ public boolean isTerse() { boolean terse; if (options.containsKey(TERSE)) { String value = options.getOne(TERSE); if (ok(value)) terse = Boolean.parseBoolean(value); else terse = true; } else terse = env.getBooleanOption(TERSE); return terse; }
/** * @return the secure */ public boolean isSecure() { boolean secure; if (options.containsKey(SECURE)) { String value = options.getOne(SECURE); if (ok(value)) secure = Boolean.parseBoolean(value); else secure = true; } else secure = env.getBooleanOption(SECURE); return secure; }
/** * @return the secure */ public boolean isSecure() { boolean secure; if (options.containsKey(SECURE)) { String value = options.getOne(SECURE); if (ok(value)) secure = Boolean.parseBoolean(value); else secure = true; } else secure = env.getBooleanOption(SECURE); return secure; }
/** * @return the echo */ public boolean isEcho() { boolean echo; if (options.containsKey(ECHO)) { String value = options.getOne(ECHO); if (ok(value)) echo = Boolean.parseBoolean(value); else echo = true; } else echo = env.getBooleanOption(ECHO); return echo; }
/** * @return the help */ public boolean isHelp() { boolean help = false; if (options.containsKey(HELP)) { String value = options.getOne(HELP); if (ok(value)) help = Boolean.parseBoolean(value); else help = true; } else help = env.getBooleanOption(HELP); return help; }
/** * @return the help */ public boolean isHelp() { boolean help = false; if (options.containsKey(HELP)) { String value = options.getOne(HELP); if (ok(value)) help = Boolean.parseBoolean(value); else help = true; } else help = env.getBooleanOption(HELP); return help; }
/** * @return the interactive */ public boolean isInteractive() { boolean interactive; if (options.containsKey(INTERACTIVE)) { String value = options.getOne(INTERACTIVE); if (ok(value)) interactive = Boolean.parseBoolean(value); else interactive = true; } else if (env.hasOption(INTERACTIVE)) { interactive = env.getBooleanOption(INTERACTIVE); } else interactive = System.console() != null; return interactive; }
/** * @return the interactive */ public boolean isInteractive() { boolean interactive; if (options.containsKey(INTERACTIVE)) { String value = options.getOne(INTERACTIVE); if (ok(value)) interactive = Boolean.parseBoolean(value); else interactive = true; } else if (env.hasOption(INTERACTIVE)) { interactive = env.getBooleanOption(INTERACTIVE); } else interactive = System.console() != null; return interactive; }
/** * Run the command using the specified arguments. * Return the output of the command. */ public String executeCommand(ParameterMap opts) throws CommandException { if (logger.isLoggable(Level.FINER)) { logger.log(Level.FINER, "RemoteRestAdminCommand.executeCommand() - name: {0}", this.name); } //Just to be sure. Cover get help if (opts != null && opts.size() == 1 && opts.containsKey("help")) { return getManPage(); } ParameterMap params = processParams(opts); boolean retry; do { //Cache update cycle retry = false; try { executeRemoteCommand(params); } catch (CommandValidationException mve) { if (refetchInvalidModel() && isCommandModelFromCache()) { fetchCommandModel(); retry = true; } else { throw mve; } } return output; } while (retry); }
if (optionsMap.containsKey(name)) { throw new CommandValidationException( strings.get("parser.noRepeats", name));
if (optionsMap.containsKey(name)) { throw new CommandValidationException( strings.get("parser.noRepeats", name));
CommandRunner.CommandInvocation inv = commandRunner.getCommandInvocation(scope, command, report, subject,parameters.containsKey("notify")); inv.parameters(parameters).inbound(inboundPayload).outbound(outboundPayload).execute(); try {