public abstract class ExcelDataProvider extends CommonDataProvider implements DataInputProvider, DataOutputProvider
CommonDataProvider.ResultColumnNames
DataProvider.type
columns, dataInPath, dataOutPath, indexData, resultColumnName, scenarioName
Constructor and Description |
---|
ExcelDataProvider() |
Modifier and Type | Method and Description |
---|---|
int |
getNbLines()
Gets the number of readable lines of current opened file.
|
protected void |
initColumns() |
protected void |
openInputData() |
String[] |
readLine(int line,
boolean readResult) |
String |
readValue(String column,
int line)
Reads a cell of opened input file.
|
void |
writeDataResult(String column,
int line,
String value)
Writes some data as result.
|
void |
writeFailedResult(int line,
String value)
Writes a fail result
|
void |
writeSuccessResult(int line)
Writes a success result
|
void |
writeWarningResult(int line,
String value)
Writes a warning result
|
getIndexData, getModel, getNbGherkinExample, getResultColumnName, isResultColumnNameAuthorized, setDataInPath, setDataOutPath, setIndexData, writeValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getIndexData, getModel, getNbGherkinExample, getResultColumnName, isResultColumnNameAuthorized, prepare, setDataInPath, setDataOutPath, setIndexData
public int getNbLines() throws TechnicalException
getNbLines
in interface DataInputProvider
TechnicalException
- if Wrong data file (IOException, EmptyDataFileContentException or WrongDataFileFormatException)public void writeFailedResult(int line, String value)
writeFailedResult
in interface DataOutputProvider
writeFailedResult
in class CommonDataProvider
line
- The line numbervalue
- The valuepublic void writeSuccessResult(int line)
writeSuccessResult
in interface DataOutputProvider
writeSuccessResult
in class CommonDataProvider
line
- The line numberpublic void writeWarningResult(int line, String value)
CommonDataProvider
writeWarningResult
in interface DataOutputProvider
writeWarningResult
in class CommonDataProvider
line
- The line numbervalue
- The valuepublic void writeDataResult(String column, int line, String value)
writeDataResult
in interface DataOutputProvider
writeDataResult
in class CommonDataProvider
column
- The column nameline
- The line numbervalue
- The data valuepublic String readValue(String column, int line) throws TechnicalException
readValue
in interface DataInputProvider
column
- index of the column to readline
- index of the line to readTechnicalException
- if Wrong data file (IOException, EmptyDataFileContentException or WrongDataFileFormatException)public String[] readLine(int line, boolean readResult) throws TechnicalException
readLine
in interface DataInputProvider
line
- id of the line to read (line=0 for reading headers ; line=1 for reading 1st line, ...)readResult
- true if result must be returned, false otherwiseTechnicalException
- if Wrong data file (IOException, EmptyDataFileContentException or WrongDataFileFormatException)protected void initColumns() throws EmptyDataFileContentException, WrongDataFileFormatException
EmptyDataFileContentException
- if data is emptyWrongDataFileFormatException
- if data is wrongprotected void openInputData() throws TechnicalException
TechnicalException
- is thrown if you have a technical error (format, configuration, datas, ...) in NoraUi.Copyright © 2023 NoraUi. All rights reserved.