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 theContributorMetadataActionfor a given job, e.g.StringgetDisplayName()static StringgetIconBig()StringgetIconFileName()static StringgetIconSmall()Optional<jenkins.scm.api.metadata.ObjectMetadataAction>getObjectMetaData(Job<?,?> job)Get theObjectMetadataActionfor a given job, e.g.jenkins.branch.MultiBranchProject<?,?>getProject()List<Job<?,?>>getPullRequests()Filters all jobs of selectedMultiBranchProjectby "Pull Request".jenkins.scm.api.mixin.ChangeRequestSCMHead2getScmHead(Job<?,?> job)Get theChangeRequestSCMHead2for a specificJob.static StringgetURI()StringgetUrlName()
-
-
-
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:
getIconFileNamein interfaceAction
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getUrlName
public String getUrlName()
- Specified by:
getUrlNamein interfaceAction
-
getProject
public jenkins.branch.MultiBranchProject<?,?> getProject()
-
getPullRequests
public List<Job<?,?>> getPullRequests()
Filters all jobs of selectedMultiBranchProjectby "Pull Request".- Returns:
- filtered list of all
jobsby "Pull Request".
-
getScmHead
public jenkins.scm.api.mixin.ChangeRequestSCMHead2 getScmHead(Job<?,?> job)
Get theChangeRequestSCMHead2for a specificJob.- Parameters:
job- the job to getChangeRequestSCMHead2for.- Returns:
- the
ChangeRequestSCMHead2of job.
-
getObjectMetaData
public Optional<jenkins.scm.api.metadata.ObjectMetadataAction> getObjectMetaData(Job<?,?> job)
Get theObjectMetadataActionfor a given job, e.g. the name of the pull request and the link to the repository.- Parameters:
job- the job to getObjectMetadataActionfor.- Returns:
- the
ObjectMetadataActionfor the given job asOptional.
-
getContributorMetaData
public Optional<jenkins.scm.api.metadata.ContributorMetadataAction> getContributorMetaData(Job<?,?> job)
Get theContributorMetadataActionfor a given job, e.g. the name of the contributor.- Parameters:
job- the job to getContributorMetadataActionfor.- Returns:
- the
ContributorMetadataActionfor the given job asOptional.
-
getURI
public static String getURI()
-
getIconSmall
public static String getIconSmall()
-
getIconBig
public static String getIconBig()
-
-