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

public class NotJobRestriction extends JobRestriction
Logic inversion condition.
Author:
Oleg Nenashev
See Also:
  • Constructor Details

    • NotJobRestriction

      @DataBoundConstructor public NotJobRestriction(JobRestriction restriction)
  • Method Details

    • getRestriction

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