Class FileNameRenderer
java.lang.Object
io.jenkins.plugins.analysis.core.model.FileNameRenderer
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.
- Author:
- Ullrich Hafner
-
Constructor Summary
ConstructorDescriptionFileNameRenderer
(Run<?, ?> build) Creates a newFileNameRenderer
.FileNameRenderer
(Run<?, ?> build, BuildFolderFacade facade) Creates a newFileNameRenderer
. -
Method Summary
Modifier and TypeMethodDescriptionj2html.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.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.getFileName
(edu.hm.hafner.analysis.Issue issue) Returns the base name of the affected file of the specified issue.getFileNameAtLine
(edu.hm.hafner.analysis.Issue issue) Returns the base name of the affected file of the specified issue (including the specified line number).getSourceCodeUrl
(edu.hm.hafner.analysis.Issue issue) Returns the URL to show the source code with the affected issue line.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.
-
Constructor Details
-
FileNameRenderer
Creates a newFileNameRenderer
.- Parameters:
build
- the build to obtain the affected file from
-
FileNameRenderer
Creates a newFileNameRenderer
.- Parameters:
build
- the build to obtain the affected file fromfacade
- facade to the build folder that contains the affected files
-
-
Method Details
-
renderAffectedFileLink
Returns the String representation of an HTML link that references the UI representation of the affected file of the specified issue.- Parameters:
issue
- the issue to create the link for- Returns:
- the link (if the file is accessible)
- See Also:
-
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.- Parameters:
issue
- the issue to create the link for- Returns:
- 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.- Parameters:
issue
- the issue to create the link forprefix
- prefix to the file name URL- Returns:
- the link (if the file is accessible)
-
getSourceCodeUrl
Returns the URL to show the source code with the affected issue line.- Parameters:
issue
- the issue to show the source code for- Returns:
- the URL
-
getFileNameAtLine
Returns the base name of the affected file of the specified issue (including the specified line number).- Parameters:
issue
- the issue to get the base name for- Returns:
- the file name
-
getFileName
Returns the base name of the affected file of the specified issue.- Parameters:
issue
- the issue to get the base name for- Returns:
- the file name
-