Package io.jenkins.plugins.monitoring
Class MonitoringMultibranchProjectAction
- java.lang.Object
-
- io.jenkins.plugins.monitoring.MonitoringMultibranchProjectAction
-
- All Implemented Interfaces:
Action
,ModelObject
,ProminentProjectAction
public class MonitoringMultibranchProjectAction extends Object implements ProminentProjectAction, Action
This action displays a link on the side panel of aMultiBranchProject
. The action is responsible to render the basic overview of all open pull requests via its associated 'index.jelly' view.- Author:
- Simon Symhoven
-
-
Constructor Summary
Constructors Constructor Description MonitoringMultibranchProjectAction(jenkins.branch.MultiBranchProject<?,?> multiBranchProject)
Creates a new instance ofMonitoringMultibranchProjectAction
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<jenkins.scm.api.metadata.ContributorMetadataAction>
getContributorMetaData(Job<?,?> job)
Get theContributorMetadataAction
for a given job, e.g.String
getDisplayName()
static String
getIconBig()
String
getIconFileName()
static String
getIconSmall()
Optional<jenkins.scm.api.metadata.ObjectMetadataAction>
getObjectMetaData(Job<?,?> job)
Get theObjectMetadataAction
for a given job, e.g.jenkins.branch.MultiBranchProject<?,?>
getProject()
List<Job<?,?>>
getPullRequests()
Filters all jobs of selectedMultiBranchProject
by "Pull Request".jenkins.scm.api.mixin.ChangeRequestSCMHead2
getScmHead(Job<?,?> job)
Get theChangeRequestSCMHead2
for a specificJob
.static String
getURI()
String
getUrlName()
-
-
-
Constructor Detail
-
MonitoringMultibranchProjectAction
public MonitoringMultibranchProjectAction(jenkins.branch.MultiBranchProject<?,?> multiBranchProject)
Creates a new instance ofMonitoringMultibranchProjectAction
.- Parameters:
multiBranchProject
- the project that owns this action.
-
-
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
-
getProject
public jenkins.branch.MultiBranchProject<?,?> getProject()
-
getPullRequests
public List<Job<?,?>> getPullRequests()
Filters all jobs of selectedMultiBranchProject
by "Pull Request".- Returns:
- filtered list of all
jobs
by "Pull Request".
-
getScmHead
public jenkins.scm.api.mixin.ChangeRequestSCMHead2 getScmHead(Job<?,?> job)
Get theChangeRequestSCMHead2
for a specificJob
.- Parameters:
job
- the job to getChangeRequestSCMHead2
for.- Returns:
- the
ChangeRequestSCMHead2
of job.
-
getObjectMetaData
public Optional<jenkins.scm.api.metadata.ObjectMetadataAction> getObjectMetaData(Job<?,?> job)
Get theObjectMetadataAction
for a given job, e.g. the name of the pull request and the link to the repository.- Parameters:
job
- the job to getObjectMetadataAction
for.- Returns:
- the
ObjectMetadataAction
for the given job asOptional
.
-
getContributorMetaData
public Optional<jenkins.scm.api.metadata.ContributorMetadataAction> getContributorMetaData(Job<?,?> job)
Get theContributorMetadataAction
for a given job, e.g. the name of the contributor.- Parameters:
job
- the job to getContributorMetadataAction
for.- Returns:
- the
ContributorMetadataAction
for the given job asOptional
.
-
getURI
public static String getURI()
-
getIconSmall
public static String getIconSmall()
-
getIconBig
public static String getIconBig()
-
-