Class SourceViewModel

  • All Implemented Interfaces:

    public class SourceViewModel
    extends Object
    implements ModelObject
    Server side model that provides the data for the source code view of the coverage results. The layout of the associated view is defined corresponding jelly view 'index.jelly'.
    Ullrich Hafner
    • Constructor Detail

      • SourceViewModel

        public SourceViewModel​(Run<?,​?> owner,
                               String id,
                               FileNode fileNode,
                               String tableId)
        Creates a new source view model instance.
        owner - the owner of this view
        id - the ID that is used to store the coverage sources
        fileNode - the selected file node of the coverage tree
    • Method Detail

      • getOwner

        public Run<?,​?> getOwner()
      • getTableId

        public String getTableId()
      • getSourceFileContent

        public String getSourceFileContent()
        Returns the source file rendered in HTML.
        the colored source code as HTML document
      • isSourceFileAvailable

        public boolean isSourceFileAvailable()
        Returns whether the source file is available in Jenkins build folder.
        true if the source file is available, false otherwise