Package org.jenkinsci.plugins.codedx
Class CodeDxProjectAction
- java.lang.Object
-
- org.jenkinsci.plugins.codedx.CodeDxProjectAction
-
- All Implemented Interfaces:
Action
,ModelObject
public class CodeDxProjectAction extends Object implements Action
- Author:
- ademartini This file is heavily derived from the sloccount-plugin (author: lordofthepigs)
-
-
Field Summary
Fields Modifier and Type Field Description static int
CHART_HEIGHT
static int
CHART_WIDTH
static String
URL_NAME
-
Constructor Summary
Constructors Constructor Description CodeDxProjectAction(Run<?,?> run, AnalysisResultConfiguration analysisResultConfiguration, String latestAnalysisUrl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doIndex(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
Redirects the index page to the last result.void
doSeverityTrend(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
Display the severity trend graph.void
doStatusTrend(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
Display the status trend graph.AnalysisResultConfiguration
getAnalysisResultConfiguration()
String
getDisplayName()
String
getIconFileName()
Run<?,?>
getLastFinishedBuild()
Returns the last finished build.CodeDxBuildAction
getLastFinishedBuildAction()
Get build action of the last finished build.String
getLatestAnalysisUrl()
String
getUrlName()
boolean
hasValidResults()
boolean
showTablesAndCharts()
-
-
-
Field Detail
-
URL_NAME
public static final String URL_NAME
- See Also:
- Constant Field Values
-
CHART_WIDTH
public static final int CHART_WIDTH
- See Also:
- Constant Field Values
-
CHART_HEIGHT
public static final int CHART_HEIGHT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CodeDxProjectAction
public CodeDxProjectAction(Run<?,?> run, AnalysisResultConfiguration analysisResultConfiguration, String latestAnalysisUrl)
-
-
Method Detail
-
getIconFileName
public String getIconFileName()
- Specified by:
getIconFileName
in interfaceAction
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interfaceAction
- Specified by:
getDisplayName
in interfaceModelObject
-
getUrlName
public String getUrlName()
- Specified by:
getUrlName
in interfaceAction
-
getLatestAnalysisUrl
public String getLatestAnalysisUrl()
-
getAnalysisResultConfiguration
public AnalysisResultConfiguration getAnalysisResultConfiguration()
-
showTablesAndCharts
public boolean showTablesAndCharts()
-
doIndex
public void doIndex(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) throws IOException
Redirects the index page to the last result.- Parameters:
request
- Stapler requestresponse
- Stapler response- Throws:
IOException
- in case of an error
-
getLastFinishedBuild
public Run<?,?> getLastFinishedBuild()
Returns the last finished build.- Returns:
- the last finished build or
null
if there is no such build
-
getLastFinishedBuildAction
public CodeDxBuildAction getLastFinishedBuildAction()
Get build action of the last finished build.- Returns:
- the build action or null
-
hasValidResults
public final boolean hasValidResults()
-
doSeverityTrend
public void doSeverityTrend(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) throws IOException
Display the severity trend graph.- Parameters:
request
- Stapler requestresponse
- Stapler response- Throws:
IOException
- in case of an error
-
doStatusTrend
public void doStatusTrend(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) throws IOException
Display the status trend graph.- Parameters:
request
- Stapler requestresponse
- Stapler response- Throws:
IOException
- in case of an error
-
-