Class ActionHistoryExporter
java.lang.Object
io.github.jspinak.brobot.tools.actionhistory.ActionHistoryExporter
Exports ActionHistory data to various formats for analysis and reporting.
This class provides export functionality for ActionHistory data, supporting multiple formats including CSV, HTML, and summary reports. It's useful for analyzing automation performance, debugging issues, and generating documentation.
Features:
- Export to CSV for spreadsheet analysis
- Generate HTML reports with visualizations
- Create summary statistics
- Export filtered data based on criteria
- Batch export multiple histories
- Since:
- 1.1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Export formats supported by the exporter. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
batchExport
(Map<String, ActionHistory> histories, String filename, ActionHistoryExporter.ExportFormat format) Batch export multiple histories to a single report.void
exportToCSV
(ActionHistory history, String filename) Export ActionHistory to CSV format.void
exportToCSV
(ActionHistory history, String filename, String directory) Export ActionHistory to CSV format with custom path.void
exportToHTML
(ActionHistory history, String filename) Export ActionHistory to HTML report.void
exportToHTML
(ActionHistory history, String filename, String directory) Export ActionHistory to HTML report with custom path.filterHistory
(ActionHistory history, boolean successOnly, long minDuration, long maxDuration) Export filtered ActionHistory based on criteria.generateSummary
(ActionHistory history) Generate a summary report of ActionHistory.
-
Constructor Details
-
ActionHistoryExporter
public ActionHistoryExporter()
-
-
Method Details
-
exportToCSV
Export ActionHistory to CSV format.- Parameters:
history
- the ActionHistory to exportfilename
- the output filename- Throws:
IOException
- if unable to write file
-
exportToCSV
public void exportToCSV(ActionHistory history, String filename, String directory) throws IOException Export ActionHistory to CSV format with custom path.- Parameters:
history
- the ActionHistory to exportfilename
- the output filenamedirectory
- the output directory- Throws:
IOException
- if unable to write file
-
exportToHTML
Export ActionHistory to HTML report.- Parameters:
history
- the ActionHistory to exportfilename
- the output filename- Throws:
IOException
- if unable to write file
-
exportToHTML
public void exportToHTML(ActionHistory history, String filename, String directory) throws IOException Export ActionHistory to HTML report with custom path.- Parameters:
history
- the ActionHistory to exportfilename
- the output filenamedirectory
- the output directory- Throws:
IOException
- if unable to write file
-
generateSummary
Generate a summary report of ActionHistory.- Parameters:
history
- the ActionHistory to analyze- Returns:
- summary statistics as a map
-
filterHistory
public ActionHistory filterHistory(ActionHistory history, boolean successOnly, long minDuration, long maxDuration) Export filtered ActionHistory based on criteria.- Parameters:
history
- the ActionHistory to filtersuccessOnly
- include only successful actionsminDuration
- minimum duration in millisecondsmaxDuration
- maximum duration in milliseconds- Returns:
- filtered ActionHistory
-
batchExport
public void batchExport(Map<String, ActionHistory> histories, String filename, ActionHistoryExporter.ExportFormat format) throws IOExceptionBatch export multiple histories to a single report.- Parameters:
histories
- map of name to ActionHistoryfilename
- output filenameformat
- export format (csv or html)- Throws:
IOException
- if unable to write file
-