Class SourceViewModel
java.lang.Object
io.jenkins.plugins.coverage.metrics.source.SourceViewModel
- All Implemented Interfaces:
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'.
- Author:
- Ullrich Hafner
-
Constructor Summary
ConstructorsConstructorDescriptionSourceViewModel
(Run<?, ?> owner, String id, edu.hm.hafner.coverage.FileNode fileNode) Creates a new source view model instance. -
Method Summary
-
Constructor Details
-
SourceViewModel
Creates a new source view model instance.- Parameters:
owner
- the owner of this viewid
- the ID that is used to store the coverage sourcesfileNode
- the selected file node of the coverage tree
-
-
Method Details
-
getOwner
-
getNode
public edu.hm.hafner.coverage.FileNode getNode() -
getSourceFileContent
Returns the source file rendered in HTML.- Returns:
- the colored source code as HTML document
-
isSourceFileAvailable
public boolean isSourceFileAvailable()Returns whether the source file is available in Jenkins build folder.- Returns:
true
if the source file is available,false
otherwise
-
getDisplayName
- Specified by:
getDisplayName
in interfaceModelObject
-