Class DataProviderCompiler

  • Direct Known Subclasses:
    ObjectDataCompiler

    public class DataProviderCompiler
    extends java.lang.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.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void closeStream​(java.io.InputStream stream)  
      java.lang.String compile​(DataProvider dataProvider, java.io.InputStream templateStream)
      Generates DRL from a data provider for the spreadsheet data and templates.
      java.lang.String compile​(DataProvider dataProvider, java.io.InputStream templateStream, boolean replaceOptionals)
      Generates DRL from a data provider for the spreadsheet data and templates.
      java.lang.String compile​(DataProvider dataProvider, java.lang.String template)
      Generates DRL from a data provider for the spreadsheet data and templates.
      java.lang.String compile​(DataProvider dataProvider, java.lang.String template, boolean replaceOptionals)
      Generates DRL from a data provider for the spreadsheet data and templates.
      java.lang.String compile​(DataProvider dataProvider, TemplateDataListener listener)
      Generates DRL from a data provider for the spreadsheet data and templates.
      java.lang.String compile​(DataProvider dataProvider, TemplateDataListener listener, boolean replaceOptionals)
      Generates DRL from a data provider for the spreadsheet data and templates.
      void newCell​(java.util.List<DataListener> listeners, int row, int column, java.lang.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 java.lang.String compile​(DataProvider dataProvider,
                                        java.lang.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 java.lang.String compile​(DataProvider dataProvider,
                                        java.io.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 java.lang.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
      • compile

        public java.lang.String compile​(DataProvider dataProvider,
                                        java.lang.String template,
                                        boolean replaceOptionals)
        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 java.lang.String compile​(DataProvider dataProvider,
                                        java.io.InputStream templateStream,
                                        boolean replaceOptionals)
        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 java.lang.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 data
        listener - a template data listener
        Returns:
        the generated DRL text as a String
      • newCell

        public void newCell​(java.util.List<DataListener> listeners,
                            int row,
                            int column,
                            java.lang.String value,
                            int mergedColStart)
      • closeStream

        protected void closeStream​(java.io.InputStream stream)