Package org.drools.template
Class DataProviderCompiler
- java.lang.Object
-
- org.drools.template.DataProviderCompiler
-
- Direct Known Subclasses:
ObjectDataCompiler
public class DataProviderCompiler extends Object
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 Constructor Description DataProviderCompiler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
closeStream(InputStream stream)
String
compile(DataProvider dataProvider, InputStream templateStream)
Generates DRL from a data provider for the spreadsheet data and templates.String
compile(DataProvider dataProvider, InputStream templateStream, boolean replaceOptionals)
Generates DRL from a data provider for the spreadsheet data and templates.String
compile(DataProvider dataProvider, String template)
Generates DRL from a data provider for the spreadsheet data and templates.String
compile(DataProvider dataProvider, String template, boolean replaceOptionals)
Generates DRL from a data provider for the spreadsheet data and templates.String
compile(DataProvider dataProvider, TemplateDataListener listener)
Generates DRL from a data provider for the spreadsheet data and templates.String
compile(DataProvider dataProvider, TemplateDataListener listener, boolean replaceOptionals)
Generates DRL from a data provider for the spreadsheet data and templates.void
newCell(List<DataListener> listeners, int row, int column, String value, int mergedColStart)
-
-
-
Method Detail
-
compile
public String compile(DataProvider dataProvider, String template)
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)
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)
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
public String compile(DataProvider dataProvider, String template, boolean replaceOptionals)
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
protected void closeStream(InputStream stream)
-
-