Class SourceViewModel
- java.lang.Object
-
- com.parasoft.findings.jenkins.coverage.api.metrics.source.SourceViewModel
-
- All Implemented Interfaces:
ModelObject
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'.- Author:
- Ullrich Hafner
-
-
Constructor Summary
Constructors Constructor Description SourceViewModel(Run<?,?> owner, String id, FileNode fileNode, String tableId)
Creates a new source view model instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDisplayName()
FileNode
getNode()
Run<?,?>
getOwner()
String
getSourceFileContent()
Returns the source file rendered in HTML.String
getTableId()
boolean
isSourceFileAvailable()
Returns whether the source file is available in Jenkins build folder.
-
-
-
Method Detail
-
getOwner
public Run<?,?> getOwner()
-
getNode
public FileNode getNode()
-
getTableId
@JavaScriptMethod public String getTableId()
-
getSourceFileContent
public String 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
public String getDisplayName()
- Specified by:
getDisplayName
in interfaceModelObject
-
-