Package org.drools.template
Class DataProviderCompiler
java.lang.Object
org.drools.template.DataProviderCompiler
- Direct Known Subclasses:
ObjectDataCompiler
An object of this class acts as a template compiler, inserting spreadsheet
data into templates. Template data may come from a resource or an
InputStream, or you may provide a TemplateDataListener.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcloseStream(InputStream stream) compile(DataProvider dataProvider, InputStream templateStream) Generates DRL from a data provider for the spreadsheet data and templates.compile(DataProvider dataProvider, InputStream templateStream, boolean replaceOptionals) Generates DRL from a data provider for the spreadsheet data and templates.compile(DataProvider dataProvider, String template) Generates DRL from a data provider for the spreadsheet data and templates.compile(DataProvider dataProvider, String template, boolean replaceOptionals) Generates DRL from a data provider for the spreadsheet data and templates.compile(DataProvider dataProvider, TemplateDataListener listener) Generates DRL from a data provider for the spreadsheet data and templates.compile(DataProvider dataProvider, TemplateDataListener listener, boolean replaceOptionals) Generates DRL from a data provider for the spreadsheet data and templates.voidnewCell(List<DataListener> listeners, int row, int column, String value, int mergedColStart)
-
Constructor Details
-
DataProviderCompiler
public DataProviderCompiler()
-
-
Method Details
-
compile
Generates DRL from a data provider for the spreadsheet data and templates.- Parameters:
dataProvider- the data provider for the spreadsheet datatemplate- the string containing the template resource name- Returns:
- the generated DRL text as a String
-
compile
Generates DRL from a data provider for the spreadsheet data and templates.- Parameters:
dataProvider- the data provider for the spreadsheet datatemplateStream- the InputStream for reading the templates- Returns:
- the generated DRL text as a String
-
compile
Generates DRL from a data provider for the spreadsheet data and templates.- Parameters:
dataProvider- the data provider for the spreadsheet datalistener- a template data listener- Returns:
- the generated DRL text as a String
-
compile
Generates DRL from a data provider for the spreadsheet data and templates.- Parameters:
dataProvider- the data provider for the spreadsheet datatemplate- the string containing the template resource name- Returns:
- the generated DRL text as a String
-
compile
public String compile(DataProvider dataProvider, InputStream templateStream, boolean replaceOptionals) Generates DRL from a data provider for the spreadsheet data and templates.- Parameters:
dataProvider- the data provider for the spreadsheet datatemplateStream- the InputStream for reading the templates- Returns:
- the generated DRL text as a String
-
compile
public String compile(DataProvider dataProvider, TemplateDataListener listener, boolean replaceOptionals) Generates DRL from a data provider for the spreadsheet data and templates.- Parameters:
dataProvider- the data provider for the spreadsheet datalistener- a template data listener- Returns:
- the generated DRL text as a String
-
newCell
public void newCell(List<DataListener> listeners, int row, int column, String value, int mergedColStart) -
closeStream
-