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

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


            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


            {
               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

   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

      }
      assertValid();
      List<Result> results = new LinkedList<>();
      for (WizardStepEntry entry : flow)
      {
         CommandController controller = entry.controller;
         if (progressMonitor.isCancelled())
         {
            break;
         }
         UICommand command = controller.getCommand();
         try
         {
            for (CommandExecutionListener listener : listeners)
            {
               listener.preCommandExecuted(command, executionContext);
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.createController(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.createSingleController(context, runtime, command);
      return new WizardStepEntry(controller, subflowHead);
   }
View Full Code Here

   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

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

   public CommandController createCommandController(String name, Resource<?>... initialSelection) throws Exception
   {
      CommandController result = null;
      Iterable<UICommand> commands = commandFactory.getCommands();
      for (UICommand command : commands)
      {
         UIContextImpl context = getUIContextInstance(initialSelection);
         UICommandMetadata metadata = command.getMetadata(context);
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.