java.lang.Object
com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction
com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.logic.MultipleAndJobRestriction
All Implemented Interfaces:
ExtensionPoint, Describable<JobRestriction>, Serializable

public class MultipleAndJobRestriction extends JobRestriction
Implements "And" condition with multiple entries.
Since:
0.2
Author:
Oleg Nenashev
See Also:
  • Constructor Details

    • MultipleAndJobRestriction

      @DataBoundConstructor public MultipleAndJobRestriction(ArrayList<JobRestriction> restrictions)
  • Method Details

    • getRestrictions

      public ArrayList<JobRestriction> getRestrictions()
    • 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
    • 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