net.bpelunit.framework.control.datasource.excel
Class ExcelDataSource

java.lang.Object
  extended by net.bpelunit.framework.control.datasource.excel.ExcelDataSource
All Implemented Interfaces:
IDataSource

public class ExcelDataSource
extends Object
implements IDataSource

A data source that can read Excel files (incl .xlsx from Excel 2007). Following restrictions apply to the Excel files:

Author:
Daniel Luebke

Nested Class Summary
 
Nested classes/interfaces inherited from interface net.bpelunit.framework.control.ext.IDataSource
IDataSource.ConfigurationOption, IDataSource.DataSource
 
Constructor Summary
ExcelDataSource()
           
 
Method Summary
 void close()
           
 String[] getFieldNames()
           
 int getNumberOfRows()
           
 String getValueFor(String fieldName)
           
 void loadFromStream(InputStream data)
           
protected  org.apache.poi.ss.usermodel.Workbook readWorkbook(InputStream data)
           
 void setRow(int index)
           
 void setSheet(String index)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExcelDataSource

public ExcelDataSource()
Method Detail

close

public void close()
Specified by:
close in interface IDataSource

getFieldNames

public String[] getFieldNames()
Specified by:
getFieldNames in interface IDataSource

getValueFor

public String getValueFor(String fieldName)
Specified by:
getValueFor in interface IDataSource

setRow

public void setRow(int index)
            throws DataSourceException
Specified by:
setRow in interface IDataSource
Throws:
DataSourceException

loadFromStream

public void loadFromStream(InputStream data)
                    throws DataSourceException
Specified by:
loadFromStream in interface IDataSource
Throws:
DataSourceException

readWorkbook

protected org.apache.poi.ss.usermodel.Workbook readWorkbook(InputStream data)
                                                     throws DataSourceException
Throws:
DataSourceException

setSheet

public void setSheet(String index)

getNumberOfRows

public int getNumberOfRows()
Specified by:
getNumberOfRows in interface IDataSource


Copyright © 2012 Leibniz Universität Hannover. All Rights Reserved.