Method method = pair.getLeft().getClass().getMethod("setTransformationCode", String.class); method.invoke(pair.getLeft(), HistoryJsonUtil.getStringValue("transformationCode", (JSONArray)pair.getRight())); container.append(pair.getLeft().doIt(workspace)); } catch (Exception e) { logger.warn("Method invocation failure", e); container.append(pair.getLeft().doIt(workspace)); worksheetCommandHistory.insertCommandToHistory(pair.getLeft());
effects.append(((ICommand) consolidatedCommand.getRight()).doIt(workspace)); effects.append(((ICommand) consolidatedCommand.getRight()).doIt(workspace)); worksheetCommandHistory.replaceCommandFromHistory(consolidatedCommand.getKey(), (ICommand)consolidatedCommand.getRight()); effects.append(((ICommand) consolidatedCommand.getRight()).doIt(workspace)); effects.append(((ICommand) consolidatedCommand.getRight()).doIt(workspace)); ICommand runCommand = ((ICommand) consolidatedCommand.getRight()); worksheetCommandHistory.insertCommandToHistory(runCommand); effects.append(runCommand.doIt(workspace));
@Override public UpdateContainer undoIt(Workspace workspace) { for (Node node : affectedNodes) { HNode hNode = workspace.getFactory().getHNode(node.getHNodeId()); hNode.removeNestedTable(); node.setNestedTable(null, workspace.getFactory()); node.clearValue(NodeStatus.original); } affectedNodes.clear(); try { if(previousPythonTransformationCommand instanceof SubmitPythonTransformationCommand) { SubmitPythonTransformationCommand prevCommand = (SubmitPythonTransformationCommand)previousPythonTransformationCommand; //Previous python command exists, lets reset the values, and then start again prevCommand.resetColumnValues(workspace); } UpdateContainer uc = previousPythonTransformationCommand.doIt(workspace); return uc; } catch (CommandException e) { return new UpdateContainer(new ErrorUpdate("Error occured while applying previous Python transformation to the column.")); } }
UpdateContainer uc = previousPythonTransformationCommand.doIt(workspace); return uc; } catch (CommandException e) {