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 intCHART_HEIGHTstatic intCHART_WIDTHstatic StringURL_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 voiddoIndex(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)Redirects the index page to the last result.voiddoSeverityTrend(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)Display the severity trend graph.voiddoStatusTrend(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)Display the status trend graph.AnalysisResultConfigurationgetAnalysisResultConfiguration()StringgetDisplayName()StringgetIconFileName()Run<?,?>getLastFinishedBuild()Returns the last finished build.CodeDxBuildActiongetLastFinishedBuildAction()Get build action of the last finished build.StringgetLatestAnalysisUrl()StringgetUrlName()booleanhasValidResults()booleanshowTablesAndCharts()
-
-
-
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:
getIconFileNamein interfaceAction
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getUrlName
public String getUrlName()
- Specified by:
getUrlNamein 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 IOExceptionRedirects 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
nullif 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 IOExceptionDisplay 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 IOExceptionDisplay the status trend graph.- Parameters:
request- Stapler requestresponse- Stapler response- Throws:
IOException- in case of an error
-
-