i++;
parameters.add(arguments[i]);
}
if ( instructionHandler != null ) {
interactiveMap.put(cmd, parameters);
instructions.addElement(new ParsedArgument(instructionHandler,
cmd, parameters, commonInfo, interactiveMap));
} else {
String msg = sm.getString("enterprise.tools.upgrade.cli.invalid_option",
rawArg);
if (cmd.equals(ADMINPASSWORD_SHORT) || cmd.equals(ADMINPASSWORD)) {
msg = msg + "\n" +
sm.getString("enterprise.tools.upgrade.cli.deprecated_option",rawArg) +
" " +
sm.getString("enterprise.tools.upgrade.cli.deprecated_option.adminpassword");
} else if (cmd.equals(MASTERPASSWORD_SHORT) || cmd.equals(MASTERPASSWORD)) {
msg = msg + "\n" +
sm.getString("enterprise.tools.upgrade.cli.deprecated_option",rawArg) +
" " +
sm.getString("enterprise.tools.upgrade.cli.deprecated_option.masterpassword");
}
helpUsage(msg);
commonInfo.recover();
System.exit(1);
}
}
}
//Process the parsed instructions for all arguments passed.
Enumeration e = instructions.elements();
while ( e.hasMoreElements() ) {
ParsedArgument pi = (ParsedArgument )e.nextElement();
instructionHandler = pi.getHandler();
try {
Class [] parameterTypes = new Class [] {pi.getClass()};
Constructor constructor =
instructionHandler.getConstructor(parameterTypes);
constructor.newInstance(new Object [] { pi });
} catch (Exception ex) {
_logger.log(Level.INFO,
sm.getString("enterprise.tools.upgrade.cli.invalid_option",
pi.getMneumonic()), ex);
commonInfo.recover();
System.exit(1);
}
}