Class CommitStatisticsBuildAction
java.lang.Object
hudson.model.InvisibleAction
io.jenkins.plugins.forensics.miner.CommitStatisticsBuildAction
- All Implemented Interfaces:
Action
,ModelObject
,Serializable
,RunAction2
,SimpleBuildStep.LastBuildAction
public class CommitStatisticsBuildAction
extends InvisibleAction
implements SimpleBuildStep.LastBuildAction, RunAction2, Serializable
Controls the life cycle of the commit statistics in a job. This action persists the results of a build and displays a
summary on the build page. The actual visualization of the results is defined in the matching
summary.jelly
file.- Author:
- Ullrich Hafner
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCommitStatisticsBuildAction
(Run<?, ?> owner, String scmKey, CommitStatistics commitStatistics) Creates a new instance ofCommitStatisticsBuildAction
. -
Method Summary
Modifier and TypeMethodDescriptionRun
<?, ?> getOwner()
Collection
<? extends Action> Returns the reference build action if present.Returns a link that can be used in Jelly views to navigate to the reference build.boolean
Returns whether the statistics are based on a reference build or on the previous build.void
onAttached
(Run<?, ?> run) void
toString()
Methods inherited from class hudson.model.InvisibleAction
getDisplayName, getIconFileName, getUrlName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface hudson.model.Action
getDisplayName, getIconFileName, getUrlName
-
Constructor Details
-
CommitStatisticsBuildAction
public CommitStatisticsBuildAction(Run<?, ?> owner, String scmKey, CommitStatistics commitStatistics) Creates a new instance ofCommitStatisticsBuildAction
.- Parameters:
owner
- the associated build that created the statisticsscmKey
- key of the repositorycommitStatistics
- the statistics to persist with this action
-
-
Method Details
-
getOwner
-
getScmKey
-
getCommitStatistics
-
hasReferenceBuild
public boolean hasReferenceBuild()Returns whether the statistics are based on a reference build or on the previous build.- Returns:
true
if there is a reference build defined,false
otherwise
-
getReferenceBuild
Returns the reference build action if present.- Returns:
- the action
-
getReferenceBuildLink
Returns a link that can be used in Jelly views to navigate to the reference build.- Returns:
- the link
-
toString
-
onAttached
- Specified by:
onAttached
in interfaceRunAction2
-
onLoad
- Specified by:
onLoad
in interfaceRunAction2
-
getProjectActions
- Specified by:
getProjectActions
in interfaceSimpleBuildStep.LastBuildAction
-