Methods Summary |
---|
public void | execute(java.lang.String commandName, org.gudy.azureus2.ui.console.ConsoleInput ci, java.util.List args)determine the correct subcommand and execute it
if( args.isEmpty() )
{
printHelp(ci.out, args);
}
else
{
commandName = (String) args.remove(0);
subCommands.execute(commandName, ci, args);
}
|
public java.lang.String | getCommandDescriptions()returns the string describing how this command can be used
return "user add|delete|list|modify <options>\tmanage users able to log in via telnet ui";
|
private org.gudy.azureus2.ui.console.multiuser.UserManager | getUserManager()returns the UserManager object that is used
by our subcommands
return userManager;
|
public void | printHelp(java.io.PrintStream out, java.util.List args)prints out the help message showing the syntax for all subcommands
out.println("> -----");
out.println("'user' syntax:");
if( args.size() > 0 ) {
String command = (String) args.remove(0);
IConsoleCommand cmd = subCommands.get(command);
if( cmd != null )
cmd.printHelp(out, args);
return;
}
out.println("user <command> <command options>");
out.println();
out.println("Available <command>s:");
for (Iterator iter = subCommands.iterator(); iter.hasNext();) {
IConsoleCommand cmd = (IConsoleCommand) iter.next();
out.println(cmd.getCommandDescriptions());
}
out.println("try 'help user <command>' for more information about a particular user command");
out.println("> -----");
|
private void | saveUserManagerConfig(java.io.PrintStream out)write the user manager configuration back to the path that it was read from
try {
userManager.save();
out.println("> User Manager config saved");
} catch (FileNotFoundException e) {
out.println("> Error saving User Manager config: " + e);
e.printStackTrace(out);
}
|