Class SimpleRulesTableBuilder
- java.lang.Object
-
- org.openl.rules.table.xls.builder.TableBuilder
-
- org.openl.rules.table.xls.builder.SimpleRulesTableBuilder
-
public class SimpleRulesTableBuilder extends TableBuilder
Helper class that allows creating new SimpleRules tables in specified excel sheet.- Author:
- Pavel Tarasevich
-
-
Field Summary
Fields Modifier and Type Field Description static intLOGIC_ELEMENT_HEIGHTNumber of rows that usually are used for table logic element.-
Fields inherited from class org.openl.rules.table.xls.builder.TableBuilder
HEADER_HEIGHT, PROPERTIES_MIN_WIDTH, TABLE_PROPERTIES
-
-
Constructor Summary
Constructors Constructor Description SimpleRulesTableBuilder(XlsSheetGridModel gridModel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeginTable(int width, int height)Begins writing a table.voidendTable()Finishes writing a table.voidwriteHeader(String signature, ICellStyle style)Writes decision table header.voidwriteTableBodyRow(List<Map<String,Object>> row)-
Methods inherited from class org.openl.rules.table.xls.builder.TableBuilder
beginTable, getCurrentRow, getDefaultCellStyle, getDefaultDateCellStyle, getGridModel, getHeight, getTableRegion, getWidth, incCurrentRow, incCurrentRow, save, writeCell, writeCell, writeCell, writeGridTable, writeProperties
-
-
-
-
Field Detail
-
LOGIC_ELEMENT_HEIGHT
public static final int LOGIC_ELEMENT_HEIGHT
Number of rows that usually are used for table logic element. That is conditions title- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SimpleRulesTableBuilder
public SimpleRulesTableBuilder(XlsSheetGridModel gridModel)
-
-
Method Detail
-
beginTable
public void beginTable(int width, int height) throws CreateTableExceptionDescription copied from class:TableBuilderBegins writing a table.- Overrides:
beginTablein classTableBuilder- Parameters:
width- table width in cellsheight- table height in cells- Throws:
CreateTableException- if unable to create table
-
endTable
public void endTable() throws CreateTableExceptionDescription copied from class:TableBuilderFinishes writing a table. Saves the changes to excel sheet.- Overrides:
endTablein classTableBuilder- Throws:
CreateTableException- if an exception occurred when saving
-
writeHeader
public void writeHeader(String signature, ICellStyle style)
Writes decision table header.
Requires the header signature, e.g.void hello1(int hour)
without Decision table header tokenRules- Overrides:
writeHeaderin classTableBuilder- Parameters:
signature- method signature for the table.style- header style
-
-