@Test public void testGraphCommandAllow() { final Command<GraphCommandExecutionContext, RuleViolation> c = command.newGraphCommand(handler); assertEquals(GraphCommandResultBuilder.SUCCESS, c.allow(gce)); }
@Override protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler handler) { return new AbstractGraphCommand() { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext gce) { return GraphCommandResultBuilder.SUCCESS; } @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext gce) { parameter.getName().setValue(name); return GraphCommandResultBuilder.SUCCESS; } @Override public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext gce) { parameter.getName().setValue(oldName); return GraphCommandResultBuilder.SUCCESS; } }; }
UpdateParameterNameCommand extends AbstractCanvasGraphCommand implements VetoExecutionCommand,
                                                                                      VetoUndoCommand { @Override protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler handler) { return new AbstractGraphCommand() { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext gce) { return GraphCommandResultBuilder.SUCCESS; } @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext gce) { parameter.getName().setValue(name); return GraphCommandResultBuilder.SUCCESS; } @Override public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext gce) { parameter.getName().setValue(oldName); return GraphCommandResultBuilder.SUCCESS; } }; } }
UpdateParameterNameCommand extends AbstractCanvasGraphCommand implements VetoExecutionCommand,
                                                                                      VetoUndoCommand { @Override protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler handler) { return new AbstractGraphCommand() { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext gce) { return GraphCommandResultBuilder.SUCCESS; } @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext gce) { parameter.getName().setValue(name); return GraphCommandResultBuilder.SUCCESS; } @Override public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext gce) { parameter.getName().setValue(oldName); return GraphCommandResultBuilder.SUCCESS; } }; } UpdateParameterNameCommand(final InformationItem parameter,
                                      final String name,
                                      final org.uberfire.mvp.Command canvasOperation); }
UpdateParameterNameCommand extends AbstractCanvasGraphCommand implements VetoExecutionCommand,
                                                                                      VetoUndoCommand { @Override protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler handler) { return new AbstractGraphCommand() { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext gce) { return GraphCommandResultBuilder.SUCCESS; } @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext gce) { parameter.getName().setValue(name); return GraphCommandResultBuilder.SUCCESS; } @Override public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext gce) { parameter.getName().setValue(oldName); return GraphCommandResultBuilder.SUCCESS; } }; } UpdateParameterNameCommand(final InformationItem parameter,
                                      final String name,
                                      final org.uberfire.mvp.Command canvasOperation);  }
UpdateParameterNameCommand extends AbstractCanvasGraphCommand implements VetoExecutionCommand,
                                                                                      VetoUndoCommand { @Override protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler handler) { return new AbstractGraphCommand() { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext gce) { return GraphCommandResultBuilder.SUCCESS; } @Override public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext gce) { parameter.getName().setValue(name); return GraphCommandResultBuilder.SUCCESS; } @Override public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext gce) { parameter.getName().setValue(oldName); return GraphCommandResultBuilder.SUCCESS; } }; } UpdateParameterNameCommand(final InformationItem parameter,
                                      final String name,
                                      final org.uberfire.mvp.Command canvasOperation);   }