public class DataReportServiceImpl extends Object implements LifecycleListener, DataReportService
| Modifier and Type | Field and Description |
|---|---|
static String |
COLLECTION_EXTRA_DATA
Stores the collection name
|
static String |
COLLECTION_EXTRA_DATA_DESCRIPTION |
static String |
FIELD_DRIVER_ID |
static String |
FIELD_ID
static field names
|
static String |
FIELD_SHEET_NAME |
static String |
FIELD_TEST |
static String |
FIELD_TEST_RUN |
static String |
FIELD_TIME |
| Constructor and Description |
|---|
DataReportServiceImpl(com.mongodb.DB db)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendData(String driverId,
String test,
String run,
String sheetName,
String[] fieldNames,
String[] values)
Appends extra data for a test.run to a named sheet.
|
com.mongodb.DBCursor |
getData(String driverId,
String test,
String testRun,
String sheetName)
Returns a DB cursor for a test.run extra data sheet
|
List<String> |
getDescription(String driverId,
String test,
String testRun,
String sheetName)
Gets the column headers / description for a test.run data sheet
|
List<String> |
getNextValueRow(com.mongodb.DBCursor cursor)
Returns the next row with values or null if no more values.
|
String[] |
getSheetNames(String driverId,
String test,
String testRun)
Gets the extra data sheet names for a specific test.run
|
boolean |
isValueField(String fieldName)
checks if the field name is a user defined value field or a value field
|
void |
remove(String driverId,
String test,
String testRun)
Removes all data from the tables affecting to driver (if provided), test and test run (if provided).
|
void |
setDescription(String driverId,
String test,
String run,
String sheetName,
String[] fieldNames,
String[] description)
Updates the column names for the extra data for a test.run named sheet.
|
void |
start() |
void |
stop() |
public static final String COLLECTION_EXTRA_DATA
public static final String COLLECTION_EXTRA_DATA_DESCRIPTION
public static final String FIELD_ID
public static final String FIELD_TIME
public static final String FIELD_DRIVER_ID
public static final String FIELD_TEST
public static final String FIELD_TEST_RUN
public static final String FIELD_SHEET_NAME
public DataReportServiceImpl(com.mongodb.DB db)
db - (DB, required) the database to usepublic void appendData(String driverId, String test, String run, String sheetName, String[] fieldNames, String[] values)
DataReportServiceappendData in interface DataReportServicedriverId - (String, required) test driver IDtest - (String, required) name of the testrun - (String, required) name of the test runsheetName - (String, required) name of the extra data sheetfieldNames - (String [], required) field names of the values to writevalues - (String [], required) data to write to the extra data sheet
Note: fieldNames and values must have the same array size.public void setDescription(String driverId, String test, String run, String sheetName, String[] fieldNames, String[] description)
DataReportServicesetDescription in interface DataReportServicedriverId - (String, required) test driver IDtest - (String, required) name of the testrun - (String, required) name of the test runsheetName - (String, required) name of the extra data sheetfieldNames - (String [], required) field names of the values to writedescription - (String [], required) data to write to the extra data sheet
Note: fieldNames and values must have the same array size.public List<String> getDescription(String driverId, String test, String testRun, String sheetName)
DataReportServicegetDescription in interface DataReportServicedriverId - (String, optional) test driver IDtest - (String, required) name of the testtestRun - (String, required) name of the test runsheetName - (String, required) name of the extra data sheetpublic boolean isValueField(String fieldName)
isValueField in interface DataReportServicefieldName - (String, required) field name to validatepublic String[] getSheetNames(String driverId, String test, String testRun)
DataReportServicegetSheetNames in interface DataReportServicedriverId - (String, optional) test driver IDtest - (String, required) name of the testtestRun - (String, required) name of the test runpublic com.mongodb.DBCursor getData(String driverId, String test, String testRun, String sheetName)
DataReportServicegetData in interface DataReportServicedriverId - (String, optional) test driver IDtest - (String, required) name of the testtestRun - (String, required) name of the test runsheetName - (String, required) name of the extra data sheetisValueFieldpublic void start()
start in interface LifecycleListenerpublic void stop()
stop in interface LifecycleListenerpublic List<String> getNextValueRow(com.mongodb.DBCursor cursor)
DataReportServicegetNextValueRow in interface DataReportServicecursor - (DBCursor) cursorpublic void remove(String driverId, String test, String testRun)
DataReportServiceremove in interface DataReportServicedriverId - (String, optional) Driver IDtest - (String, required) test nametestRun - (String, optional) test run nameCopyright © 2005–2018 Alfresco Software. All rights reserved.