Class UserCommand
- java.lang.Object
-
- com.biglybt.ui.console.commands.IConsoleCommand
-
- com.biglybt.ui.console.multiuser.commands.UserCommand
-
public class UserCommand extends IConsoleCommand
container command for commands that deal with the add/modify/delete of users
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
UserCommand.AddUserCommand
command that adds new users to the user managerprivate class
UserCommand.DeleteUserCommand
command that deletes a user from the user managerprivate class
UserCommand.ListUsersCommand
command that prints out the list of users registered in this user managerprivate class
UserCommand.ModifyUserCommand
command that changes user's password or level or default save directory-
Nested classes/interfaces inherited from class com.biglybt.ui.console.commands.IConsoleCommand
IConsoleCommand.TorrentComparator
-
-
Field Summary
Fields Modifier and Type Field Description private CommandCollection
subCommands
private UserManager
userManager
-
Constructor Summary
Constructors Constructor Description UserCommand(UserManager userManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(java.lang.String commandName, ConsoleInput ci, java.util.List args)
determine the correct subcommand and execute itjava.lang.String
getCommandDescriptions()
returns the string describing how this command can be usedprivate UserManager
getUserManager()
returns the UserManager object that is used by our subcommandsvoid
printHelpExtra(java.io.PrintStream out, java.util.List args)
prints out the help message showing the syntax for all subcommandsprivate void
saveUserManagerConfig(java.io.PrintStream out)
write the user manager configuration back to the path that it was read from-
Methods inherited from class com.biglybt.ui.console.commands.IConsoleCommand
expandVariable, getCommandName, getCommandNames, getDefaultSummaryFormat, getShortCommandName, getTorrentSummary, printHelp, printHelp
-
-
-
-
Field Detail
-
subCommands
private final CommandCollection subCommands
-
userManager
private final UserManager userManager
-
-
Constructor Detail
-
UserCommand
public UserCommand(UserManager userManager)
- Parameters:
_commandNames
-
-
-
Method Detail
-
getUserManager
private UserManager getUserManager()
returns the UserManager object that is used by our subcommands- Returns:
-
saveUserManagerConfig
private void saveUserManagerConfig(java.io.PrintStream out)
write the user manager configuration back to the path that it was read from- Parameters:
out
- stream to print success/failure messages to
-
getCommandDescriptions
public java.lang.String getCommandDescriptions()
returns the string describing how this command can be used- Specified by:
getCommandDescriptions
in classIConsoleCommand
- Returns:
-
execute
public void execute(java.lang.String commandName, ConsoleInput ci, java.util.List args)
determine the correct subcommand and execute it- Specified by:
execute
in classIConsoleCommand
-
printHelpExtra
public void printHelpExtra(java.io.PrintStream out, java.util.List args)
prints out the help message showing the syntax for all subcommands- Overrides:
printHelpExtra
in classIConsoleCommand
-
-