Klasse FileNameRenderer

java.lang.Object
io.jenkins.plugins.analysis.core.model.FileNameRenderer

public class FileNameRenderer extends Object
Renders the name of an affected file of an issue. If the affected file is accessible, then a hyper link is created. Otherwise, the plain text of the base name is created.
Autor:
Ullrich Hafner
  • Konstruktordetails

    • FileNameRenderer

      public FileNameRenderer(Run<?,?> build)
      Creates a new FileNameRenderer.
      Parameter:
      build - the build to obtain the affected file from
    • FileNameRenderer

      public FileNameRenderer(Run<?,?> build, BuildFolderFacade facade)
      Creates a new FileNameRenderer.
      Parameter:
      build - the build to obtain the affected file from
      facade - facade to the build folder that contains the affected files
  • Methodendetails

    • renderAffectedFileLink

      public String renderAffectedFileLink(edu.hm.hafner.analysis.Issue issue)
      Returns the String representation of an HTML link that references the UI representation of the affected file of the specified issue.
      Parameter:
      issue - the issue to create the link for
      Gibt zurück:
      the link (if the file is accessible)
      Siehe auch:
    • createAffectedFileLink

      public j2html.tags.DomContent createAffectedFileLink(edu.hm.hafner.analysis.Issue issue)
      Returns an HTML link that references the UI representation of the affected file of the specified issue.
      Parameter:
      issue - the issue to create the link for
      Gibt zurück:
      the link (if the file is accessible)
    • createAffectedFileLink

      public j2html.tags.DomContent createAffectedFileLink(edu.hm.hafner.analysis.Issue issue, String prefix)
      Returns an HTML link that references the UI representation of the affected file of the specified issue.
      Parameter:
      issue - the issue to create the link for
      prefix - prefix to the file name URL
      Gibt zurück:
      the link (if the file is accessible)
    • getSourceCodeUrl

      public String getSourceCodeUrl(edu.hm.hafner.analysis.Issue issue)
      Returns the URL to show the source code with the affected issue line.
      Parameter:
      issue - the issue to show the source code for
      Gibt zurück:
      the URL
    • getFileNameAtLine

      public String getFileNameAtLine(edu.hm.hafner.analysis.Issue issue)
      Returns the base name of the affected file of the specified issue (including the specified line number).
      Parameter:
      issue - the issue to get the base name for
      Gibt zurück:
      the file name
    • getFileName

      public String getFileName(edu.hm.hafner.analysis.Issue issue)
      Returns the base name of the affected file of the specified issue.
      Parameter:
      issue - the issue to get the base name for
      Gibt zurück:
      the file name