Class JobClassNameRestriction

java.lang.Object
com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction
io.jenkins.plugins.jobrestrictions.restrictions.job.JobClassNameRestriction
All Implemented Interfaces:
ExtensionPoint, Describable<JobRestriction>, Serializable

public class JobClassNameRestriction extends JobRestriction
Handles job class restrictions.
Since:
TODO
Author:
Oleg Nenashev
See Also:
  • Constructor Details

    • JobClassNameRestriction

      @DataBoundConstructor public JobClassNameRestriction(List<ClassSelector> jobClasses)
  • Method Details

    • getJobClasses

      @NonNull public List<ClassSelector> getJobClasses()
    • canTake

      public boolean canTake(Queue.BuildableItem item)
      Description copied from class: JobRestriction
      Check if the Queue item can be taken. This method is being used to check if the Node can take the specified job. If the job cannot be taken, Jenkins will try to launch the job on other nodes.
      Specified by:
      canTake in class JobRestriction
      Parameters:
      item - An item to be checked
      Returns:
      true if the node can take the item
    • canTake

      public boolean canTake(Run run)
      Description copied from class: JobRestriction
      Check if the Job can be executed according to the specified Run. If the job cannot be executed, it will be aborted by the plugin.
      Specified by:
      canTake in class JobRestriction
      Parameters:
      run - A Run to be checked
      Returns:
      true if the build can be executed