Package org.jboss.aesh.cl.parser

Examples of org.jboss.aesh.cl.parser.CommandLineParser


      {
         throw new CommandNotFoundException(name);
      }
      try
      {
         CommandLineParser parser = cmd.getParser(shellContext, completeLine == null ? name : completeLine);
         CommandAdapter command = new CommandAdapter(shell, shellContext, cmd);
         return new ForgeCommandContainer(shellContext, parser, command);
      }
      catch (RuntimeException e)
      {
View Full Code Here


   private CommandLineParser populate(UICommand root, UICommand current, ShellContext shellContext, String line)
            throws Exception
   {
      addWizardStep(current);
      Map<String, InputComponent<?, Object>> inputs = getInputs();
      CommandLineParser parser = commandLineUtil.generateParser(root, shellContext, inputs);
      CommandLine cmdLine = parser.parse(line, true);
      Map<String, InputComponent<?, Object>> populatedInputs = commandLineUtil.populateUIInputs(cmdLine, inputs);
      ShellValidationContext validationContext = validate();
      List<String> errors = validationContext.getErrors();
      if (errors.isEmpty())
      {
View Full Code Here

      {
         throw new CommandNotFoundException(name);
      }
      try
      {
         CommandLineParser parser = cmd.getParser(shellContext, completeLine == null ? name : completeLine);
         CommandAdapter command = new CommandAdapter(shell, cmd);
         return new AeshCommandContainer(parser, command);
      }
      catch (Exception e)
      {
View Full Code Here

            throws Exception
   {
      WizardCommandController controller = getController();
      Map<String, InputComponent<?, ?>> pageInputs = new LinkedHashMap<>(controller.getInputs());
      allInputs.putAll(pageInputs);
      CommandLineParser parser = commandLineUtil.generateParser(controller, shellContext, allInputs);
      CommandLine cmdLine = parser.parse(line, true);
      Map<String, InputComponent<?, ?>> populatedInputs = commandLineUtil.populateUIInputs(cmdLine, allInputs);

      // Second pass to ensure disabled fields are set
      parser = commandLineUtil.generateParser(controller, shellContext, allInputs);
      cmdLine = parser.parse(line, true);
      populatedInputs = commandLineUtil.populateUIInputs(cmdLine, allInputs);
     
      boolean inputsChanged = false;
      for (String input : pageInputs.keySet())
      {
View Full Code Here

      {
         throw new CommandNotFoundException(name);
      }
      try
      {
         CommandLineParser parser = cmd.getParser(shellContext, completeLine == null ? name : completeLine);
         CommandAdapter command = new CommandAdapter(shell, cmd);
         return new AeshCommandContainer(parser, command);
      }
      catch (Exception e)
      {
View Full Code Here

      {
         throw new CommandNotFoundException(name);
      }
      try
      {
         CommandLineParser parser = cmd.getParser(shellContext, completeLine == null ? name : completeLine);
         CommandAdapter command = new CommandAdapter(shell, shellContext, cmd);
         return new ForgeCommandContainer(shellContext, parser, command);
      }
      catch (RuntimeException e)
      {
View Full Code Here

      {
         throw new CommandNotFoundException(name);
      }
      try
      {
         CommandLineParser parser = cmd.getParser(shellContext, completeLine == null ? name : completeLine);
         CommandAdapter command = new CommandAdapter(shell, shellContext, cmd);
         return new ForgeCommandContainer(shellContext, parser, command);
      }
      catch (RuntimeException e)
      {
View Full Code Here

      {
         throw new CommandNotFoundException(name);
      }
      try
      {
         CommandLineParser parser = cmd.getParser(shellContext, completeLine == null ? name : completeLine);
         CommandAdapter command = new CommandAdapter(shell, shellContext, cmd);
         return new ForgeCommandContainer(shellContext, parser, command);
      }
      catch (Exception e)
      {
View Full Code Here

            throws Exception
   {
      WizardCommandController controller = getController();
      Map<String, InputComponent<?, ?>> pageInputs = new HashMap<>(controller.getInputs());
      allInputs.putAll(pageInputs);
      CommandLineParser parser = commandLineUtil.generateParser(controller, shellContext, allInputs);
      CommandLine cmdLine = parser.parse(line, true);
      Map<String, InputComponent<?, ?>> populatedInputs = commandLineUtil.populateUIInputs(cmdLine, allInputs);
      boolean inputsChanged = false;
      for (String input : pageInputs.keySet())
      {
         // TODO: May not work correctly with Subflows
View Full Code Here

      {
         throw new CommandNotFoundException(name);
      }
      try
      {
         CommandLineParser parser = cmd.getParser(shellContext, completeLine == null ? name : completeLine);
         CommandAdapter command = new CommandAdapter(shell, shellContext, cmd);
         return new ForgeCommandContainer(shellContext, parser, command);
      }
      catch (RuntimeException e)
      {
View Full Code Here

TOP

Related Classes of org.jboss.aesh.cl.parser.CommandLineParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.