use of org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 in project drools-wb by kiegroup.
the class GuidedDecisionTableDateExpiresBuilder method populateDecisionTable.
@Override
public void populateDecisionTable(final GuidedDecisionTable52 dtable, final int maxRowCount) {
final AttributeCol52 column = new AttributeCol52();
column.setAttribute(GuidedDecisionTable52.DATE_EXPIRES_ATTR);
dtable.getAttributeCols().add(column);
if (this.values.size() < maxRowCount) {
for (int iRow = this.values.size(); iRow < maxRowCount; iRow++) {
this.values.add(new DTCellValue52(""));
}
}
addColumnData(dtable, column);
}
use of org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 in project drools-wb by kiegroup.
the class GuidedDecisionTableDescriptionBuilder method populateDecisionTable.
@Override
public void populateDecisionTable(final GuidedDecisionTable52 dtable, final int maxRowCount) {
final DescriptionCol52 column = new DescriptionCol52();
dtable.setDescriptionCol(column);
if (this.values.size() < maxRowCount) {
for (int iRow = this.values.size(); iRow < maxRowCount; iRow++) {
this.values.add(new DTCellValue52(""));
}
}
addColumnData(dtable, column);
}
use of org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 in project drools-wb by kiegroup.
the class GuidedDecisionTableDurationBuilder method addCellValue.
@Override
public void addCellValue(final int row, final int column, final String value) {
final DTCellValue52 dcv = new DTCellValue52(0);
try {
dcv.setNumericValue(Long.valueOf(value));
} catch (NumberFormatException nfe) {
final String message = "Duration is not an long literal, in cell " + RuleSheetParserUtil.rc2name(row, column);
this.conversionResult.addMessage(message, ConversionMessageType.WARNING);
}
this.values.add(dcv);
}
use of org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 in project drools-wb by kiegroup.
the class GuidedDecisionTableDurationBuilder method populateDecisionTable.
@Override
public void populateDecisionTable(final GuidedDecisionTable52 dtable, final int maxRowCount) {
final AttributeCol52 column = new AttributeCol52();
column.setAttribute(GuidedDecisionTable52.DURATION_ATTR);
dtable.getAttributeCols().add(column);
if (this.values.size() < maxRowCount) {
for (int iRow = this.values.size(); iRow < maxRowCount; iRow++) {
final DTCellValue52 dcv = new DTCellValue52(0);
this.values.add(dcv);
}
}
addColumnData(dtable, column);
}
use of org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 in project drools-wb by kiegroup.
the class GuidedDecisionTableMetadataBuilder method addCellValue.
@Override
public void addCellValue(final int row, final int column, final String value) {
final String content = this.definitions.get(column);
if (content == null) {
final String message = "No code snippet for METADATA in cell " + RuleSheetParserUtil.rc2name(this.headerRow + 2, this.headerCol);
this.conversionResult.addMessage(message, ConversionMessageType.ERROR);
}
final DTCellValue52 dcv = new DTCellValue52(value);
this.values.add(dcv);
}
Aggregations