@Test public void simpleBRLConditionColumn() { final AtomicBoolean calledBack = new AtomicBoolean(false); setupBRLConditionColumn(); builder.generateDefinition(dtPresenter, model.getExpandedColumns().get(3), (String definition) -> { calledBack.set(true); assertEquals("Person( name == \"x\" )<br/>" + "Smurf( colour == \"x\" )", definition); }); assertTrue(calledBack.get()); }
@Override public void generateDefinition(final GuidedDecisionTableView.Presenter dtPresenter, final BaseColumn column, final Callback<String> afterGenerationCallback) { if (!(column instanceof BRLConditionVariableColumn)) { return; } final GuidedDecisionTable52 existingModel = dtPresenter.getModel(); final BRLConditionVariableColumn brlVariableColumn = (BRLConditionVariableColumn) column; final BRLConditionColumn brlColumn = existingModel.getBRLColumn(brlVariableColumn); final GuidedDecisionTable52 partialModel = new GuidedDecisionTable52(); final ColumnUtilities columnUtilities = new ColumnUtilities(existingModel, dtPresenter.getDataModelOracle()); partialModel.getConditions().add(brlColumn); partialModel.getData().add(makeRowData(columnUtilities, brlColumn)); generateDefinitionOnServer(partialModel, dtPresenter.getCurrentPath(), (String drl) -> afterGenerationCallback.callback(getLHS(drl))); }
BRLConditionColumnDefinitionBuilder extends BaseColumnDefinitionBuilder { @Override public void generateDefinition(final GuidedDecisionTableView.Presenter dtPresenter, final BaseColumn column, final Callback<String> afterGenerationCallback) { if (!(column instanceof BRLConditionVariableColumn)) { return; } final GuidedDecisionTable52 existingModel = dtPresenter.getModel(); final BRLConditionVariableColumn brlVariableColumn = (BRLConditionVariableColumn) column; final BRLConditionColumn brlColumn = existingModel.getBRLColumn(brlVariableColumn); final GuidedDecisionTable52 partialModel = new GuidedDecisionTable52(); final ColumnUtilities columnUtilities = new ColumnUtilities(existingModel, dtPresenter.getDataModelOracle()); partialModel.getConditions().add(brlColumn); partialModel.getData().add(makeRowData(columnUtilities, brlColumn)); generateDefinitionOnServer(partialModel, dtPresenter.getCurrentPath(), (String drl) -> afterGenerationCallback.callback(getLHS(drl))); } }
BRLConditionColumnDefinitionBuilder extends BaseColumnDefinitionBuilder { @Override public void generateDefinition(final GuidedDecisionTableView.Presenter dtPresenter, final BaseColumn column, final Callback<String> afterGenerationCallback) { if (!(column instanceof BRLConditionVariableColumn)) { return; } final GuidedDecisionTable52 existingModel = dtPresenter.getModel(); final BRLConditionVariableColumn brlVariableColumn = (BRLConditionVariableColumn) column; final BRLConditionColumn brlColumn = existingModel.getBRLColumn(brlVariableColumn); final GuidedDecisionTable52 partialModel = new GuidedDecisionTable52(); final ColumnUtilities columnUtilities = new ColumnUtilities(existingModel, dtPresenter.getDataModelOracle()); partialModel.getConditions().add(brlColumn); partialModel.getData().add(makeRowData(columnUtilities, brlColumn)); generateDefinitionOnServer(partialModel, dtPresenter.getCurrentPath(), (String drl) -> afterGenerationCallback.callback(getLHS(drl))); } @Inject  BRLConditionColumnDefinitionBuilder(final Caller<GuidedDecisionTableEditorService> service); }
BRLConditionColumnDefinitionBuilder extends BaseColumnDefinitionBuilder { @Override public void generateDefinition(final GuidedDecisionTableView.Presenter dtPresenter, final BaseColumn column, final Callback<String> afterGenerationCallback) { if (!(column instanceof BRLConditionVariableColumn)) { return; } final GuidedDecisionTable52 existingModel = dtPresenter.getModel(); final BRLConditionVariableColumn brlVariableColumn = (BRLConditionVariableColumn) column; final BRLConditionColumn brlColumn = existingModel.getBRLColumn(brlVariableColumn); final GuidedDecisionTable52 partialModel = new GuidedDecisionTable52(); final ColumnUtilities columnUtilities = new ColumnUtilities(existingModel, dtPresenter.getDataModelOracle()); partialModel.getConditions().add(brlColumn); partialModel.getData().add(makeRowData(columnUtilities, brlColumn)); generateDefinitionOnServer(partialModel, dtPresenter.getCurrentPath(), (String drl) -> afterGenerationCallback.callback(getLHS(drl))); } @Inject  BRLConditionColumnDefinitionBuilder(final Caller<GuidedDecisionTableEditorService> service); @Override Class getSupportedColumnType(); @Override void generateDefinition(final GuidedDecisionTableView.Presenter dtPresenter,
                                   final BaseColumn column,
                                   final Callback<String> afterGenerationCallback); }
BRLConditionColumnDefinitionBuilder extends BaseColumnDefinitionBuilder { @Override public void generateDefinition(final GuidedDecisionTableView.Presenter dtPresenter, final BaseColumn column, final Callback<String> afterGenerationCallback) { if (!(column instanceof BRLConditionVariableColumn)) { return; } final GuidedDecisionTable52 existingModel = dtPresenter.getModel(); final BRLConditionVariableColumn brlVariableColumn = (BRLConditionVariableColumn) column; final BRLConditionColumn brlColumn = existingModel.getBRLColumn(brlVariableColumn); final GuidedDecisionTable52 partialModel = new GuidedDecisionTable52(); final ColumnUtilities columnUtilities = new ColumnUtilities(existingModel, dtPresenter.getDataModelOracle()); partialModel.getConditions().add(brlColumn); partialModel.getData().add(makeRowData(columnUtilities, brlColumn)); generateDefinitionOnServer(partialModel, dtPresenter.getCurrentPath(), (String drl) -> afterGenerationCallback.callback(getLHS(drl))); } @Inject  BRLConditionColumnDefinitionBuilder(final Caller<GuidedDecisionTableEditorService> service); @Override Class getSupportedColumnType(); @Override void generateDefinition(final GuidedDecisionTableView.Presenter dtPresenter,
                                   final BaseColumn column,
                                   final Callback<String> afterGenerationCallback);  }