Class HtmlReportPublisherTarget

  • All Implemented Interfaces:
    Describable<htmlpublisher.HtmlPublisherTarget>

    public final class HtmlReportPublisherTarget
    extends htmlpublisher.HtmlPublisherTarget
    This class exists to enable replacing the default graph icon html publisher uses for html actions with our own icon.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      class  HtmlReportPublisherTarget.HtmlReportAction
      This class exists to override the graph icon used by HtmlPublisherTarget.BaseHTMLAction for builds.
      • Nested classes/interfaces inherited from class htmlpublisher.HtmlPublisherTarget

        htmlpublisher.HtmlPublisherTarget.BaseHTMLAction, htmlpublisher.HtmlPublisherTarget.DescriptorImpl, htmlpublisher.HtmlPublisherTarget.HTMLAction, htmlpublisher.HtmlPublisherTarget.HTMLBuildAction, htmlpublisher.HtmlPublisherTarget.HTMLPublishedForProjectMarkerAction
    • Field Summary

      • Fields inherited from class htmlpublisher.HtmlPublisherTarget

        INCLUDE_ALL_PATTERN
    • Constructor Detail

      • HtmlReportPublisherTarget

        public HtmlReportPublisherTarget​(String reportName,
                                         String reportDir,
                                         String reportFiles,
                                         String reportTitles,
                                         String jobId)
        Constructor.
        Parameters:
        reportName - Report name. Used in action link text.
        reportDir - Directory from which the report can be found, relative to workspace.
        reportFiles - The file names of report files, separated by comma.
        reportTitles - The title of the report files, separated by comma. These are used as tab titles when viewing the report.
        jobId - The id of the Defensics job.
    • Method Detail

      • getJobId

        public String getJobId()
      • equals

        public boolean equals​(Object o)
        Overrides:
        equals in class htmlpublisher.HtmlPublisherTarget
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class htmlpublisher.HtmlPublisherTarget
      • getProjectAction

        public Action getProjectAction​(AbstractItem item)
        This is overridden to return an empty Action to avoid WorkflowActionsFactory creating a duplicate report link on project level. This is called for Pipeline projects. See ProjectHtmlReportActionFactory for Freestyle projects.
        Overrides:
        getProjectAction in class htmlpublisher.HtmlPublisherTarget
      • customizeActionForDefensics

        public void customizeActionForDefensics​(Run<?,​?> run)
        This method replaces the HtmlPublisherTarget.HTMLBuildAction added to the run by HtmlPublisher with a HtmlReportPublisherTarget.HtmlReportAction, a subtype. The reason for this is to override the default icon used by HtmlPublisherTarget.BaseHTMLAction.
        Parameters:
        run - The run where defensics results have been published using HtmlPublisher, and where HtmlPublisherTarget.HTMLBuildAction should be replaced with a HtmlReportPublisherTarget.HtmlReportAction.