Class CSVFileHandler
java.lang.Object
com.hello2morrow.sonargraph.integration.jenkins.persistence.CSVFileHandler
- All Implemented Interfaces:
IMetricHistoryProvider
Handles operations on a CSV file.
- Author:
- esteban
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprocessLine(String[] nextLine, int column, List<IDataPoint> sonargraphDataset, MetricId metric, NumberFormat numberFormat) readMetricValues(MetricId metric) voidwriteMetricValues(Integer buildnumber, long timestamp, Map<MetricId, String> metricValues) Appends all supported metrics for a specific build.
-
Field Details
-
CSV_SEPARATOR
public static final char CSV_SEPARATOR- See Also:
-
-
Constructor Details
-
CSVFileHandler
-
-
Method Details
-
createHeaderLine
-
readMetricValues
- Specified by:
readMetricValuesin interfaceIMetricHistoryProvider- Returns:
- List of data points for a specific metric.
- Throws:
IOException
-
processLine
protected void processLine(String[] nextLine, int column, List<IDataPoint> sonargraphDataset, MetricId metric, NumberFormat numberFormat) -
writeMetricValues
public void writeMetricValues(Integer buildnumber, long timestamp, Map<MetricId, String> metricValues) throws IOExceptionDescription copied from interface:IMetricHistoryProviderAppends all supported metrics for a specific build.- Specified by:
writeMetricValuesin interfaceIMetricHistoryProvider- Parameters:
buildnumber- Number of the build where the metric was gatheredtimestamp- when the build has been executedmetricValues- map containing the supported metrics and their values for the current build.- Throws:
IOException
-
getStorageName
- Specified by:
getStorageNamein interfaceIMetricHistoryProvider
-