Class HtmlReport
- java.lang.Object
-
- com.synopsys.defensics.jenkins.result.HtmlReport
-
public class HtmlReport extends Object
-
-
Constructor Summary
Constructors Constructor Description HtmlReport(FilePath reportFolder, String jobId, String reportTitle)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
Delete HTML report file.boolean
exists()
Check if this local HTML report file exists.String
getFileName()
Get the filename of this report.String
getReportTitle()
Get the title of this report.String
getResultDirectory()
Get the path of the result directory, relative to workspace.
-
-
-
Constructor Detail
-
HtmlReport
public HtmlReport(FilePath reportFolder, String jobId, String reportTitle) throws IOException, InterruptedException
Constructor.- Parameters:
reportFolder
- The reportFolder where the report file is/should be.jobId
- The id of the job. Used in the report filename.reportTitle
- The title of this report. It is used as the tab title when viewing the report.- Throws:
IOException
- If creating missing folders fails.InterruptedException
- If creating missing folders is interrupted.
-
-
Method Detail
-
getResultDirectory
public String getResultDirectory()
Get the path of the result directory, relative to workspace.- Returns:
- Path to result directory. Empty string if reports reside in the root folder of workspace.
-
exists
public boolean exists() throws IOException, InterruptedException
Check if this local HTML report file exists.- Returns:
- True if a file exists, otherwise false.
- Throws:
IOException
- If checking existence fails.InterruptedException
- If checking existence is interrupted.
-
getFileName
public String getFileName()
Get the filename of this report.- Returns:
- Filename without path.
-
getReportTitle
public String getReportTitle()
Get the title of this report.- Returns:
- Report title.
-
delete
public void delete() throws IOException, InterruptedException
Delete HTML report file.- Throws:
IOException
- If deleting fails.InterruptedException
- If deleting is interrupted
-
-