Package outputProviders.logGenerator
Class LogHTMLFileHandler
java.lang.Object
outputProviders.logGenerator.LogHTMLFileHandler
- Direct Known Subclasses:
AboutFuzzerPageGenerator,AllMapsPageGenerator,HomePageGenerator,OverviewAndConclusionsPageGenerator,WelcomePageGenerator
This class is responsible for the overall creation of the HTML page files that contains the report.
-
Field Summary
FieldsModifier and TypeFieldDescriptionA list with as string the headers of the CSV file.static final StringPath to the HTML file that contains the generated about the fuzzer page of the report.static final StringPath to the template for the HTML file that contains the template for the about the fuzzer page of the report.static final StringPath to the HTML file that contains the generated all maps page of the report.static final StringPath to the template for the HTML file that contains the template for the all maps page of the report.static final StringPath to the HTML file that contains the generated home page of the report.static final StringPath to the template for the HTML file that contains the template for the home page of the report.static final StringPath to the HTML file that contains the generated overview report and conclusions page of the report.static final StringPath to the template fo the HTML file that contains the template for the overview report and conclusions page of the report.static final StringPath to the HTML file that contains the generated welcome page of the report.static final StringPath to the template for the HTML file that containt the template for the welcome page of the reportA list with items lists (row of the CSV file) of strings (values in the row of the CSV file). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidGenerates the HTML report by processing the log file, modifying the HTML templates of all pages, and writing the generated HTMLs to the appropriate HTML files.static intgetColumnIndex(String header) Gets the index of a specific column in the CSV data.static StringReturns a string with the first letter of each word in the string capitalized, and the spaces between the words removed.static intgetRowIndex(List<String> row) Gets the index of a specific row in the CSV data.getUniqueValues(int columnIndex) Returns the unique values of a specific column in the CSV data.voidConstructor for the LogHTMLFileHandler class.voidProcesses the log file and extracts headers and rows of data.
-
Field Details
-
headers
A list with as string the headers of the CSV file. These are already formatted as wished. -
rows
A list with items lists (row of the CSV file) of strings (values in the row of the CSV file). -
ReportHomeTemplatePath
Path to the template for the HTML file that contains the template for the home page of the report. -
ReportAboutFuzzerTemplatePath
Path to the template for the HTML file that contains the template for the about the fuzzer page of the report. -
ReportOverviewTemplatePath
Path to the template fo the HTML file that contains the template for the overview report and conclusions page of the report. -
ReportAllMapsTemplatePath
Path to the template for the HTML file that contains the template for the all maps page of the report. -
ReportWelcomeTemplatePath
Path to the template for the HTML file that containt the template for the welcome page of the report -
ReportHomePath
Path to the HTML file that contains the generated home page of the report. -
ReportAboutFuzzerPath
Path to the HTML file that contains the generated about the fuzzer page of the report. -
ReportOverviewPath
Path to the HTML file that contains the generated overview report and conclusions page of the report. -
ReportAllMapsPath
Path to the HTML file that contains the generated all maps page of the report. -
ReportWelcomePath
Path to the HTML file that contains the generated welcome page of the report.
-
-
Constructor Details
-
LogHTMLFileHandler
public LogHTMLFileHandler()
-
-
Method Details
-
LogFileHTMLHandler
public void LogFileHTMLHandler()Constructor for the LogHTMLFileHandler class. Do not initialize subclasses here! -
generateHTMLReport
public void generateHTMLReport()Generates the HTML report by processing the log file, modifying the HTML templates of all pages, and writing the generated HTMLs to the appropriate HTML files. -
processLogFile
public void processLogFile()Processes the log file and extracts headers and rows of data. -
getUniqueValues
Returns the unique values of a specific column in the CSV data.- Parameters:
columnIndex- The index of the column.- Returns:
- A list of unique values in the specified column.
-
getColumnIndex
Gets the index of a specific column in the CSV data.- Parameters:
header- The header of the column.- Returns:
- The index of the column in rows as int.
-
getRowIndex
Gets the index of a specific row in the CSV data.- Parameters:
row- The row of the CSV data.- Returns:
- The index of the row in rows as int.
-
getIDName
Returns a string with the first letter of each word in the string capitalized, and the spaces between the words removed. E.g. "this is a test" -> "ThisIsATest"- Parameters:
header- The string to be converted- Returns:
- The converted string.
-