Class DetailsTableModel

  • Direct Known Subclasses:
    BlamesModel, DuplicateCodeScanner.DryModel, ForensicsModel, IssuesModel

    public abstract class DetailsTableModel
    extends io.jenkins.plugins.datatables.TableModel
    Provides the model for the issues details table. The model consists of the following parts:
    • header name for each column
    • width for each column
    • content for each row
    • content for whole table
    Author:
    Ullrich Hafner
    • Constructor Detail

      • DetailsTableModel

        protected DetailsTableModel​(edu.hm.hafner.analysis.Report report,
                                    FileNameRenderer fileNameRenderer,
                                    StaticAnalysisLabelProvider.AgeBuilder ageBuilder,
                                    DescriptionProvider descriptionProvider,
                                    io.jenkins.plugins.util.JenkinsFacade jenkinsFacade)
        Creates a new instance of DetailsTableModel.
        Parameters:
        report - the report to render
        fileNameRenderer - renders the file name column
        ageBuilder - renders the age column
        descriptionProvider - renders the description text
        jenkinsFacade - Jenkins facade to replaced with a stub during unit tests
    • Method Detail

      • getTableConfiguration

        public io.jenkins.plugins.datatables.TableConfiguration getTableConfiguration()
        Overrides:
        getTableConfiguration in class io.jenkins.plugins.datatables.TableModel
      • getJenkinsFacade

        protected io.jenkins.plugins.util.JenkinsFacade getJenkinsFacade()
      • getReport

        protected edu.hm.hafner.analysis.Report getReport()
      • getRows

        public List<Object> getRows()
        Converts the specified set of issues into a table.
        Specified by:
        getRows in class io.jenkins.plugins.datatables.TableModel
        Returns:
        the table as String
      • createDetailsColumn

        protected io.jenkins.plugins.datatables.TableColumn createDetailsColumn()
      • createHiddenDetailsColumn

        protected io.jenkins.plugins.datatables.TableColumn createHiddenDetailsColumn()
      • createFileColumn

        protected io.jenkins.plugins.datatables.TableColumn createFileColumn()
      • createAgeColumn

        protected io.jenkins.plugins.datatables.TableColumn createAgeColumn()
      • createSeverityColumn

        protected io.jenkins.plugins.datatables.TableColumn createSeverityColumn()
      • createPackageColumn

        protected io.jenkins.plugins.datatables.TableColumn createPackageColumn()
      • getRow

        protected abstract DetailsTableModel.TableRow getRow​(edu.hm.hafner.analysis.Issue issue)
        Returns a table row for the specified issue.
        Parameters:
        issue - the issue to show in the row
        Returns:
        a table row for the issue