Class DetailsTableModel.TableRow
- java.lang.Object
-
- io.jenkins.plugins.analysis.core.model.DetailsTableModel.TableRow
-
- Direct Known Subclasses:
BlamesModel.BlamesRow
,DuplicateCodeScanner.DryModel.DuplicationRow
,ForensicsModel.ForensicsRow
,IssuesModel.IssuesRow
- Enclosing class:
- DetailsTableModel
public static class DetailsTableModel.TableRow extends Object
Base class for table rows. Contains columns that should be used by all tables.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TableRow(StaticAnalysisLabelProvider.AgeBuilder ageBuilder, FileNameRenderer fileNameRenderer, DescriptionProvider descriptionProvider, edu.hm.hafner.analysis.Issue issue, io.jenkins.plugins.util.JenkinsFacade jenkinsFacade)
Creates a newDetailsTableModel.TableRow
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
formatProperty(String property, String value)
Formats the text of the specified property column.protected String
formatSeverity(edu.hm.hafner.analysis.Severity severity)
Formats the text of the severity column.String
getAge()
String
getDescription()
io.jenkins.plugins.datatables.TableModel.DetailedColumnDefinition
getFileName()
String
getMessage()
protected String
render(j2html.tags.UnescapedText text)
Renders the specified HTML code.protected String
render(String html)
Renders the specified HTML code.
-
-
-
Constructor Detail
-
TableRow
protected TableRow(StaticAnalysisLabelProvider.AgeBuilder ageBuilder, FileNameRenderer fileNameRenderer, DescriptionProvider descriptionProvider, edu.hm.hafner.analysis.Issue issue, io.jenkins.plugins.util.JenkinsFacade jenkinsFacade)
Creates a newDetailsTableModel.TableRow
.- Parameters:
ageBuilder
- renders the age columnfileNameRenderer
- renders the file name columndescriptionProvider
- renders the description textissue
- the issue to show in the rowjenkinsFacade
- Jenkins facade to replaced with a stub during unit tests
-
-
Method Detail
-
formatSeverity
protected String formatSeverity(edu.hm.hafner.analysis.Severity severity)
Formats the text of the severity column.- Parameters:
severity
- the severity of the issue- Returns:
- the formatted column
-
formatProperty
protected String formatProperty(String property, String value)
Formats the text of the specified property column. T he text actually is a link to the UI representation of the property.- Parameters:
property
- the property to formatvalue
- the value of the property- Returns:
- the formatted column
-
render
protected final String render(j2html.tags.UnescapedText text)
Renders the specified HTML code. Removes unsafe HTML constructs.- Parameters:
text
- the HTML to render- Returns:
- safe HTML
-
render
protected final String render(String html)
Renders the specified HTML code. Removes unsafe HTML constructs.- Parameters:
html
- the HTML to render- Returns:
- safe HTML
-
getDescription
public String getDescription()
-
getMessage
public String getMessage()
-
getFileName
public io.jenkins.plugins.datatables.TableModel.DetailedColumnDefinition getFileName()
-
getAge
public String getAge()
-
-