Package edu.isi.karma.controller.command

Examples of edu.isi.karma.controller.command.CommandFactory.createCommand()


      }
      System.out.println(inputParamArr.toString(4));
      CommandFactory cf = commandFactoryMap.get(commObject.get(HistoryArguments.commandName.name()));
      if(cf != null) {
        try { // This is sort of a hack the way I did this, but could not think of a better way to get rid of the dependency
          Command comm = cf.createCommand(inputParamArr, workspace);
          comm.setOutputColumns(newOutputColumns);
          if(comm != null){
            commands.add(comm);
            //TODO consolidate update
            uc.append(workspace.getCommandHistory().doCommand(comm, workspace, true));
View Full Code Here


          HashMap<String, CommandFactory> commandFactoryMap = ctrl.getCommandFactoryMap();
          JSONArray inputParamArr = (JSONArray)rco.historyObject.get(HistoryArguments.inputParameters.name());
          String commandName = (String)rco.historyObject.get(HistoryArguments.commandName.name());
          executor.normalizeCommandHistoryJsonInput(workspace, worksheetId, inputParamArr, commandName, true);
          CommandFactory cf = commandFactoryMap.get(rco.historyObject.get(HistoryArguments.commandName.name()));
          Command comm = cf.createCommand(inputParamArr, workspace);
          effects.append(comm.doIt(workspace));
          history.add(comm);
        }catch(Exception e) {
          history.add(rco.command);
          effects.append(rco.command.doIt(workspace));
View Full Code Here

    CommandFactory cf = commandFactoryMap.get(request.getParameter("command"));
    if (cf != null) {
      if (cf instanceof JSONInputCommandFactory) {
        String newInfo = request.getParameter("newInfo");
        try {
          return cf.createCommand(newInfo == null ? null : new JSONArray(newInfo), workspace);
        } catch (Exception e) {
          logger.error("Error getting command!!", e);
          return null;
        }
      }
View Full Code Here

          logger.error("Error getting command!!", e);
          return null;
        }
      }
      else {
        return cf.createCommand(request, workspace);
      }
    } else {
      logger.error("Command " + request.getParameter("command")
          + " not found!");
      return null;
View Full Code Here

        uc = new UpdateContainer();
      }
      CommandFactory cf = commandFactoryMap.get(commObject.get(HistoryArguments.commandName.name()));
      if(cf != null) {
        try { // This is sort of a hack the way I did this, but could not think of a better way to get rid of the dependency
          Command comm = cf.createCommand(inputParamArr, workspace);
          if(comm != null){
            try {
              comm.setExecutedInBatch(true);
              logger.info("Executing command: " + commandName);
              uc.append(workspace.getCommandHistory().doCommand(comm, workspace, saveToHistory));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.