Package org.jboss.forge.addon.ui.controller

Examples of org.jboss.forge.addon.ui.controller.CommandController


   public boolean equals(Object obj)
   {
      boolean result = false;
      if (obj instanceof CommandController)
      {
         CommandController newController = (CommandController) obj;
         // Same class Name
         if (!getCommand().getClass().getName().equals(newController.getCommand().getClass().getName()))
         {
            result = false;
         }
         else if (isInitialized() && newController.isInitialized())
         {
            // Compare inputs
            Set<String> originalInputNames = getInputs().keySet();
            Set<String> newInputNames = newController.getInputs().keySet();
            if (originalInputNames.containsAll(newInputNames) && newInputNames.containsAll(originalInputNames))
            {
               result = true;
            }
         }
View Full Code Here


      AbstractShellInteraction result = null;
      CommandLineUtil cmdLineUtil = getCommandLineUtil();
      UICommand cmd = commandFactory.getCommandByName(shellContext, commandName);
      if (cmd != null)
      {
         CommandController controller = commandControllerFactory.createController(shellContext, shell, cmd);
         if (controller instanceof WizardCommandController)
         {
            result = new ShellWizard((WizardCommandController) controller, shellContext, cmdLineUtil, this);
         }
         else
View Full Code Here

      AbstractShellInteraction result = null;
      CommandLineUtil cmdLineUtil = getCommandLineUtil();
      UICommand cmd = commandFactory.getCommandByName(shellContext, commandName);
      if (cmd != null)
      {
         CommandController controller = commandControllerFactory.createController(shellContext, shell, cmd);
         if (controller instanceof WizardCommandController)
         {
            result = new ShellWizard((WizardCommandController) controller, shellContext, cmdLineUtil, this);
         }
         else
View Full Code Here

            return false;
         }
      }

      // Checking if there is any next page left
      CommandController lastController = flow.get(flow.size() - 1).controller;
      if (lastController.isInitialized())
      {
         Class<? extends UICommand>[] next = getNextFrom(flow.get(flow.size() - 1).controller.getCommand());
         if (next != null || !subflow.isEmpty())
         {
            return false;
View Full Code Here

            {
               command = createCommand(result[0]);
            }
            if (command != null)
            {
               CommandController ctrl = controllerFactory.doCreateSingleController(context, runtime, command);
               ctrl.initialize();
               Set<String> currentInputsKeySet = nextEntry.controller.getInputs().keySet();
               Set<String> keySet = ctrl.getInputs().keySet();
               if (!(currentInputsKeySet.containsAll(keySet) && keySet.containsAll(currentInputsKeySet)))
               {
                  cleanSubsequentStalePages();
                  addNextFlowStep(result);
               }
View Full Code Here

      return command;
   }

   private WizardStepEntry createEntry(UICommand command, boolean subflowHead)
   {
      CommandController controller = controllerFactory.doCreateSingleController(context, runtime, command);
      return new WizardStepEntry(controller, subflowHead);
   }
View Full Code Here

      try
      {
         firePreWizardExecuted(executionContext, listeners);
         for (WizardStepEntry entry : flow)
         {
            CommandController controller = entry.controller;
            if (progressMonitor.isCancelled())
            {
               break;
            }
            UICommand command = controller.getCommand();
            try
            {
               firePreCommandExecuted(executionContext, listeners, command);
               Result currentResult = command.execute(executionContext);
               results.add(currentResult);
View Full Code Here

      return createCommandController(name, (Resource<?>) null);
   }

   public CommandController createCommandController(String name, Resource<?>... initialSelection) throws Exception
   {
      CommandController result = null;
      Iterable<UICommand> commands = commandFactory.getCommands();
      UIContextImpl context = getUIContextInstance(initialSelection);
      for (UICommand command : commands)
      {
         UICommandMetadata metadata = command.getMetadata(context);
View Full Code Here

      try
      {
         firePreWizardExecuted(executionContext, listeners);
         for (WizardStepEntry entry : flow)
         {
            CommandController controller = entry.controller;
            if (progressMonitor.isCancelled())
            {
               break;
            }
            UICommand command = controller.getCommand();
            try
            {
               firePreCommandExecuted(executionContext, listeners, command);
               Result currentResult = command.execute(executionContext);
               results.add(currentResult);
View Full Code Here

            return false;
         }
      }

      // Checking if there is any next page left
      CommandController lastController = flow.get(flow.size() - 1).controller;
      if (lastController.isInitialized())
      {
         NavigationResultEntry[] next = getNextFrom(flow.get(flow.size() - 1).controller.getCommand());
         if (next != null || !subflow.isEmpty())
         {
            return false;
View Full Code Here

TOP

Related Classes of org.jboss.forge.addon.ui.controller.CommandController

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.