Class CLIDriver

  • Direct Known Subclasses:
    SASCLIDriver, SASServerSideCLiDriver

    public class CLIDriver
    extends Object
    A driver program that does introspection on a set of CLICommands

    Created by Jeff Gaynor
    on 5/17/13 at 3:01 PM

    • Constructor Detail

      • CLIDriver

        public CLIDriver​(Commands... cci)
      • CLIDriver

        public CLIDriver​(IOInterface ioInterface)
    • Method Detail

      • getLineCommentStart

        public String getLineCommentStart()
      • setLineCommentStart

        public void setLineCommentStart​(String lineCommentStart)
      • hasComments

        public boolean hasComments()
      • getEnv

        public Map getEnv()
      • setEnv

        public void setEnv​(Map env)
      • hasEnv

        public boolean hasEnv()
      • addCommands

        public void addCommands​(Commands... cci)
      • getCLICommands

        public Commands[] getCLICommands()
      • setCLICommands

        protected void setCLICommands​(Commands[] commands)
      • getCommandType

        protected int getCommandType​(String cmdLine)
      • printHelp

        protected void printHelp()
      • doRepeatCommand

        protected String doRepeatCommand​(String cmdLine)
      • doHistory

        protected String doHistory​(String cmdLine)
      • setComponentManager

        public void setComponentManager​(ComponentManager componentManager)
      • start

        public void start()
        Actual method that starts up this driver and sets out prompts etc.
        Throws:
        Exception
      • isTraceOn

        public boolean isTraceOn()
      • setTraceOn

        public void setTraceOn​(boolean traceOn)
      • execute

        public int execute​(String cmdLine)
      • execute

        public int execute​(InputLine cliAV)
        Returns a logical true if one of the command lines executes the line successfully. This will also throw a shutdown exception if the user asks it to... Otherwise it returns false;
        Parameters:
        cliAV -
        Returns:
      • getHelpUtil

        public HelpUtil getHelpUtil()
      • setHelpUtil

        public void setHelpUtil​(HelpUtil helpUtil)
      • doHelp

        protected void doHelp​(InputLine inputLine)
      • printHelpTopics

        protected void printHelpTopics​(InputLine inputLine)
      • listCLIMethods

        protected void listCLIMethods​(InputLine inputLine)
      • quit

        public void quit​(InputLine inputLine)
      • shutdown

        protected void shutdown()
      • say

        protected void say​(String x)
        For use with informational messages.
        Parameters:
        x -
      • say2

        protected void say2​(String x)
        For use with prompts.
        Parameters:
        x -
      • setIOInterface

        public void setIOInterface​(IOInterface ioInterface)