Class ReportAction

java.lang.Object
com.indusface.plugins.report.ReportAction
All Implemented Interfaces:
Action, ModelObject

public class ReportAction extends Object implements Action
The ReportAction class is responsible for fetching and parsing scan reports and statuses from an external API. It implements the Action interface to integrate with Jenkins.
  • Constructor Details

    • ReportAction

      public ReportAction(Run<?,?> run)
      Constructor to initialize the ReportAction with the specified Jenkins build.
      Parameters:
      run - the Jenkins build run
  • Method Details

    • getScanStatus

      public ScanApiResponse getScanStatus() throws Exception
      Fetches the scan status from the external API.
      Returns:
      the scan status as a ScanApiResponse object
      Throws:
      Exception
    • scanReportData

      public ScanReport scanReportData()
      Fetches and parses the scan report data from the external API.
      Returns:
      the scan report as a ScanReport object
    • callGetStatusAPI

      public ScanApiResponse callGetStatusAPI(String scanlogid, String secretKey) throws Exception
      Calls the external API to get the scan status.
      Parameters:
      secretKey - the secret key for authentication
      scanlogid - the scan log ID
      Returns:
      the scan status as a ScanApiResponse object
      Throws:
      Exception - if an error occurs during the API call
    • getJobStatus

      public String getJobStatus()
    • getIconFileName

      public String getIconFileName()
      Specified by:
      getIconFileName in interface Action
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface Action
      Specified by:
      getDisplayName in interface ModelObject
    • getUrlName

      public String getUrlName()
      Specified by:
      getUrlName in interface Action