Class MonitoringWorkflowJobActionFactory

java.lang.Object
jenkins.model.TransientActionFactory<org.jenkinsci.plugins.workflow.job.WorkflowJob>
io.jenkins.plugins.monitoring.MonitoringWorkflowJobActionFactory
All Implemented Interfaces:
ExtensionPoint

@Extension public class MonitoringWorkflowJobActionFactory extends TransientActionFactory<org.jenkinsci.plugins.workflow.job.WorkflowJob>
A TransientActionFactory to add an action to specific WorkflowJob.
Author:
Simon Symhoven
  • Constructor Details

    • MonitoringWorkflowJobActionFactory

      public MonitoringWorkflowJobActionFactory()
  • Method Details

    • type

      public Class<org.jenkinsci.plugins.workflow.job.WorkflowJob> type()
      Specifies the Class of the job WorkflowJob to add the action to.
      Specified by:
      type in class TransientActionFactory<org.jenkinsci.plugins.workflow.job.WorkflowJob>
      Returns:
      the Class of job to add the action to.
    • createFor

      @NonNull public Collection<? extends Action> createFor(@NonNull org.jenkinsci.plugins.workflow.job.WorkflowJob workflowJob)
      Add the action to the selected WorkflowJob if its a Pull Request.
      Specified by:
      createFor in class TransientActionFactory<org.jenkinsci.plugins.workflow.job.WorkflowJob>
      Parameters:
      workflowJob - the job to add the action to.
      Returns:
      Collections of MonitoringWorkflowJobAction if WorkflowJob is a Pull Request, else a empty collection.