org.drools.template
Class DataProviderCompiler

java.lang.Object
  extended by 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
DataProviderCompiler()
           
 
Method Summary
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, String template)
          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.
 void newCell(List<DataListener> listeners, int row, int column, String value, int mergedColStart)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataProviderCompiler

public DataProviderCompiler()
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 data
template - 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 data
templateStream - 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 data
listener - 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)


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.