com.extentech.ExtenXLS.binder
Class ExtenXLSReportFactory

java.lang.Object
  extended by com.extentech.ExtenXLS.binder.ExtenXLSReportFactory
Direct Known Subclasses:
XMLCellBinder

public class ExtenXLSReportFactory
extends Object

This class is responsible for managing ExtenXLS Reporting
sessions for a single ExtenXLS Report.


Provides:

- shared XLS template instance
- manages CellBinders


Since:
1.3
Version:
4.1
Author:
John McMahon -- Copyright ©2011Extentech Inc.
See Also:
LogOutputter, ExtenDataObject, CellHandle, XLSRecord, ExtenDataObject

Constructor Summary
ExtenXLSReportFactory(com.extentech.toolkit.LogOutputter logr)
          Constructor which takes a logger
ExtenXLSReportFactory(com.extentech.toolkit.LogOutputter logr, String wd)
          Constructor for the Factory which takes a logger and a full path to the working directory.
 
Method Summary
 DataObject createNamedRangeDataObjectX(NameHandle n)
          Create a namedRangeDataObject off of a NameHandle.
 byte[] generateReport(Map vars)
          this method returns a byte array containing an XLS report populated with values from the CellBinder.
 int generateReport(String RDFFile, String OutputRDFile, String outputFile, HashMap values)
          Generates a report from an Input Rdf, and optional Output Rdf and an output filename.
 WorkBook generateWorkBookHandle(Map vars)
          this method returns a WorkBookHandle populated with values from the CellBinder.
 WorkBook generateWorkBookHandle(Map vars, boolean resettrackers)
          this method returns a WorkBookHandle populated with values from the CellBinder.
 List getDataObjects()
           
 Vector getDBConnectionCellBinders()
           
 DataObject getParentDataObject()
           
 List getRESTEmit()
           
 WorkBook getWorkBook()
           
 String getWorkingdir()
           
 void init(Object rdf)
          Initialize with the path to the RDF (Report Definition File)
 void init(Object rdf, DocumentHandle bk)
          Initialize with the path to the RDF (Report Definition File)
 void setDebugLevel(int i)
           
 void setValues(HashMap values)
          inputs BeanBinder data objects and their bean names into values HashMap
 void setWorkBook(WorkBook book)
           
 void setWorkingdir(String workingdir)
           
 void write(OutputStream out, Map vars)
          this method returns a byte array containing an XLS report populated with values from the CellBinder.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtenXLSReportFactory

public ExtenXLSReportFactory(com.extentech.toolkit.LogOutputter logr,
                             String wd)
Constructor for the Factory which takes a logger and a full path to the working directory.

Parameters:
logr -
workingdir -

ExtenXLSReportFactory

public ExtenXLSReportFactory(com.extentech.toolkit.LogOutputter logr)
Constructor which takes a logger

Parameters:
logr -
Method Detail

setDebugLevel

public void setDebugLevel(int i)

init

public void init(Object rdf,
                 DocumentHandle bk)
          throws Exception
Initialize with the path to the RDF (Report Definition File)

Parameters:
rdf - - can be a URL, InputStream, or File path String
Throws:
Exception

init

public void init(Object rdf)
          throws Exception
Initialize with the path to the RDF (Report Definition File)

Parameters:
rdf - - can be a URL, InputStream, or File path String
Throws:
Exception

setValues

public void setValues(HashMap values)
inputs BeanBinder data objects and their bean names into values HashMap


generateReport

public int generateReport(String RDFFile,
                          String OutputRDFile,
                          String outputFile,
                          HashMap values)
Generates a report from an Input Rdf, and optional Output Rdf and an output filename. callable from ActiveX container

Parameters:
RDFFile= - input RDF that produces an XLS template (either the output XLS file or intermediary XLS before XML Conversion)
OutputRDFFile= - output RDF that determines mappings for output XML file (only used at this point for XML output)
outputFile= - String representing the filename that is to be written .XLS extension results in Excel output; .XML extension results in XML output
values - HashMap of values, if any (old method?)
Returns:
int 1=success. 0=VB/ActiveX error -1=our error/caught error (why not return boolean? - to distinguish failure between a VB/ActiveX nebulous/unknown issue, or an actual error)

write

public void write(OutputStream out,
                  Map vars)
           throws Exception
this method returns a byte array containing an XLS report populated with values from the CellBinder. Parameters to the CellBinder are provided by the request.

Throws:
Exception

generateReport

public byte[] generateReport(Map vars)
                      throws Exception
this method returns a byte array containing an XLS report populated with values from the CellBinder. Parameters to the CellBinder are provided by the request.

Throws:
Exception

generateWorkBookHandle

public WorkBook generateWorkBookHandle(Map vars,
                                       boolean resettrackers)
                                throws Exception
this method returns a WorkBookHandle populated with values from the CellBinder. Set debuglevel > 3 to output progress and SQL error connection URL. Parameters to the CellBinder are provided by the request.

Throws:
Exception

generateWorkBookHandle

public WorkBook generateWorkBookHandle(Map vars)
                                throws Exception
this method returns a WorkBookHandle populated with values from the CellBinder. Set debuglevel > 3 to output progress and SQL error connection URL. Parameters to the CellBinder are provided by the request.

Throws:
Exception

getWorkingdir

public String getWorkingdir()

setWorkingdir

public void setWorkingdir(String workingdir)

getDataObjects

public List getDataObjects()

getParentDataObject

public DataObject getParentDataObject()

createNamedRangeDataObjectX

public DataObject createNamedRangeDataObjectX(NameHandle n)
Create a namedRangeDataObject off of a NameHandle. The idea is that it will parse the xml file and look for dobj that exist with a "name" value. Then it will map the colinfos

Parameters:
n -
Returns:

getDBConnectionCellBinders

public Vector getDBConnectionCellBinders()

getWorkBook

public WorkBook getWorkBook()
Returns:
Returns the book.

setWorkBook

public void setWorkBook(WorkBook book)
Parameters:
book - The book to set.

getRESTEmit

public List getRESTEmit()
Returns:
Returns the rESTEmit.


Copyright © 2011 Extentech Inc. All Rights Reserved.