Class UserCommand


  • public class UserCommand
    extends IConsoleCommand
    container command for commands that deal with the add/modify/delete of users
    • 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 class IConsoleCommand
        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 class IConsoleCommand
      • 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 class IConsoleCommand