@Test public void testCanvasCommandAllow() { makeCommand(0); final Command<AbstractCanvasHandler, CanvasViolation> c = command.newCanvasCommand(handler); assertEquals(CanvasCommandResultBuilder.SUCCESS, c.allow(handler)); }
@Override protected Command<AbstractCanvasHandler, CanvasViolation> newCanvasCommand(final AbstractCanvasHandler handler) { return new AbstractCanvasCommand() { @Override public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler handler) { uiModel.deleteRow(uiRowIndex); updateRowNumbers(); updateParentInformation(); canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } @Override public CommandResult<CanvasViolation> undo(final AbstractCanvasHandler handler) { uiModel.insertRow(uiRowIndex, oldUiModelRow); updateRowNumbers(); updateParentInformation(); canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } }; }
DeleteParameterBindingCommand extends AbstractCanvasGraphCommand implements VetoExecutionCommand,
                                                                                         VetoUndoCommand { @Override protected Command<AbstractCanvasHandler, CanvasViolation> newCanvasCommand(final AbstractCanvasHandler handler) { return new AbstractCanvasCommand() { @Override public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler handler) { uiModel.deleteRow(uiRowIndex); updateRowNumbers(); updateParentInformation(); canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } @Override public CommandResult<CanvasViolation> undo(final AbstractCanvasHandler handler) { uiModel.insertRow(uiRowIndex, oldUiModelRow); updateRowNumbers(); updateParentInformation(); canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } }; } }
DeleteParameterBindingCommand extends AbstractCanvasGraphCommand implements VetoExecutionCommand,
                                                                                         VetoUndoCommand { @Override protected Command<AbstractCanvasHandler, CanvasViolation> newCanvasCommand(final AbstractCanvasHandler handler) { return new AbstractCanvasCommand() { @Override public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler handler) { uiModel.deleteRow(uiRowIndex); updateRowNumbers(); updateParentInformation(); canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } @Override public CommandResult<CanvasViolation> undo(final AbstractCanvasHandler handler) { uiModel.insertRow(uiRowIndex, oldUiModelRow); updateRowNumbers(); updateParentInformation(); canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } }; } DeleteParameterBindingCommand(final Invocation invocation,
                                         final GridData uiModel,
                                         final int uiRowIndex,
                                         final org.uberfire.mvp.Command canvasOperation); }
DeleteParameterBindingCommand extends AbstractCanvasGraphCommand implements VetoExecutionCommand,
                                                                                         VetoUndoCommand { @Override protected Command<AbstractCanvasHandler, CanvasViolation> newCanvasCommand(final AbstractCanvasHandler handler) { return new AbstractCanvasCommand() { @Override public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler handler) { uiModel.deleteRow(uiRowIndex); updateRowNumbers(); updateParentInformation(); canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } @Override public CommandResult<CanvasViolation> undo(final AbstractCanvasHandler handler) { uiModel.insertRow(uiRowIndex, oldUiModelRow); updateRowNumbers(); updateParentInformation(); canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } }; } DeleteParameterBindingCommand(final Invocation invocation,
                                         final GridData uiModel,
                                         final int uiRowIndex,
                                         final org.uberfire.mvp.Command canvasOperation); void updateRowNumbers(); void updateParentInformation(); }
DeleteParameterBindingCommand extends AbstractCanvasGraphCommand implements VetoExecutionCommand,
                                                                                         VetoUndoCommand { @Override protected Command<AbstractCanvasHandler, CanvasViolation> newCanvasCommand(final AbstractCanvasHandler handler) { return new AbstractCanvasCommand() { @Override public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler handler) { uiModel.deleteRow(uiRowIndex); updateRowNumbers(); updateParentInformation(); canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } @Override public CommandResult<CanvasViolation> undo(final AbstractCanvasHandler handler) { uiModel.insertRow(uiRowIndex, oldUiModelRow); updateRowNumbers(); updateParentInformation(); canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } }; } DeleteParameterBindingCommand(final Invocation invocation,
                                         final GridData uiModel,
                                         final int uiRowIndex,
                                         final org.uberfire.mvp.Command canvasOperation); void updateRowNumbers(); void updateParentInformation();  }