use of org.drools.workbench.services.verifier.plugin.client.builders.VerifierColumnUtilities in project drools-wb by kiegroup.
the class DTableUpdateManager method makeRule.
public void makeRule(final GuidedDecisionTable52 model, final HeaderMetaData headerMetaData, final FactTypes factTypes, final int rowIndex) throws BuildException {
PortablePreconditions.checkNotNull("model", model);
PortablePreconditions.checkNotNull("fieldTypes", factTypes);
PortablePreconditions.checkNotNull("index", rowIndex);
final Rule rule = new BuilderFactory(new VerifierColumnUtilities(model, headerMetaData, factTypes), this.index, model, headerMetaData, configuration).getRuleBuilder().with(rowIndex).build();
analyzer.newRule(rule);
analyzer.analyze();
}
use of org.drools.workbench.services.verifier.plugin.client.builders.VerifierColumnUtilities in project drools-wb by kiegroup.
the class DTableUpdateManager method newColumn.
public void newColumn(final GuidedDecisionTable52 model, final HeaderMetaData headerMetaData, final FactTypes factTypes, final int columnIndex) throws BuildException {
PortablePreconditions.checkNotNull("model", model);
PortablePreconditions.checkNotNull("headerMetaData", headerMetaData);
PortablePreconditions.checkNotNull("fieldTypes", factTypes);
PortablePreconditions.checkNotNull("columnIndex", columnIndex);
final BuilderFactory builderFactory = new BuilderFactory(new VerifierColumnUtilities(model, headerMetaData, factTypes), index, model, headerMetaData, configuration);
final Column column = builderFactory.getColumnBuilder().with(columnIndex).build();
analyzer.newColumn(column);
int rowIndex = 0;
for (final List<DTCellValue52> row : model.getData()) {
final BaseColumn baseColumn = model.getExpandedColumns().get(columnIndex);
final Rule rule = index.getRules().where(Rule.index().is(rowIndex)).select().first();
builderFactory.getCellBuilder().with(columnIndex).with(baseColumn).with(rule).with(row).build();
rowIndex++;
}
analyzer.resetChecks();
analyzer.analyze();
}
Aggregations